CN115100302A - Point cloud processing method, device, equipment and medium - Google Patents

Point cloud processing method, device, equipment and medium Download PDF

Info

Publication number
CN115100302A
CN115100302A CN202210691565.3A CN202210691565A CN115100302A CN 115100302 A CN115100302 A CN 115100302A CN 202210691565 A CN202210691565 A CN 202210691565A CN 115100302 A CN115100302 A CN 115100302A
Authority
CN
China
Prior art keywords
point
residual
decoded
value
directions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210691565.3A
Other languages
Chinese (zh)
Inventor
朱文婕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210691565.3A priority Critical patent/CN115100302A/en
Publication of CN115100302A publication Critical patent/CN115100302A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/40Tree coding, e.g. quadtree, octree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the application provides a point cloud processing method, a point cloud processing device and a point cloud processing medium, wherein the point cloud processing method comprises the following steps: acquiring coding mode information of the point cloud; decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual error information of the point to be decoded in each direction of the K directions; k is a positive integer; determining first residual error information of the point to be decoded in each direction of the K directions based on second residual error information of the point to be decoded in each direction 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 reconstructing the geometric information of the point to be decoded according to the first residual information of the point to be decoded in each direction of the K directions. By adopting the method and the device, the geometric decoding efficiency of the point cloud can be improved.

Description

Point cloud processing method, device, equipment and medium
Technical Field
The present application relates to a point cloud encoding technology, and in particular, to a point cloud processing method, apparatus, device, and medium.
Background
The point cloud is a group of discrete points which are irregularly distributed in space and express the space structure and surface attributes of a three-dimensional object or scene, and can be applied to scenes such as Virtual Reality (VR) games, Computer Aided Design (CAD), three-dimensional point cloud remote presentation, biological tissue three-dimensional reconstruction and the like.
At present, before point cloud is transmitted, a coding end is generally required to code the point cloud, the coded point cloud is transmitted to a decoding end, and after the decoding end receives the coded point cloud, the coded point cloud can be decoded to reconstruct point cloud data of each point in the point cloud. In the existing point cloud coding, geometric residual information in point cloud data of each point in a point cloud needs to be coded, and the dynamic range of the point cloud is large, so that the geometric residual value is too large, the number of bits occupied by coding is too large, and the coding and decoding efficiency of the point cloud data can be reduced.
Disclosure of Invention
The embodiment of the application provides a point cloud processing method, a point cloud processing device and a point cloud processing medium, and the point cloud geometric coding and decoding efficiency can be improved.
An aspect of the present application provides a point cloud processing method, including:
acquiring coding mode information of the point cloud;
decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual information of the point to be decoded in each direction of the K directions; k is a positive integer;
determining first residual error information of the point to be decoded in each direction of the K directions based on second residual error information of the point to be decoded in each direction 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 reconstructing the geometric information of the point to be decoded according to the first residual information of the point to be decoded in each direction of the K directions.
An aspect of the present application provides a point cloud processing method, including:
determining encoding mode information of the point cloud;
acquiring first residual error information of a point to be coded in each direction of K directions in a point cloud; k is a positive integer;
determining second residual error information of the point to be coded in each direction of the K directions based on the first residual error information of the point to be coded in each direction 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;
and according to the coding mode information, coding second residual information of the point to be coded in each direction of the K directions.
An aspect of an embodiment of the present application provides a point cloud processing apparatus, including:
the acquisition module is used for acquiring the coding mode information of the point cloud;
the decoding module is used for decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual information of the point to be decoded in each direction of the K directions; k is a positive integer;
the decoding module is further used for determining first residual error information of the point to be decoded in each direction of the K directions based on second residual error information of the point to be decoded in each direction 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 reconstruction module is used for reconstructing the geometric information of the point to be decoded according to the first residual information of the point to be decoded in each direction of the K directions.
An aspect of an embodiment of the present application provides a point cloud processing apparatus, including:
the determining module is used for determining the encoding mode information of the point cloud;
the residual error information acquisition module is used for acquiring first residual error information of a point to be coded in each direction of K directions in the point cloud; k is a positive integer;
the residual error information acquisition module is also used for determining second residual error information of the point to be coded in each direction of the K directions based on the first residual error information of the point to be coded in each direction 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;
and the coding module is used for coding the second residual error information of the point to be coded in each direction of the K directions according to the coding mode information.
In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory is connected to 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 aspect in the embodiment of the present application.
An aspect of the embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, where the computer program is adapted to be loaded and executed by a processor, so as to enable a computer device with the processor to execute the method provided by the above aspect of the embodiments of the present application.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being 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 executes the computer instructions to cause the computer device to perform the method provided by the above-mentioned aspect.
In the embodiment of the application, in the point cloud decoding process, the encoding mode information of the point cloud can be obtained, the point to be decoded in the point cloud is decoded based on the encoding mode information, the second residual error information of the point to be decoded can be obtained, the first residual error information is further determined based on the second residual error information, the geometric information of the point to be decoded can be reconstructed through the first residual error information, and the first created residual error value in the second residual error information is smaller than or equal to the first residual error value in the first residual error information. In the point cloud decoding process, after the second residual information is obtained through decoding, the second residual information is subjected to inverse prediction through the relevance of the geometric residual information of the point to be decoded in the K directions, and the geometric decoding efficiency of the point cloud can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic architecture diagram of a point cloud processing system according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a frame for encoding a point cloud according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of determining bounding boxes for a point cloud provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an octree coding structure provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a prediction tree coding structure according to an embodiment of the present application;
FIG. 6 is a diagram of another prediction tree coding structure provided in the embodiments of the present application;
fig. 7 is a schematic flowchart of a point cloud processing method according to an embodiment of the present disclosure;
fig. 8 is a schematic flowchart of another point cloud processing method provided in the embodiment of the present application;
fig. 9 is a schematic structural diagram of a point cloud processing apparatus according to an embodiment of the present disclosure;
FIG. 10 is a schematic structural diagram of another point cloud processing apparatus provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application relates to a point cloud processing technology. A Point Cloud (Point Cloud) refers to a set of randomly distributed discrete points in space that represent the spatial structure and surface attributes of a three-dimensional object or scene. The point cloud may be classified into different categories according to different classification criteria, for example, into dense point cloud and sparse point cloud according to the acquisition manner of the point cloud, and for example, into static point cloud and dynamic point cloud according to the time sequence type of the point cloud.
Point Cloud Data (Point Cloud Data) is a specific record form of Point Cloud, and Point Cloud Data of each Point in the Point Cloud may include geometric information (e.g., three-dimensional position information) and attribute information; the geometric information of each point in the point cloud may refer to cartesian three-dimensional coordinate data of the point, and the attribute information of each point in the point cloud may include, but is not limited to, at least one of the following: color information, material information, laser reflection intensity information. Generally, each point in the point cloud may have the same amount of attribute information; for example, each point in the point cloud may have both color information and laser reflection intensity information; or each point in the point cloud can have three kinds of attribute information, namely color information, material information and laser reflection intensity information.
The acquisition route of the point cloud data may include, but is not limited to, at least one of the following: generated by a computer device. The computer device may generate point cloud data from the virtual three-dimensional object and the virtual three-dimensional scene. And secondly, obtaining the target through three-dimensional (3-Dimension, 3D) laser scanning. The point cloud data of a three-dimensional object or a three-dimensional scene in a static real world can be acquired through 3D laser scanning, and million-level point cloud data can be acquired every second. And measuring and obtaining through 3D photographic equipment. A visual scene of the real world is acquired by a 3D photographing apparatus (e.g., a set of cameras or a camera apparatus having a plurality of lenses and sensors) to acquire point cloud data of the visual scene of the real world, and a three-dimensional object or point cloud data of a three-dimensional scene in the dynamic real world is acquired by the 3D photographing apparatus. Acquiring point cloud data of the biological tissue organ through medical equipment. In the medical field, point cloud data of biological tissues and organs can be acquired through medical equipment such as Magnetic Resonance Imaging (MRI), Computed Tomography (CT), electromagnetic positioning information and the like.
The embodiment of the application can also be combined with technologies such as cloud computing and cloud storage in the cloud technology. The Cloud Computing (Cloud Computing) is a Computing mode, and 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 service according to needs, and the Cloud Computing can provide strong Computing support for a point Cloud encoding process and a point Cloud decoding process, thereby greatly improving the geometric encoding and decoding efficiency of the point Cloud.
The Cloud Storage (Cloud Storage) is a new concept extended and developed on the Cloud computing concept, the distributed Cloud Storage system (hereinafter referred to as a Storage system) is a Storage system which integrates a large number of Storage devices (Storage devices are also called as Storage nodes) of various types in a network through application software or application interfaces to cooperatively work through functions of cluster application, a grid technology, a distributed Storage file system and the like, and provides data Storage and service access functions to the outside, and the Cloud Storage can provide strong Storage support for a point Cloud encoding stage and a point Cloud decoding stage, so that the data Storage pressure of a point Cloud in the encoding and decoding process is reduced, and the data processing efficiency can be further improved.
Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a point cloud processing system according to an embodiment of the present disclosure. The point cloud system may include an encoding device and a decoding device. The encoding device may be an electronic device used by a provider of the point cloud, and the electronic device may be a terminal or a server; the decoding device may be an electronic device used by a user of the point cloud, and the decoding device may be a terminal or a server. The coding device and the decoding device can be connected through a wired or wireless communication mode, so that data transmission can be carried out between the coding device and the decoding device.
Among others, the terminal may include but is not limited to: smart phones, tablet computers, notebook computers, palm computers, Mobile Internet Devices (MID), wearable devices (e.g., smart watches, smart bracelets, etc.), smart voice interaction devices, smart appliances (e.g., smart televisions, etc.), vehicle-mounted devices, VR devices (e.g., VR helmets, VR glasses, etc.), and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform.
The point cloud processing process comprises a data processing process at the encoding device side and a data processing process at the decoding device side.
(1) And (3) acquiring point cloud data (geometric information and attribute information of each point in the point cloud).
The encoding device may acquire the point cloud data by acquiring a visual scene of the real world through the capturing device, or generate the point cloud data through the computer device, and the like, and the point cloud data obtained thereby may be referred to as a data source.
In one implementation, the capture device may be a hardware component disposed in the encoding device, e.g., the capture device is a camera, sensor, etc. of the terminal. The capturing device may also be a hardware apparatus connected to the encoding device, such as a camera connected to a server. The capture device is used for providing a content production device with a point cloud data acquisition service, and may include, but is not limited to, any one of the following: an image pickup apparatus, a sensing apparatus, a scanning apparatus; the camera equipment can comprise a common camera, a stereo camera, a light field camera and the like; the sensing device may include a laser device, a radar device, or the like; the scanning device may comprise a 3D laser scanning device or the like. The number of capturing devices may be multiple, the capturing devices being deployed at specific locations in real space to simultaneously capture point cloud data from different angles within the space, the captured point cloud data being synchronized both in time and space. In another implementation, the computer device may generate point cloud data from the virtual three-dimensional object and the virtual three-dimensional scene. Due to different acquisition modes of the point cloud data, the compression coding modes corresponding to the point cloud data acquired by different modes may be different.
(2) And (5) encoding and packaging the point cloud data.
An encoder in the encoding device may perform encoding processing on the Point Cloud data in a corresponding Point Cloud Compression (PCC) manner according to the type of the Point Cloud data, so as to obtain a compressed code stream of the Point Cloud data. The point cloud encoding method may include, but is not limited to: the Video-Audio codec (MPEG) is a Geometry-based Point Cloud Coding G-PCC (Geometry-based Point Cloud Compression) in the international Video-Audio codec (Moving Picture Expert Group) or a Point Cloud Coding AVS-PCC in the digital Video Coding Standard (AVS).
It should be noted that, because the point cloud data includes the geometric information and the attribute information of each point in the point cloud, the encoding device may encode the geometric information of each point in the point cloud through the encoder to obtain a geometric bit stream, and may encode the attribute information of each point in the point cloud to obtain an attribute bit stream, and the geometric bit stream and the attribute bit stream may 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 may be in one-to-one correspondence in sequence.
The encoding processing of the geometric information of each point in the point cloud is mainly directed at the geometric residual information of each point in the point cloud, and the geometric residual information can be residual values of each point in the point cloud in each direction (x, y, z direction) carrying symbols. The encoding process of the geometric residual information can be divided into an encoding process of unsigned residual values (which can be absolute values of residual values carrying signs) and an encoding process of residual sign bit information, that is, independent encoding of values and signs. The geometric bit stream obtained by the coding device can comprise the coding of the unsigned residual error value corresponding to each point in the point cloud and the coding of the residual error sign bit information corresponding to each point in the point cloud; in the geometric bit stream, coding of the unsigned residual value and coding of the residual sign bit information may be performed in a one-to-one correspondence order as well.
Optionally, the encoding device may further encapsulate the compressed code stream obtained by encoding to obtain one or more encapsulated files, where the one or more encapsulated files may be transmitted to the decoding device through an output interface in the encoding device, or may be transmitted to the storage module for storage.
(3) And (3) unpacking and decoding the encapsulated file of the point cloud data.
The decoding device may retrieve the one or more encapsulated files transmitted by the output interface of the encoding device through the input interface or retrieve the one or more encapsulated files from the storage module. The de-encapsulation process of the encapsulated file by the decoding equipment is opposite to the file encapsulation process of the decoding equipment, and the decoding equipment de-encapsulates the encapsulated file of the point cloud according to the file format requirement of the point cloud to obtain a compressed code stream. The decoding process of the decoding device is the inverse of the encoding process of the encoding device, and the decoding device decodes the geometric bit stream in the compressed code stream and decodes the attribute bit stream in the compressed code stream to reconstruct the point cloud data of each point in the point cloud. The decoding process of the geometric bit stream by the decoding device can resolve the coding of residual sign bit information and resolve the coding of residual values without signs. Wherein the decapsulating of the encapsulated file and the decoding of the encoded bitstream may be performed by a decoder in the decoding device.
(4) And (5) a point cloud data rendering process.
The decoding equipment can render the point cloud obtained by decoding the compressed code stream, and the visual scene corresponding to the point cloud is presented after the rendering is finished; wherein the rendered content can be presented in a display module in the decoding device.
It can be understood that different encoding modes may have different encoding frames, and the present application relates to a geometric information encoding process in point cloud encoding, and may be applied to all point cloud encoding modes related to geometric information encoding, which is not limited in the present application.
For the convenience of understanding, the following description will be made of the encoding framework of G-PCC by taking the G-PCC encoding manner as an example. As shown in fig. 2, the G-PCC may be divided into a geometry information encoding process and an attribute information encoding process. In the process of encoding the geometric information, encoding the geometric information of each point in the point cloud to obtain a geometric bit stream; in the process of encoding the attribute information, encoding 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 jointly form a compressed code stream of the point cloud.
For the geometric information encoding process, the main operations and processes thereof can be referred to as the following descriptions:
preprocessing (Pre-Processing): coordinate transformations (Transform Coordinates) and voxelization (Voxelize) may be included. And converting the point cloud data in the three-dimensional space into an integer form through operations of scaling and translation, and moving the minimum geometric position of the point cloud data to the coordinate origin.
② geometric encoding (geometrical encoding): two patterns, namely Octree-based geometric coding (Octree) and triangular representation-based geometric coding (Trisoup), can be included in the geometric coding, and the two coding patterns can be used under different conditions. Wherein:
OctreeImage-based geometric coding: the octree is a tree-shaped data structure, in which a predetermined bounding box is uniformly divided in three-dimensional space division, and each node has eight child nodes. Whether each child node of the octree is occupied or not is indicated by '1' and '0', and occupied Code information (Occupancy Code) is obtained as a Code stream of point cloud geometric information. The bounding box may refer to a minimum cuboid containing all points in the point cloud, and a specific implementation manner of the bounding box may refer to the description in the embodiment corresponding to fig. 3; the coding structure of the octree can be seen from the description of the corresponding embodiment in fig. 4.
Geometric coding based on triangular representation: the point cloud is divided into blocks (blocks) with certain sizes, intersection points of the surface of the point cloud on the edges of the blocks are located, and a triangle is constructed. Compression of the geometric information is achieved by encoding the intersection positions.
(iii) geometric quantification: the Quantization fineness is usually determined by a Quantization Parameter (QP), and the larger the value of QP is, the larger the value range of coefficient will be quantized into the same output, thereby generally causing larger distortion and lower code rate; conversely, the smaller the QP value is, the smaller the value range of the coefficient is quantized to the same output, which usually results in smaller distortion and higher code rate. In the point cloud encoding process, geometric quantization may be implemented by coordinate information of each point in the point cloud, as shown in fig. 2, and the geometric quantization may be implemented by a constructed geometric prediction tree.
Fourthly, geometric Entropy coding (Geometry Encoding): and (3) performing statistical compression coding on the occupied code information of the octree, and finally outputting a binary (0 or 1) compressed code stream. The statistical coding is a lossless coding mode, and can effectively reduce the code rate required by expressing the same signal. A commonly used statistical Coding method is context-based Binary Arithmetic Coding (CABAC), such as the geometric Arithmetic Coding shown in fig. 2.
For the attribute information encoding process, the main operations and processes thereof can be described as follows:
attribute re-coloring (Recoloring): in the case of lossy encoding, after the geometric information is encoded, an encoding end (which may also be referred to as an encoding device) is required to decode and reconstruct the geometric information, that is, to recover the geometric information of each point in the point cloud. And searching attribute information corresponding to one or more adjacent points in the original point cloud to serve as the attribute information of the reconstruction point.
Second attribute Transform coding (Transform): the attribute Transform coding may include three modes, namely, predictive Transform (predictive Transform), Lifting Transform (Lifting Transform), and Hierarchical Adaptive Transform (RAHT), which may be used under different conditions. Wherein:
predictive transform coding: and selecting a sub-point set according to the distance, dividing the point cloud into a plurality of different levels (LoD), and realizing the point cloud representation from coarse to fine. The prediction from bottom to top can be realized between adjacent layers, namely, the attribute information of the introduced points in the fine layer is predicted by the adjacent points in the coarse layer, and the corresponding residual signals are obtained. And encoding the point cloud data of the bottommost layer as reference information.
Lifting transform coding: on the basis of LoD adjacent layer prediction, a weight updating strategy of neighborhood points is introduced, and finally, the prediction attribute values of all points are obtained, and corresponding residual signals are obtained.
Layered region adaptive transform coding: the attribute information is subjected to a RAHT transform to convert the signal into a transform domain, referred to as transform coefficients. The RAHT transformation is carried out on the basis of a hierarchical structure obtained by octree division of point cloud data in point clouds, and the transformation is carried out in a layered mode from the bottom layer of the octree.
Third, Attribute information quantification (Attribute quantification): the degree of refinement of the quantization is generally determined by the quantization parameter. In the predictive transform coding and the lifting transform coding, entropy coding is carried out on the quantized residual error value; in the RAHT transform, quantized transform coefficients are entropy-encoded.
Attribute Entropy Coding (Attribute Entropy Coding): the quantized attribute residual signal or transform coefficient generally uses Run Length Coding (Run Length Coding) and Arithmetic Coding (arithmetric Coding) to achieve final compression. And the corresponding information such as the coding mode, the quantization parameter and the like is also coded by adopting an entropy coder. As shown in fig. 2, the attribute entropy coding may employ attribute arithmetic coding, that is, encoding the quantized attribute residual signal or transform coefficient using arithmetic coding.
Based on the 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 code stream composed of a geometric bit stream and an attribute bit stream is generated. The compressed code stream may be transmitted to a decoding end (decoding device), and the point cloud decoding process of the decoding end may be described as follows:
point cloud decoding refers to a process of decoding a compressed code stream obtained by point cloud coding to reconstruct point cloud; specifically, point cloud decoding refers to a process of reconstructing geometric information and attribute information of each point in a point cloud based on a geometric bit stream and an attribute bit stream in a compressed code stream. After the decoding end obtains the compressed code stream, the entropy decoding is firstly carried out on the geometric bit stream to obtain the geometric information of each point in the point cloud after quantization, then the inverse quantization is carried out, and the geometric information of each point in the point cloud is reconstructed. For the attribute bit stream, firstly, entropy decoding is carried out to obtain prediction residual information or quantized transformation coefficients of each point in the point cloud after quantization; and then inverse quantization is carried out on the quantized prediction residual information to obtain reconstructed residual information, inverse quantization is carried out on the quantized transformation coefficient to obtain a reconstructed transformation coefficient, the reconstructed transformation coefficient is subjected to inverse transformation to obtain reconstructed residual information, and attribute information of each point in the point cloud can be reconstructed according to the reconstructed residual information of each point in the point cloud. And (4) corresponding the attribute information reconstructed at each point in the point cloud to the reconstructed geometric information one by one according to the sequence to reconstruct the point cloud.
In the point cloud processing scheme provided in the embodiment of the present application, in the process of encoding geometric information as shown in fig. 2, secondary prediction may be performed on a geometric residual signal (which may be referred to as second residual information) generated by a geometric prediction tree, that is, based on the information relevance of the geometric residual signal encoded by the prediction tree, the value of residual coding is reduced as much as possible, and the geometric coding efficiency is improved without affecting point cloud single-point reconstruction. Similarly, the point cloud processing scheme provided by the embodiment of the application is also suitable for a decoding end, and the geometric decoding efficiency can be improved.
The following describes a basic technology related to a point cloud processing method provided by an embodiment of the present application:
(1) pretreatment:
the coordinates of the floating point type of each point in the input point cloud are represented as (x) n ,y n ,z n ) N is 0, …, N-1, N is the number of points in the point cloud, coordinate point (x) min ,y min ,z min ) And coordinate point (x) max ,y max ,z max ) Is represented as follows:
x min =min(x 0 ,x 1 ,…,x N-1 )
y min =min(y 0 ,y 1 ,…,y N-1 )
z min =min(z 0 ,z 1 ,…,z N-1 )
x max =max(x 0 ,x 1 ,…,x N-1 )
y max =max(y 0 ,y 1 ,…,y N-1 )
z max =max(z 0 ,z 1 ,…,z N-1 )
wherein the function min(s) 0 ,s 1 ,…,s N-1 ) Means to take the minimum value, max(s), of N points included in the currently input point cloud 0 ,s 1 ,…,s N-1 ) The representation is the maximum value of N points included in the currently input point cloud, where s may be any coordinate value of coordinate x, coordinate y, and coordinate z.
Referring to fig. 3, fig. 3 is a schematic diagram of determining a bounding box of a point cloud according to an embodiment of the present disclosure. As shown in FIG. 3, a bounding box may be used to represent the smallest cuboid that can contain all the points in the input point cloud, the origin coordinate (x) of the bounding box origin ,y origin ,z origin ) The following can be calculated:
x origin =int(floor(x min ))
y origin =int(floor(y min ))
z origin =int(floor(z min ))
the dimensions of the bounding box in the x, y, z directions can be calculated as follows:
BoudingBoxSize x =int(x max -x origin )+1
BoudingBoxSize y =int(y max -y origin )+1
BoudingBoxSize z =int(z max -z origin )+1
where int(s) is the rounding function, floor(s) returns the largest integer value less than or equal to s.
(2) Octree coding:
octree is a tree data structure, and at present, the G-PCC or AVS-PCC mainly adopts the octree structure to divide point cloud. For point cloud data in a three-dimensional space, an octree division mode is to uniformly divide a preset bounding box layer by layer, and each node is provided with eight sub-nodes. And indicating whether each child node in the octree is occupied or not by adopting 1 and 0.
Referring to fig. 4, fig. 4 is a schematic diagram of an octree coding structure according to an embodiment of the present disclosure. By dividing the bounding box containing all the points in the point cloud to obtain the octree corresponding to the point cloud, as shown in the area 40a shown in fig. 4, each sub-area in the area 40a can be regarded as a child node of the octree, and the filled sub-area can be used to indicate that the child node is occupied, and thus can be represented as "1"; an unfilled sub-region may be used to indicate that the child node is unoccupied and may therefore be denoted as "0".
As shown in fig. 4, node 1, node 2, and node 3 in the area 40a are occupied nodes, and the occupied code information "10000001" can be obtained by dividing node 1; by dividing the node 2, the occupancy code information "00011000" can be obtained; by dividing the node 3, the occupied code information "10001000" can be obtained. The obtained code occupation information can be used as a code stream of the point cloud geometric information.
The construction of the octree is realized based on Morton order (Morton), namely, the three-dimensional coordinate information of the point cloud data is converted into corresponding Morton codes by inquiring a Morton order table. And obtaining the corresponding points of each layer of octree according to the sequence of each Morton code. The mainstream point cloud coding technology at present is to use octree partitioning to represent point cloud data, and different processing flows can be adopted for geometric information and attribute information.
(3) TSP (tracking Salesman publishing, traveler Problem):
the TSP problem is a classical combinatorial optimization problem. A classical TSP may be described as: a salesperson going to several cities to market goods needs to go from one city, go through all cities and return to the place of departure. How the travel route should be selected to minimize the total travel. From the point of view of graph theory, the problem is essentially to find a loop with the smallest weight in a weighted completely undirected graph. Since the feasible solution of the problem is the full arrangement of all vertices, combined explosion is generated as the number of vertices increases, which is a complete NP (Non-deterministic complex problem of Polynomial complexity), and is widely applied in the fields of transportation, circuit board circuit design, logistics distribution, and the like. Early researchers used precision algorithms to solve this problem, common methods include: branch-and-bound method, linear programming method, dynamic programming method, etc. However, as the scale of the problem increases, the precise algorithm becomes useless, so that in subsequent research, scholars at home and abroad mainly use an approximate algorithm or a heuristic algorithm, mainly including a genetic algorithm, a simulated annealing method, an ant colony algorithm, a tabu search algorithm, a greedy algorithm, a neural network and the like, and the application does not limit the algorithm.
For example, modeling a TSP with an undirected weighted graph, a city is the vertex of the graph, a road is the edge of the graph, and the distance of the road is the length of the edge. It is a minimization problem with starting and ending points at a particular vertex, visiting each vertex exactly once. Typically, the model is a full graph (i.e., each pair of vertices is connected by an edge). If no path exists between two cities, a very long edge is added to complete the graph without affecting the calculation of the optimal loop.
In the symmetric TSP problem, the distance back and forth between two cities is equal, forming an undirected graph. This symmetry reduces the number of solutions by half. In the asymmetric TSP problem, paths that are not bidirectional may not all exist, or the distances to and from are different, forming a directed graph. Traffic accidents, one-way roads and departure and arrival of certain city tickets at different prices, etc., are examples of breaking this symmetry.
(4) Predictive coding techniques:
the predicted relationship between the corresponding signals can be generated using the aforementioned TSPs. 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 the closest points one by one in a limited range to link based on the information of the starting point until all the points are linked to form a prediction tree with a single chain structure; and arranging the disordered point clouds into an ordered structure based on a prediction tree, and coding a residual value of each point by taking a signal value of a previous point or a plurality of points as a predicted value.
The method is used as an option for point cloud prediction, and can be set to act on the whole original point cloud, or can act on octree sub-nodes or point cloud data subsets obtained in other ways; in other words, the prediction tree in the embodiment of the present application may correspond to all points of the point cloud, or correspond to a single child node in the octree, or correspond to a partial point cloud data subset in the point cloud determined in any other manner, which is not limited in the present application.
The existing predictive coding technology in the G-PCC utilizes the distance search between points to establish a predictive tree. As shown in fig. 5, fig. 5 is a schematic diagram of a prediction tree coding structure provided in an embodiment of the present application; the prediction tree coding structure shown in fig. 5 may be a prediction tree coding structure in AVS, and the prediction tree shown in fig. 5 is a single-chain prediction tree (including a root node and a leaf node, and the nodes except the leaf node all have only one child node).
Referring to fig. 6, fig. 6 is a schematic diagram of another coding structure of a prediction tree according to an embodiment of the present application; the prediction tree coding structure shown in fig. 6 may be a prediction tree coding structure in MPEG, and the prediction tree shown in fig. 6 is a multi-chain prediction tree (including one root node and a plurality of leaf nodes, and the remaining nodes except the leaf nodes may have one or more child nodes, such as a branch node having one child node, a branch node having two child nodes, a branch node having three child nodes, etc.).
Each node in the prediction tree coding structure is connected with other nodes and indicates the number of points linked by each node and one of four prediction modes, wherein the four prediction modes are as follows:
1) it is not predicted.
2) Predicting by using parent points (generation father nodes), namely performing differential prediction by using a previous node; as with node 60d shown in FIG. 6, node 60c is the parent point for node 60 d.
3) Predicting by using parent points (generation father nodes) and grandparent points (generation father nodes); as shown for node 60d in FIG. 6, node 60c is the parent point for node 60d, and node 60b is the grandparent point for node 60 d.
4) Predicting by using a parent point (a generation father node), a grandparent point (a generation father node) and a grand-grandparent point (a generation father node); as for node 60d shown in fig. 6, 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 60 d.
(5) An entropy coding technique.
Entropy coding techniques are used to binarize and process the quantized (lossy case) signed property prediction residual or transform coefficients; the entropy coding technique may include, but is not limited to, variable length coding, CABAC. Wherein:
1) variable length coding: and adopting code words with different lengths to represent residual errors or coefficients needing to be coded. The code length needs to be designed according to the probability of symbol occurrence. Commonly used include exponential Golomb coding (exp-Golomb) and arithmetic coding.
2) CABAC: CABAC may include several steps:
binary processing: CABAC uses binary arithmetic coding, which means that only two numbers (1 or 0) are coded. A non-binary numerical sign, such as a transform coefficient or motion vector, is first binarized or converted into binary codewords before arithmetic coding. This process is similar to converting a value into a variable length codeword, but the binary codeword is further encoded by an arithmetic encoder prior to transmission.
Selecting a context model: the context model is a probabilistic model that is a model selected based on statistics of the most recent data symbols being encoded. This model preserves the probability that each "bin" is either a1 or a 0.
③ arithmetic coding: the arithmetic coder encodes each "bin" according to the selected probability model.
Probability updating: the selected context model is updated according to the actual encoding value. For example, if the value of "bin" is 1, then the frequency count of 1 would be increased.
Before describing a specific implementation flow of a point cloud processing scheme, a syntax table related to the embodiment of the present application is introduced, where the syntax table is shown in table 1 below:
TABLE 1
Figure BDA0003701628060000141
Taking the encoding process of the point cloud as an example, the semantics of the syntax table shown in table 1 are as follows: nodeIdx is used to indicate the current point to be encoded in the point cloud, or may be understood as geometric residual information (e.g., second residual information) of the current point to be encoded generated by the geometric prediction tree; i is used to indicate the ith direction of the point to be encoded.
ptn _ residual _ eq _ 0_ flag (residual value flag field) for indicating whether or not the current residual value (residual value in the ith 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 nonzero value.
ptn _ residual _ sign _ flag for indicating 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 a negative number, and when the ptn _ residual _ sign _ flag is set to 1, it indicates that the current residual value is a non-negative number.
The ptn _ residual _ numbits is used to indicate the number of bits occupied by the current value to be coded, which may be the current residual value or a quotient value obtained by performing a remainder calculation (e.g., dividing by 2) on the current residual value.
A ptn _ residual _ value _ per (occupied bit value field) is used to indicate the value of each bit in the number of occupied bits.
Referring to fig. 7, fig. 7 is a schematic flow chart of a point cloud processing method according to an embodiment of the present disclosure. It is to be understood that the point cloud processing method may be performed by a computer device, which may be the decoding device shown in fig. 1, and thus corresponds to the decoding method. As shown in fig. 7, the point cloud processing method may include the following steps S101 to S104:
step S101, acquiring the encoding mode information of the point cloud.
In the point cloud decoding process, encoding mode information of the point cloud may be acquired, the encoding mode information may include an encoding mode of a point to be decoded in the point cloud, the point to be decoded may be a point in the point cloud that has not been decoded yet, and a multi-dimensional space coordinate of the point to be decoded may be a three-dimensional space coordinate (including x, y, and z directions). Therefore, the coding mode of the point to be decoded can be regarded as the coding mode of the point to be decoded in K directions, where K may be a positive integer, for example, K may take a value of 1, 2, 3, … …; the encoding modes of the points to be decoded in the K directions may be the same or different, which is not limited in this application. For convenience of understanding, in the embodiment of the present application, a value K is 3 (including x, y, and z directions in a three-dimensional space coordinate, where the x direction may also be referred to as an abscissa direction, the y direction may be referred to as an ordinate direction, and the z direction may be referred to as an ordinate direction), and an encoding mode of a point to be decoded in each direction is the same.
The obtaining method of the coding mode information may include, but is not limited to, any of the following:
(1) the encoding end (encoding device) and the decoding end (decoding device) default to the same encoding mode for all points in the point cloud. Specifically, a default coding mode which is negotiated and set by a decoding end and a coding end is obtained, and the default coding mode is determined as coding mode information of a point to be decoded in a point cloud; the default coding mode is a coding mode of a point to be decoded in the point cloud and is also a coding mode common to all points in the point cloud.
(2) The corresponding encoding mode information is parsed from the encoding parameter set or encoding code stream of the point cloud (which may be the aforementioned geometric bit stream). Specifically, the encoding parameter set or the encoding code stream of the point cloud may be analyzed to obtain an encoding mode of the point to be decoded in the point cloud, and the encoding mode of the point to be decoded is determined as encoding mode information of the point cloud. When the coding parameter set contains mode information, the decoding end needs to analyze the coding parameter set to obtain the coding mode information of the point to be decoded; when the coding parameter set does not contain mode information, the coding code stream is directly analyzed to obtain the coding mode information of the point to be decoded.
(3) And the default judgment threshold values of the encoding end and the decoding end or the corresponding judgment threshold values are analyzed from the encoding parameter set or the encoding code stream of the point cloud, and the corresponding encoding mode information is judged. Specifically, the decision threshold may be determined by negotiation between the encoding end and the decoding end, or the decision threshold is obtained by parsing from a set of encoding parameters or a stream of encoding codes of the point cloud. Wherein:
when the threshold value is judged to comprise a first threshold value (default parameters t1, t1>0), acquiring statistical characteristic information corresponding to residual analysis information of the point to be decoded, determining an encoding mode of the point to be decoded based on a numerical comparison relation between the statistical characteristic information and the first threshold value, and determining the encoding mode of the point to be decoded as encoding mode information.
The residual analysis information of the point to be decoded may be second residual information of the point to be decoded obtained through analysis, or first residual information of the point to be decoded obtained through analysis, which is not limited in the present application. The second residual information in the decoding method corresponds to residual information obtained by the encoding method of the present invention (described in detail below), and the first residual information is obtained by inverse-predicting the second residual information. The first residual information in the encoding method may refer to real residual information obtained by a geometric prediction tree in a corresponding encoding process, and the second residual information may refer to residual information obtained after secondary prediction is performed by using relevance of the first residual information in each direction.
The statistical characteristic information may include, but is not limited to: the average value of the residual analysis information of the point to be decoded in the K directions, the minimum value of the residual analysis information of the point to be decoded in the K directions, the maximum value of the residual analysis information of the point to be decoded in the K directions and the like. For example, when the statistical property information is smaller than the first threshold, the encoding mode of the point to be decoded (such as any one of full index method, non-zero full index method, one-way index method, and non-zero one-way index method) may be determined.
When the judgment threshold comprises a second threshold (default parameters t2, t2>0), acquiring side length ratio information corresponding to the bounding box of the point cloud, determining the coding mode of the point to be decoded based on the numerical comparison relationship between the side length ratio information and the second threshold, and determining the coding mode of the point to be decoded as coding mode information; the bounding box is used to characterize the smallest cuboid containing all the points of the point cloud. The bounding box may refer to a bounding box corresponding to a geometric prediction tree, and when the geometric prediction tree is a prediction tree of the entire point cloud, the bounding box may include all points of the point cloud; when the geometric prediction tree is a prediction tree of a certain node in the octree, the bounding box may include a point corresponding to the node, and the like.
In one or more embodiments, the side length information of the bounding box may be represented as [ BBx, BBy, BBz ], BBx represents side length information in the x direction, BBy represents side length information in the y direction, and BBz represents side length information in the z direction. For example, if BBx/BBz > t2 or BBy/BBz > t2, it may be determined that the encoding mode of the point to be decoded is a unidirectional index in the z-direction or a non-zero unidirectional index method, or the like.
When the judgment threshold comprises a third threshold (default parameter t3, t3>0) and a fourth threshold (default parameter t4, t4>0), determining a threshold condition range based on the third threshold and the fourth threshold, determining the coding mode of the point to be decoded in each direction of the K directions according to the membership between the quantization parameter of the point to be decoded and the threshold condition range, and determining the coding mode of the point to be decoded as the coding mode information. Wherein, the threshold condition range may 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 smaller than t3, or the quantization parameter is larger than t4, or both, it indicates that the quantization parameter belongs to the threshold condition range, and the coding mode of the point to be decoded (e.g., any one of full index method, non-zero full index method, one-way index method, and non-zero one-way index method) can be determined.
And S102, decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual error information of the point to be decoded in each direction of the K directions.
Decoding processing can comprise residual value decoding and residual symbol decoding, and according to the coding mode information, residual value decoding is carried out on the point to be decoded in the point cloud to obtain a second residual value of the point to be decoded in each direction of K directions; carrying out residual error symbol decoding on the point to be decoded to obtain residual error symbol bit information of the point to be decoded in each direction of K directions; and determining second residual error information of the point to be decoded in each direction of the K directions based on the second residual error value of the point to be decoded in each direction of the K directions and the residual error sign bit information of the point to be decoded in each direction of the K directions. The second residual information may be residual information obtained by performing geometric entropy decoding on the encoded code stream of the point cloud.
It should be noted that, the residual value decoding and the residual symbol decoding are performed independently, and the residual symbol decoding may be processed in the process of performing step S102; or the decoding process in step S102 may be decoding only the residual values, and the residual symbol decoding may be processed in the course of performing step S103; or the residual symbol decoding may be performed after step S103 is performed, and the decoding timing of the residual symbol decoding is not limited in the present application.
In one or more embodiments, in a case that the residual value is zero according to the encoding mode information, for example, the point to be decoded is encoded as specific identification information in the ith direction (for indicating that the residual value of the point to be decoded in the ith direction is 0), and based on the identification information, the residual value of the point to be decoded in the ith direction may be obtained through parsing, that is, the prediction geometric information may be directly used as the point to be decoded to reconstruct the geometric information in the ith direction, where i is a positive integer less than or equal to K.
Wherein, the decoding process of the residual error value of the point to be decoded may include: based on a residual value flag field (ptn _ residual _ eq0_ flag) in the encoding mode information, a non-zero direction of a point to be decoded in the point cloud in K directions may be determined; the non-zero direction may refer to a direction in which a residual value of a current point to be decoded in the direction is not zero, and when a residual value of the point to be decoded in the direction is zero, the direction may be referred to as a zero direction. For example, when the residual value flag field of the point to be decoded in the ith direction is set to a target value (e.g., value 1), it may be determined that the ith direction is a non-zero direction; when the residual value flag field of the point to be decoded in the ith direction is set to a non-target value (e.g., a value of 0), it may indicate that the residual value of the point to be decoded in the ith direction is zero, and the ith direction may be determined to be a zero direction. The zero direction may also be considered as the rest of the K directions except the zero direction, and the second residual value of the point to be decoded in the zero direction may default to 0, that is, in the residual value decoding process, the second residual value of the point to be decoded in the non-zero direction is mainly targeted.
Based on the coding mode information, a target bit number B occupied by the point to be decoded in the non-zero direction may be determined, and the target bit number B occupied may be a bit number originally occupied by the second residual value. And analyzing an occupied bit value field (ptn _ residual _ value _ per) of the point to be decoded in the non-zero direction bit by bit based on the target occupied bit number B to obtain a second residual value A' of the point to be decoded in the non-zero direction. For example, if the ith direction is a non-zero direction (i is less than or equal to K), after the target occupied bit number B of the point to be decoded in the ith direction is obtained through parsing, the second residual value a' [ i ] of the point to be decoded in the ith direction can be obtained by parsing the ptn _ residual _ value _ per [ i ] bit by bit.
It is understood that the first reconstructed residual value of the point to be decoded in the zero direction may default to 0, and then after obtaining the first reconstructed residual value of the point to be decoded in the non-zero direction, it also means that the second residual value of the point to be decoded in each of the K directions has been obtained.
In one or more embodiments, for a point to be decoded, the number of non-zero directions corresponding to the point to be decoded may be denoted as M1, where M1 is a positive integer less than or equal to K, and M1 may also be considered as the number of non-zero residual values in residual values (where the residual value may refer to a second residual value) of the point to be decoded in each of the K directions.
The process of determining the target occupied bit number B of the point to be decoded in the non-zero direction based on the coding mode information may include: the occupied bit number fields (ptn _ residual _ bits) of the point to be decoded in the M1 non-zero directions are sequentially analyzed, and the candidate occupied bit number B' of the point to be decoded in the M1 non-zero directions can be obtained. Wherein, the candidate occupied bit number B' may be regarded as the bit number actually occupied by the second residual value in the encoding process; when the K directions include x, y, and z directions, the number of bits of the candidate occupied bits of the point to be decoded in each of the K directions may be denoted as B 'x, B' y, and B 'z, where B' x may represent the number of bits of the candidate occupied bits of the point to be decoded in the x direction, B 'y may represent the number of bits of the candidate occupied bits of the point to be decoded in the y direction, and B' z may represent the number of bits of the candidate occupied bits of the point to be decoded in the z direction. It is understood that if the x direction of the K directions is a zero direction, and the y and z directions are non-zero directions, it can be determined that the candidate occupied bit number B ' x is zero, and B ' y and B ' z are non-zero values.
Further, the target occupied bit number B of the point to be decoded in the non-zero direction may be determined according to the candidate occupied bit number B' of the point to be decoded in the non-zero direction, and the implementation manner may include, but is not limited to, any one of the following:
(1) the candidate occupied bit number B 'obtained by analysis is the target occupied bit number B, i.e. B ═ B'. For example, for the non-zero direction ith direction, the candidate occupied bit number B '[ i ] in the ith direction may be the target occupied bit number B [ i ] in the ith direction, that is, B [ i ] ═ B' [ i ].
(2) And adopting a non-zero full index method to determine the target bit number B occupied by the point to be decoded in the non-zero direction. Specifically, the bit index flag field (minBitFlag) corresponding to the to-be-decoded point may be parsed based on the number M1 of the non-zero directions to obtain a first non-zero direction indicated by a minimum occupied bit number B 'min, where the minimum occupied bit number B' min may be a minimum value of M1 candidate occupied bit numbers corresponding to the to-be-decoded point, and the specific steps may be described as follows:
when M1 is equal to K, a bit index flag field (minBitFlag) is parsed, where the bit index flag field may be used to indicate a first non-zero direction corresponding to a minimum occupied bit number B' min, and the bit index flag field at this time needs to occupy 2 bits.
If the bit index identification bit field corresponding to the to-be-decoded point is a first identification value (minBitFlag ═ 00), determining that a first non-zero direction indicated by the minimum occupied bit number B' min is an abscissa direction (x direction); that is, minBitFlag is 00 and B ' min is B ' x, when the first non-zero direction indicated by B ' min is the x-direction.
If the bit index identification bit field corresponding to the to-be-decoded point is the second identification value (minBitFlag ═ 01), determining that the first non-zero direction indicated by the minimum occupied bit number B' min is the ordinate direction (y coordinate); that is minBitFlag is 01 and B ' min is B ' y, when the first non-zero direction indicated by B ' min is the y-direction.
If the bit index identification bit field corresponding to the to-be-decoded point is a third identification value (minBitFlag ═ 10), determining that a third non-zero direction indicated by the minimum occupied bit number B' min is a vertical coordinate direction (z direction); that is, minBitFlag is 10, and B ' min is B ' z, when the first non-zero direction indicated by B ' min is the z-direction.
When M1 is K-1, parsing a bit index flag minBitFlag, where the bit index flag minBitFlag may be used to indicate a first non-zero direction corresponding to the minimum occupied bit number B' min, and the bit index flag field at this time needs to occupy 1 bit.
If the M1 non-zero directions include a vertical coordinate direction and a vertical coordinate direction (the x direction is a zero direction), and a bit index flag field corresponding to the point to be decoded is a fourth flag value (minBitFlag ═ 0), determining that the first non-zero direction indicated by the minimum occupied bit number B' min is the vertical coordinate direction; if the M1 non-zero directions include a vertical coordinate direction and a vertical coordinate direction (the x direction is a zero direction), and a bit index flag field corresponding to the to-be-decoded point is a fifth flag value (minBitFlag ═ 1), determining that a first non-zero direction indicated by the minimum occupied bit number B' min is the vertical coordinate direction; that is, B 'x is 0(x direction is zero direction, y and z directions are non-zero directions), minBitFlag is 0 (fourth flag value), and B' min is B 'y, where the first non-zero direction indicated by B' min is y direction; minBitFlag is equal to 1 (fifth identification value), and B ' min is equal to B ' z, where the first non-zero direction indicated by B ' min is the z-direction.
If the M1 non-zero directions include an abscissa direction and an ordinate direction (the y direction is a zero direction), and a bit index flag field corresponding to the point to be decoded is a fourth flag value (minBitFlag ═ 0), determining that the first non-zero direction indicated by the minimum occupied bit number B' min is the abscissa direction; if the M1 non-zero directions include an abscissa direction and an ordinate direction (the y direction is a zero direction), and a bit index flag bit field corresponding to the point to be decoded is a fifth flag value (minBitFlag ═ 1), determining that the first non-zero direction indicated by the minimum occupied bit number B' min is the ordinate direction; that is, B 'y is 0 (the y direction is the zero direction, and the x and z directions are the non-zero directions), minBitFlag is 0 (the fourth flag value), B' min is B 'x, and the first non-zero direction indicated by B' min is the x direction; minBitFlag is equal to 1 (fifth identification value), and B ' min is equal to B ' z, where the first non-zero direction indicated by B ' min is the z-direction.
If the M1 non-zero directions include an abscissa direction and an ordinate direction (the z direction is a zero direction), and a bit index flag bit field corresponding to the point to be decoded is a fourth flag value (minBitFlag ═ 0), determining that the first non-zero direction indicated by the minimum occupied bit number B' min is the abscissa direction; if the M1 nonzero directions include an abscissa direction and an ordinate direction, and a bit index flag field corresponding to the to-be-decoded point is a fifth flag value (minBitFlag ═ 1), determining that a first nonzero direction indicated by the minimum occupied bit number B' min is the ordinate direction; that is, B 'z is 0(z direction is zero direction, x and y directions are non-zero directions), minBitFlag is 0 (fourth flag value), B' min is B 'x, and the first non-zero direction indicated by B' min is x direction; minBitFlag is equal to 1 (the fifth flag value), B ' min is equal to B ' y, and the first non-zero direction indicated by B ' min is the y direction.
③ when M1< K-1, the bit index flag minBitFlag is not parsed. Specifically, when M1 is less than K-1, the parsing of the bit index identification bit field corresponding to the point to be decoded is stopped, and the candidate occupied bit number B' of the point to be decoded in the M1 non-zero directions is determined as the target occupied bit number B of the point to be decoded in the M non-zero directions.
Further, the sum of the remaining non-zero directions (second non-zero directions) except the first non-zero direction and the minimum occupied bit number B 'min is calculated as a target occupied bit number B in the second non-zero direction, that is, B ═ B' + B 'min, where the target occupied bit number B in the first non-zero direction is the corresponding candidate occupied bit number B'. Specifically, the remaining nonzero directions except the first nonzero direction among the M1 nonzero directions may be determined as second nonzero directions, the target occupied bit number of the point to be decoded in the first nonzero direction is determined based on the minimum occupied bit number B ' min, and if a value e may be added on the basis of the minimum occupied bit number B ' min, that is, B ' min + e may be represented as the target occupied bit number in the first nonzero direction, and e may be 1 or other values, which is not limited in the present application; and determining the sum of the candidate occupied bit number of the point to be decoded in the second non-zero direction and the minimum occupied bit number B ' min as a target occupied bit number B (B ═ B ' + B ' min) of the point to be decoded in the second non-zero direction. For the sake of understanding, the embodiment of the present application is described by taking the value of e as 1 as an example.
It should be noted that, the method for determining the target occupied-bit number B by the candidate occupied-bit number B' may further include a full index method, a one-way index method, a non-zero one-way index method, and the like, besides the foregoing methods, and the implementation steps of these methods may be referred to the description in the subsequent step S103, and are not described herein again.
In one or more embodiments, taking the ith direction of the M1 non-zero directions as an example, assuming that the encoding mode in the encoding mode information indicates that the current point to be decoded is in the ith direction, the encoding mode is a mode in which the second residual value of the point to be decoded in the ith direction is subjected to remainder calculation and then encoded (for ease of understanding, it may be referred to as a first remainder encoding mode), and the residual value decoding process in the first remainder encoding mode may include: analyzing the occupied bit number field (ptn _ residual _ numbits [ i ]) of the point to be decoded in the ith direction to obtain a target occupied bit number Bi (the target occupied bit number Bi can be determined in any one of the manners described above) of the point to be decoded in the ith direction; analyzing the value of B [ i ] bit (the value of B [ i ] bit ptn _ residual _ value _ per [ i ]) in the occupied bit value field of the point to be decoded in the ith direction to obtain the residual quotient A1[ i ] of the point to be decoded in the ith direction; analyzing a residual remainder field (ptn _ residual _ abs _ remaining [ i ]) corresponding to the point to be decoded in the ith direction to obtain a residual remainder A2[ i ] of the point to be decoded in the ith direction; and determining a second residual value A' [ i ] (A [ i ]: A1[ i ] × d + A2[ i ]) of the point to be decoded in the ith direction according to the residual quotient A1[ i ] and the residual remainder A2[ i ], wherein d represents a divisor in residue taking calculation, for example, if the residue taking calculation is a division 2, d is 2.
Alternatively, assuming that the encoding mode in the encoding mode information indicates that the current point to be decoded is in the ith direction, and the encoding mode is a mode in which the candidate occupied bit number of the second residual value of the point to be decoded in the ith direction is subjected to remainder calculation and then encoded (for ease of understanding, it may be referred to as a second remainder encoding mode), the decoding process of the residual value in the second remainder encoding mode may include: analyzing an occupied bit number field (namely ptn _ residual _ numbits [ i ]) corresponding to the point to be decoded in the ith direction to obtain an occupied quotient B1[ i ] of the point to be decoded in the ith direction; analyzing a position-occupying remainder field (namely ptn _ numbits _ remaining [ i ]) corresponding to the point to be decoded in the ith direction to obtain a position-occupying remainder B2[ i ] of the point to be decoded in the ith direction; determining an occupied bit digit B3[ i ] (B3[ i ] ═ B1[ i ] × d + B2[ i ]) of the point to be decoded in the ith direction according to the occupancy quotient B1[ i ] and the occupancy remainder B2[ i ]; analyzing a B3[ i ] bit value (i.e., a value of B3[ i ] bit ptn _ residual _ value _ per [ i ]) in a bit value field corresponding to the point to be decoded in the ith direction to obtain a second residual value a' [ i ] of the point to be decoded in the ith direction, where d represents a divisor in the remainder calculation, for example, if the remainder calculation is a remainder obtained by dividing 2, then d is 2.
It should be noted that the coding mode information may also be used to indicate that the coding mode of the point to be decoded in the ith direction is a mode (which may be referred to as a third left coding mode) in which, after performing left calculation on the second residual value of the point to be decoded in the ith direction, the candidate occupied bit number of the second residual value of the point to be decoded in the ith direction is subjected to left calculation and then coded, and the residual value decoding process in the third left coding mode may be combined with the residual value decoding process in the first left coding mode and the residual value decoding process in the second left coding mode, which is not described herein again.
Wherein, the implementation manner of decoding the residual symbol of the point to be decoded may include, but is not limited to, any of the following:
(1) and directly analyzing sign bits of the point to be decoded in all directions. Specifically, a residual error sign flag field (ptn _ residual _ sign _ flag) of the point to be decoded in each direction in the K directions is analyzed to obtain residual error sign bit information of the point to be decoded in each direction in the K directions; when a residual error sign flag field of a point to be decoded in the ith direction is set to be a target numerical value (for example, a numerical value 1), residual error sign bit information in the ith direction is non-negative; when the residual sign flag field of the point to be decoded in the ith direction is not set to a target value (for example, a value 0), the residual sign bit information in the ith direction is negative; i is a positive integer less than or equal to K.
(2) And resolving a symbol identification bit field signFlag used for indicating the symbol association relationship between the current point to be decoded and the preamble point. Specifically, a symbol identification bit field (signFlag) of the point to be decoded in each direction in K directions is analyzed to obtain a symbol incidence relation between the point to be decoded and the preorder point in each direction in the K directions, and residual error symbol bit information of the point to be decoded in each direction in the K directions is determined based on the symbol incidence relation;
when the symbol sign bit field of the point to be decoded in the ith direction is set to be a target numerical value (signFlag ═ 1), residual symbol bit information of the point to be decoded and the preorder point in the ith direction is the same; when the sign flag bit field of the point to be decoded in the ith direction is not set to be a target numerical value (signFlag ═ 0), the residual sign bit information of the point to be decoded and the preorder point in the ith direction is different, and the preorder point is a point in the point cloud which is decoded completely.
Step S103, determining first residual error information of the point to be decoded in each direction of the K directions based on the second residual error information of the point to be decoded in each direction of the K directions; a second residual value in the second residual information is less than or equal to the first residual value in the first residual information.
The second residual information may include a second residual value a 'and residual sign bit information, and when determining the first residual information of the point to be decoded in each direction of the K directions based on the second residual information of the point to be decoded in each direction of 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 continuously to obtain the first residual value a, so that 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 a first residual value a and residual sign bit information, and a 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 process of encoding the point to be decoded, the first residual value a may be subjected to secondary prediction, so as to reduce the encoded value of the residual value, and improve the geometric decoding efficiency of the point to be decoded.
The second residual value a ' of the point to be decoded in each of the K directions may be denoted as a ' x, a ' y, and a ' z, where a ' x may represent the second residual value of the point to be decoded in the x direction, a ' y may represent the second residual value of the point to be decoded in the y direction, and a ' z may represent the second residual value of the point to be decoded in the z direction. Implementations for determining the first residual value a based on the second residual value a' may include, but are not limited to, any of the following:
(1) the absolute residual value information (second residual value a ') obtained by the analysis is the actual residual value information (first residual value a), i.e., a ═ a'.
(2) The method adopts a full index method, and the specific steps are described as follows:
analyzing a residual index identification bit field (2bit index identification bit minResFlag) corresponding to the point to be decoded to obtain a reference direction indicated by a minimum residual value A' min in K second residual values corresponding to the point to be decoded. In other words, a parsing residual index flag field (minResFlag) is used to indicate the reference direction corresponding to the minimum residual value a' min.
When the residual index flag bit field is the first flag value (minResFlag ═ 00), the reference direction is the abscissa direction, that is, when minResFlag ═ 00, a 'min ═ a' x; when the residual index flag field is the second flag value (minResFlag ═ 01), the reference direction is the ordinate direction, that is, when minResFlag ═ 01, a 'min ═ a' y; when the residual index flag bit field is a three flag value, the reference direction is the vertical coordinate direction, that is, when minResFlag is equal to 10, a 'min is equal to a' z.
And secondly, calculating the sum of second residual values A 'and A' min of the other two directions except the reference direction as the first residual value A of the current direction. Specifically, the rest directions except the reference direction in the K directions are determined as non-reference directions, and a first residual value of the point to be decoded in the reference direction is determined based on the minimum residual value a 'min, such as a' min + 1; and determining the sum of the second residual value of the point to be decoded in the non-reference direction and the minimum residual value A' min as the first residual value of the point to be decoded in the non-reference direction.
When minResFlag is 00, the reference direction is the x direction, and the non-reference direction is the y direction and the z direction, where 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.
When minResFlag is 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.
When minResFlag is 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.
(3) A non-zero full index method is adopted. Specifically, the residual index flag field corresponding to the point to be decoded may be analyzed based on the number M1 of the point to be decoded in the non-zero direction of the K directions to obtain a third non-zero direction indicated by a minimum residual value a 'min, where the minimum residual value a' min is a minimum value of M1 second residual values corresponding to the point to be decoded, and the specific steps may be described as follows:
when M1 is K, a residual index flag field (minResFlag) that occupies 2 bits (2 bits) is parsed, which may be used to indicate a third non-zero direction corresponding to a minimum residual value a' min.
minResFlag is 00 (first identification value), a ' min is a ' x, and a third non-zero direction corresponding to the minimum residual value a ' min is an x direction;
minResFlag is 01 (second identification value), a 'min is a y, and a third non-zero direction corresponding to the minimum residual value a' min is a y direction;
minResFlag is 10 (third identification value), a ' min is a ' z, and the third non-zero direction corresponding to the minimum residual value a ' min is the z direction.
When M1 is equal to K-1, a residual index flag bit field (minResFlag) occupying 1bit is parsed, which may be used to indicate a third non-zero direction corresponding to the minimum residual value a' min.
A ' x is 0(x direction is zero direction, y and z directions are non-zero directions), minResFlag is 0 (fourth identification value), a ' min is a y, and a ' min corresponds to a third non-zero direction; minResFlag is equal to 1 (the fifth identification value), and a ' min is equal to a ' z, where the third non-zero direction corresponding to a ' min is the z direction.
A 'y is 0(y direction is zero direction, x and z directions are non-zero directions), minResFlag is 0, a' min is a 'x, and a' min corresponds to the third non-zero direction; minResFlag is equal to 1, and a ' min is equal to a ' z, in which case the third non-zero direction corresponding to a ' min is the z-direction.
A 'z is 0 (the z direction is a zero direction, and the x and y directions are non-zero directions), minResFlag is 0, a' min is a 'x, and a' min corresponds to the third non-zero direction in the x direction; minResFlag is equal to 1, and a ' min is equal to a ' y, where a ' min corresponds to the third non-zero direction being the y direction.
③ when M1< K-1, the residual index flag field (minResFlag) is not used, and it is not necessary to parse this field minResFlag.
Further, the sum of the remaining non-zero directions (fourth non-zero directions) other than the third 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 of the M1 non-zero directions except the third non-zero direction are determined as a fourth non-zero direction, and a first residual value (a ═ a '+1) of the point to be decoded in the third non-zero direction is determined based on the minimum residual value a' min; and determining the sum of the second residual value of the point to be decoded in the fourth non-zero direction and the minimum residual value A ' min as the first residual value of the point to be decoded in the fourth non-zero direction (A ═ A ' + A ' min).
(4) A unidirectional index method is adopted, and the specific steps are described as follows:
determining a default reference direction negotiated by a decoding end and an encoding end in K directions, wherein a second residual value of the point to be decoded in the reference direction can be called a reference value (marked as A' base); the directions other than the reference direction among the K directions may be determined as non-reference directions.
And analyzing a residual index identification bit field minResFlag occupying 1bit, wherein the residual index identification bit field minResFlag can be used for indicating whether the reference value A ' base is the minimum value, namely whether the reference value A ' base is the minimum residual value A ' min in second residual values of the point to be decoded in each direction of the K directions.
minResFlag is 0 (fourth flag value), indicating that the current reference value a 'base is not the minimum residual value a' min; minResFlag is equal to 1 (fifth flag value), which indicates that the current reference value a 'base is the minimum residual value a' min, and at this time, a 'min is equal to a' base.
And calculating second residual values in all directions. minResFlag is 0, a' +1(e is 1), and the first residual value can be obtained by adding a value 1 to the second residual values in each direction; minResFlag is 1, the first residual value in the non-reference direction is a ' + a ' min, and the first residual value in the reference direction is a ' + 1.
The steps II and III can be summarized as follows: if the residual index flag bit field (minResFlag) corresponding to the point to be decoded is obtained through analysis and is a fourth identification value (numerical value 0), determining that a second residual value (namely a reference value A ' base) of the point to be decoded in the reference direction is not a minimum residual value A ' min, and determining the sum of the second residual value A ' of the point to be decoded and a fixed numerical value e as a first residual value A of the point to be decoded; if the residual index identification bit field (minResFlag) corresponding to the point to be decoded is obtained through analysis and is a fifth identification value (numerical value 1), determining that a second residual value of the point to be decoded in the reference direction is a minimum residual value a ' min (namely, a ' min is a ' base), determining a first residual value of the point to be decoded in the reference direction based on the minimum residual value a ' min, namely, a ' min +1, and determining the sum of the second residual value a ' of the point to be decoded in the non-reference direction and the minimum residual value a ' min as the first residual value a of the point to be decoded in the non-reference direction.
(5) A non-zero one-way index method is adopted, and the specific steps are described as follows:
determining a default reference direction negotiated by a decoding end and an encoding end in K directions, wherein a second residual value in the reference direction can be called a reference value (marked as A' base); the directions other than the reference direction among the K directions may be determined as non-reference directions.
And secondly, judging whether the reference value A 'base is zero, if the reference value A' base is zero, not adopting an index flag bit (namely a residual index identification bit field minResFlag) for the current point to be decoded.
And thirdly, if the reference value A ' base is a non-zero value, analyzing a residual error index identification bit field minResFlag occupying 1bit, wherein the residual error index identification bit field minResFlag at the moment can be used for indicating whether the reference value A ' base is the minimum residual error value A ' min in second residual error values of the point to be decoded in each direction of K directions.
The following steps of the non-zero unidirectional index method can refer to the second step and the third step of the unidirectional index method, and are not described again here.
In summary, when the second residual value (i.e., the reference value a ' base) of the point to be decoded in the reference direction is a nonzero value, if the residual index flag field corresponding to the point to be decoded obtained through parsing is the fourth identification value (minResFlag ═ 0), it indicates that the reference value a ' base is not the minimum residual value a ' min, and then the sum of the second residual value of the point to be decoded and the fixed value e may be determined as the first residual value of the point to be decoded; when the second residual value of the point to be decoded in the reference direction is a nonzero value, if a residual index identification bit field corresponding to the point to be decoded is analyzed to be a fifth identification value (minResFlag ═ 1), determining that the second residual value of the point to be decoded in the reference direction is a minimum residual value A 'min, determining a first residual value (A' min +1) of the point to be decoded in the reference direction based on the minimum residual value A 'min, and determining the sum of the second residual value of the point to be decoded in the non-reference direction and the minimum residual value A' min as the first residual value of the point to be decoded in the non-reference direction.
It should be noted that, in the decoding process of the point to be decoded, the steps in the foregoing various implementation manners may be used alone, or may be used in combination, and this application does not limit this. And the second residual information and the first residual information obtained at the decoding end are both reconstructed residual information after decoding processing is carried out according to the coding mode information.
And step S104, reconstructing the geometric information of the point to be decoded according to the first residual information of the point to be decoded in each direction of the K directions.
After the first residual information is obtained, the geometric information of the point to be decoded may be reconstructed based on the first residual information. If the predicted geometric information of the point to be decoded in each direction of the K directions can be obtained, the geometric information of the point to be decoded, that is, the reconstructed geometric information, is reconstructed based on the first residual information and the predicted geometric information of the point to be decoded in each direction of the K directions. Specifically, the geometric prediction tree of the point cloud may be used to reflect a connection relationship between each point to be decoded in the point cloud, and may be used to indicate a prediction mode of each point to be decoded in the point cloud (i.e., the prediction mode mentioned in the introduction of the predictive coding technology), so that the point to be decoded may be predicted according to the prediction mode of the point to be decoded, and the predicted geometric information of the point to be decoded is obtained.
In the embodiment of the application, in the point cloud decoding process, the encoding mode information of the point cloud can be obtained, the point to be decoded in the point cloud is decoded based on the encoding mode information, the second residual error information of the point to be decoded can be obtained, the first residual error information is further determined based on the second residual error information, the geometric information of the point to be decoded can be reconstructed through the first residual error information, and the first created residual error value in the second residual error information is smaller than or equal to the first residual error value in the first residual error information. In the point cloud decoding process, the second residual error information is inversely predicted through the relevance of the geometric residual error information of the point to be decoded in the K directions, so that the geometric decoding efficiency of the point cloud can be improved.
Referring to fig. 8, fig. 8 is a schematic flow chart diagram of another point cloud processing method according to the embodiment of the present disclosure. It is to be understood that the point cloud processing method may be performed by a computer device, which may be the encoding device shown in fig. 1, and the point cloud processing method may be the encoding method. As shown in fig. 8, the point cloud processing method may include the following steps S201 to S204:
step S201, determining the encoding mode information of the point cloud.
In the point cloud encoding process, firstly, encoding mode information of the point cloud may be determined, the encoding mode information may include an encoding mode of a point to be encoded in the point cloud, the point to be encoded may be any point not yet encoded in the point cloud, and geometric information of the point to be encoded may be three-dimensional space coordinates (including x, y, and z directions).
The manner of determining the encoding mode information may include, but is not limited to, any of the following:
(1) and all the points in the default point clouds of the encoding end and the decoding end adopt the same encoding mode. Specifically, a default coding mode which is negotiated and set by a decoding end and a coding end is obtained, and the default coding mode is determined as the coding mode information of the point cloud; the default encoding mode is an encoding mode of a point to be encoded in the point cloud, and may also be an encoding mode 0 shared by all points in the point cloud.
(2) The encoding mode information is set and written to the encoding parameter set or encoding (which may be the aforementioned geometric bitstream) of the point cloud. Specifically, a coding mode in each direction in K directions is determined for a point to be coded in the point cloud, the coding mode in each direction in the K directions is determined as coding mode information of the point cloud, and the coding mode information is written into a coding parameter set or a coding code stream of the point cloud.
(3) A decision threshold value set by a common negotiation between a decoding end and an encoding end is acquired, and corresponding encoding mode information is decided based on the decision threshold value. Wherein:
firstly, when the threshold value is judged to comprise a first threshold value (the set default parameter t1, t1>0), acquiring statistical characteristic information corresponding to a first residual value of the point to be coded, determining a coding mode of the point to be coded in each direction of K directions based on a numerical comparison relation between the statistical characteristic information and the first threshold value, and determining the coding mode of the point to be coded in each direction of the K directions as coding mode information.
The first residual value of the point to be coded may refer to an unsigned residual value generated by a geometric prediction tree (the aforementioned prediction tree coding structure). The statistical property information may include, but is not limited to: the average value of the first residual values of the point to be coded in each direction in the K directions, the minimum value of the first residual values of the point to be coded in each direction in the K directions, the maximum value of the first residual values of the point to be coded in each direction in the K directions and the like. For example, when the statistical property information is smaller than the first threshold, the encoding mode (e.g., any one of full index method, non-zero full index method, one-way index method, and non-zero one-way index method) of the point to be encoded in each of the K directions may be determined.
When the judgment threshold value comprises a second threshold value (a set default parameter t2, t2>0), acquiring side length ratio information corresponding to a bounding box of the point cloud, determining the coding mode of the point to be coded in each direction of K directions based on the numerical comparison relationship between the side length ratio information and the second threshold value, and determining the coding mode of the point to be coded in each direction of K directions as coding mode information; the bounding box is used to characterize the smallest cuboid containing all the points of the point cloud. The bounding box can be a bounding box corresponding to a geometric prediction tree, and when the geometric prediction tree is a prediction tree of the whole point cloud, the bounding box can contain all points of the point cloud; when the geometric prediction tree is a prediction tree of a certain node in the octree, the bounding box may include a point corresponding to the node, and the like.
In one or more embodiments, the side length information of the bounding box may be represented as [ BBx, BBy, BBz ], BBx represents side length information in the x direction, BBy represents side length information in the y direction, and BBz represents side length information in the z direction. If BBx/BBz > t2 or BBy/BBz > t2, the encoding mode of the point to be encoded in each of the K directions can be determined to be a unidirectional index in the z direction or a non-zero unidirectional index method.
When the judgment threshold comprises a third threshold (set default parameters t3, t3>0) and a fourth threshold (set default parameters t4, t4>0), determining a threshold condition range based on the third threshold and the fourth threshold, determining the coding mode of the point to be coded in each direction of K directions according to the membership between the quantization parameter of the point to be coded and the threshold condition range, and determining the coding mode of the point to be coded in each direction of K directions as coding mode information. Wherein, the threshold condition range may 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 smaller than t3, or the quantization parameter is larger than t4, or both, it indicates that the quantization parameter belongs to the threshold condition range, and the coding mode of the point to be coded in each of the K directions (e.g., any one of a full index method, a non-zero full index method, a one-way index method, and a non-zero one-way index method) can be determined.
Step S202, first residual error information of the point to be coded in each direction of K directions in the point cloud is obtained.
Specifically, in the point cloud encoding stage, a geometric prediction tree corresponding to the point cloud can be constructed, and first residual information of the point to be encoded in the point cloud in each of K directions is acquired based on the geometric prediction tree; the first residual error information of the point to be coded in the ith direction comprises a first residual error value of the point to be coded in the ith direction and residual error sign bit information of the point to be coded in the ith direction; when the first residual value of the point to be encoded in the ith direction is zero, the first residual value in the ith direction can be directly encoded into the specific identification information without performing subsequent operations.
It should be noted that, the construction of the geometric prediction tree may refer to the aforementioned prediction coding technique, and is not described herein again. Of course, besides the prediction modes in the aforementioned prediction coding techniques, any other prediction modes may be used, and the present application is not limited thereto.
Step S203, determining second residual error information of the point to be coded in each direction of the K directions based on the first residual error information of the point to be coded in each direction 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.
Specifically, after first residual information generated by the geometric prediction tree is acquired, secondary prediction can be performed on the first residual information by utilizing the relevance of the first residual information in each direction in the forward and backward sequence or in the K directions to obtain second residual information of the point to be coded in each direction in the K directions, wherein a second residual value in the second residual information is smaller than or equal to a first residual value in the first residual information, so that a residual coding value of the point to be coded is reduced as much as possible, and the geometric coding efficiency of the point cloud is improved on the basis of not influencing the point cloud single point reconstruction.
The first residual information in each direction includes a first residual value and residual sign bit information in the direction, and when performing secondary prediction on the first residual information, the first residual value is mainly kept unchanged with respect to the residual sign bit information in the secondary prediction, so that a process of determining the second residual information by the first residual information can be regarded as a process of determining the second residual value by the first residual value. The first residual value is determined by a geometric prediction tree and can be used for point cloud reconstruction in a decoding stage, and the first residual value corresponds to the first residual value in the decoding stage; the second residual value is a residual value actually required to be encoded, and corresponds to the second residual value in the decoding stage.
Suppose that the first residual values of the point to be coded in K directions (including x, y, z directions) are represented as Ax, Ay, Az, where Ax represents the first residual value of the point to be coded in the x direction, Ay represents the first residual value of the point to be coded in the y direction, and Az represents the first residual value of the point to be coded in the z direction. Implementations of determining the second residual value based on the first residual value may include, but are not limited to, any of:
(1) and directly taking the first residual value as a coded second residual value, namely A' (the first residual value) is A (the second residual value), without processing the first residual value.
(2) The method adopts a full index method, and the specific steps are described as follows:
acquiring the minimum value of first residual values of points to be coded in all directions, and recording the minimum value as Amin; in other words, the minimum residual value Amin of the first residual values of the point to be encoded in each of the K directions is obtained, and the minimum residual value Amin at this time may be zero or may also be a non-zero value.
And secondly, setting a residual error index identification bit field (minResFlag) for the minimum residual error value Amin, wherein the residual error index identification bit field is used for indicating the direction of the minimum residual error value Amin (which can be called as a reference direction for facilitating understanding), and the residual error index identification bit field at the moment needs to occupy 2 bits.
When the residual index flag field is set to the first flag value (minResFlag ═ 00), the reference direction corresponding to the minimum residual value Amin is the abscissa direction (x direction), that is, when minResFlag ═ 00, Amin ═ Ax; when the residual index flag bit field is the second flag minResFlag 01, the reference direction corresponding to the minimum residual value Amin is the ordinate direction (y direction), that is, when minResFlag 01, Amin is Ay; when the residual index flag bit field is the first flag value (minResFlag 10), the reference direction is the vertical coordinate direction (z direction), that is, when minResFlag 10, Amin is Az.
And calculating the difference value between the first residual value and Amin of the other two directions except the reference direction as a second residual value A' of the current direction. Specifically, the rest directions except the reference direction in the K directions are determined as non-reference directions, and a second residual value of the point to be coded in the reference direction is determined based on the minimum residual value Amin, for example, Amin-e, e can be 1; and determining a difference value between a first residual value of the point to be coded in the non-reference direction and the minimum residual value Amin as a second residual value of the point to be coded in the non-reference direction.
When minResFlag is 00, the reference direction is the x direction, the non-reference direction is the y direction and the z direction, and when a second residual value in the x direction is a ' x ═ Ax-1(Amin ═ Ax), a second residual value in the y direction is a ' y ═ Ay-Amin, and a second residual value in the z direction is a ' z ═ Az-Amin.
When minResFlag is 01, the reference direction is the y direction, and the non-reference direction is the x direction and the z direction, where a second residual value in the x direction is a ' x-Amin, a second residual value in the y direction is a ' y-Ay-1 (Amin-Ay), and a second residual value in the z direction is a ' z-Amin.
When minResFlag is 10, the reference direction is the z direction, the non-reference direction is the x direction and the y direction, and when a second residual value in the x direction is a ' x-Ax-Amin, a second residual value in the y direction is a ' y-Amin, and a ' z is Az-1 (Amin-Az).
(3) A non-zero full index method is adopted.
And determining the non-zero minimum value in the first residual value of the point to be coded in each direction of the K directions as a minimum residual value Amin.
Obtaining the number M2 of non-zero residual values in K first residual values corresponding to points to be coded, setting a residual index flag field (minResFlag, which may also be referred to as a minimum index flag field) for a minimum residual value Amin based on the number M2, where the residual index flag field is used to indicate a fifth non-zero direction corresponding to the minimum residual value Amin, the M2 non-zero residual values correspond to the M2 non-zero directions, and M2 is a positive integer less than or equal to K. In other words, based on the number of non-zero residual values M2, a residual index flag field (minResFlag) is defined, the specific steps of which can be described as follows:
when M2 is equal to K (the number of non-zero residual values is K), a residual index flag field (minResFlag) occupying 2 bits (2 bits) may be set, and the residual index flag field is used to indicate a fifth non-zero direction corresponding to the minimum residual value Amin.
If the residual index flag bit field corresponding to the point to be coded is set to be the first flag value (minResFlag ═ 00), determining that the fifth non-zero direction corresponding to the minimum residual value Amin is the abscissa direction (x direction), that is, minResFlag ═ 00, Amin ═ Ax;
if the residual index flag bit field corresponding to the point to be encoded is set to be the second flag value (minResFlag is 10), determining that the fifth non-zero direction corresponding to the minimum residual value Amin is the ordinate direction (y direction), that is, minResFlag is 01, and Amin is Ay;
if the residual index flag bit field corresponding to the point to be coded is set to the third flag value (minResFlag is 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 is 10, and Amin is Az.
② when M2 is K-1, a residual index flag field (minResFlag) occupying 1bit may be set, the residual index flag field being used to indicate a fifth non-zero direction corresponding to the minimum residual value Amin.
If the M2 non-zero directions include an ordinate direction and an ordinate direction, and the residual index flag field is set to the fourth flag value (minResFlag ═ 0), determining that the fifth non-zero direction corresponding to the minimum residual value Amin is the ordinate direction (y direction); if the M2 non-zero directions include a vertical coordinate direction and a vertical coordinate direction, and the residual index flag field is set to a fifth flag value (minResFlag ═ 1), determining that the fifth non-zero direction corresponding to the minimum residual value Amin is the vertical coordinate direction (z direction); that is, Ax is 0(x direction is zero direction, y and z directions are non-zero directions), minResFlag is 0 (fourth flag value), Amin is Ay, and in this case, the fifth non-zero direction corresponding to Amin is y direction; minResFlag is equal to 1 (the fifth flag value), Amin is equal to Az, and the fifth non-zero direction corresponding to Amin is the z direction.
If the M2 non-zero directions comprise the horizontal coordinate direction and the vertical coordinate direction, and the residual error index flag field is set as the fourth flag value, determining that the fifth non-zero direction corresponding to the minimum residual error value Amin is the horizontal coordinate direction; if the M2 non-zero directions comprise a horizontal coordinate direction and a vertical coordinate direction, and the residual error index flag field is set as a fifth flag value, determining that the fifth non-zero direction corresponding to the minimum residual error value Amin is the vertical coordinate direction; that is, Ay is 0 (the y direction is the zero direction, and the x and z directions are the non-zero directions), minResFlag is 0 (the fourth flag value), Amin is Ax, and the fifth non-zero direction corresponding to Amin is the x direction; minResFlag is equal to 1 (the fifth flag value), Amin is equal to Az, and the fifth non-zero direction corresponding to Amin is the z direction.
If the M2 non-zero directions comprise the abscissa direction and the ordinate direction, and the residual error index flag field is set as the fourth flag value, determining that the fifth non-zero direction corresponding to the minimum residual error value Amin is the abscissa direction; if the M2 non-zero directions include the abscissa direction and the ordinate direction, and the residual index flag field is set to the fifth flag value, determining that the fifth non-zero direction corresponding to the minimum residual value Amin is the abscissa direction; that is, Az is 0 (the z direction is a zero direction, and the x and y directions are non-zero directions), minResFlag is 0 (a fourth flag value), Amin is Ax, and a fifth non-zero direction corresponding to Amin is the x direction; minResFlag is equal to 1 (the fifth flag value), Amin is equal to Ay, and in this case, Amin corresponds to the fifth non-zero direction, which is the y direction.
③ when M2< K-1, the residual index flag bit field (minResFlag) is not employed.
Further, a difference between the remaining direction (sixth non-zero direction) other than the fifth non-zero direction and the Amin is calculated as a 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 the Amin is a' ═ a-1. Specifically, the remaining directions of the M2 non-zero directions except the fifth non-zero direction are determined as a sixth non-zero direction, and a second residual value of the point to be encoded in the fifth non-zero direction is determined based on the minimum residual value Amin, where a' is a-1; and determining a difference value between the first residual value of the point to be coded in the sixth non-zero direction and the minimum residual value Amin as a second residual value of the point to be coded in the sixth non-zero direction (A' ═ A-Amin).
(4) Adopting a one-way indexing method, the one-way indexing method may include: determining a reference direction in the K directions, and determining directions except the reference direction in the K directions as non-reference directions; if the first residual value of the point to be coded in the reference direction is not the minimum residual value Amin of the point to be coded, setting a residual index flag bit field of the point to be coded as a fourth flag value (minResFlag ═ 0), and determining a difference between the first residual value of the point to be coded and a fixed value e (where e may be 1) as a second residual value (a' ═ a-1) of the point to be coded. If the first residual value of the point to be coded in the reference direction is the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fifth identification value (minResFlag ═ 1), determining a second residual value (a '═ a-1) of the point to be coded in the reference direction based on the minimum residual value Amin, and determining a difference between the first residual value of the point to be coded in the non-reference direction and the minimum residual value Amin as a second residual value (a' ═ a-Amin) of the point to be coded in the non-reference direction.
The one-way index method comprises the following specific steps:
determining a certain direction as a reference direction, and recording a first residual value of the reference direction as a reference residual value Abase, that is, determining the reference direction in K directions.
And judging whether the reference residual value Abase is the minimum residual value Amin of the first residual values of the nodes to be coded in each direction of the K directions.
And setting a residual error index flag bit field (minResFlag) occupying 1bit, wherein the residual error index flag bit field at this time can be used for indicating whether the reference residual error value Abase is the minimum residual error value Amin.
minResFlag ═ 0 (fourth identification value), indicating that the current reference residual value Abase is not the minimum residual value a' min; minResFlag is equal to 1 (fifth flag), indicating that the current reference residual value abise is the minimum residual value Amin, and Amin is equal to abise at this time.
And fourthly, calculating second residual values in all directions.
minResFlag is equal to 0, the reference residual value Abase is not the minimum residual value a 'min, and the first residual value of the point to be coded may be used as the second residual value of coding, that is, a' ═ a;
minResFlag is equal to 1, the reference residual value Abase is the minimum residual value a ' min, the second residual value of the point to be coded in the non-reference direction may be denoted as a ' ═ a-Amin, and the second residual value of the point to be coded in the reference direction is a ' ═ a-1.
(5) A non-zero one-way index method is adopted, and the non-zero one-way index method may include: determining a reference direction in the K directions, determining the directions except the reference direction in the K directions as non-reference directions, and determining a first residual value of a point to be coded in the reference direction as a reference residual value Abase; if the reference residual value is a nonzero value and the reference residual value is not the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fourth identification value (minResFlag ═ 0), and determining the difference between the first residual value of the point to be coded and the value e as a second residual value (A' ═ A-1) of the point to be coded; if the reference residual value is a nonzero value and the reference residual value is the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fifth identification value (minResFlag ═ 1), determining a second residual value (A '═ A-1) of the point to be coded in the reference direction based on the minimum residual value Amin, and determining a difference value between a first residual value of the point to be coded in the non-reference direction and the minimum residual value Amin as a second residual value (A' ═ A-Amin) of the point to be coded in the non-reference direction. And if the reference residual value is zero, not adopting the residual index identification bit field.
The specific steps are described as follows:
determining a certain direction as a reference direction, and recording a first residual value of the reference direction as a reference residual value Abase, that is, determining the reference direction in K directions.
And secondly, judging whether the reference residual value Abase is zero, if so, not adopting a residual index identification bit field (minResFlag).
And thirdly, if the reference residual value Abase is zero, judging whether the reference residual value Abase is the minimum residual value Amin of the first residual values of the nodes to be coded in each direction of the K directions.
The following steps of the non-zero unidirectional index method can be referred to as the steps (c) and (c) in the unidirectional index method, and are not described herein again.
Step S204, according to the coding mode information, the second residual error information of the point to be coded in each direction of the K directions is coded.
The second residual information of the point to be encoded in each of the K directions may include a second residual value and residual sign bit information in a corresponding direction, and the encoding process of the second residual information may include an encoding process of the second residual value and an encoding process of the residual sign bit information. That is, according to the coding mode information, the second residual error value of the point to be coded in each direction of the K directions can be coded, and the residual error sign bit information of the point to be coded in each direction of the K directions can be coded.
In one or more embodiments, the encoding of the second residual value may include: and carrying out logarithm operation on the non-zero residual error value in the second residual error value of the point to be coded in each direction of the K directions to obtain the target bit number B of the point to be coded in each direction of the K directions. For example, the target occupied bit number B corresponding to the second residual value of the point to be coded in each direction may be encoded By a formula B ═ ceil (log2(a')), which may be denoted as Bx, By, Bz; the ceil function is an upward rounding function and is used for returning a minimum integer greater than or equal to an expression log2(A'), Bx represents a target occupied bit number of a point to be coded in the x direction, By represents a target occupied bit number of the point to be coded in the y direction, and Bz represents a target occupied bit number of the point to be coded in the z direction.
Further, determining candidate occupation bit number B' of the point to be coded in each direction in the K directions based on the target occupation bit number B of the point to be coded in each direction in the K directions; and coding the value corresponding to each bit in the candidate occupied bit number of the point to be coded in each direction of the K directions based on the occupied bit value field (ptn _ residual _ value _ per [ i ]).
Wherein, the implementation manner of determining the candidate occupied-bit number B' based on the target occupied-bit number B may include, but is not limited to, any one of the following:
(1) and (4) not processing the target occupied bit digit B, and taking the target occupied bit digit B as a candidate occupied bit digit B ', namely B' ═ B.
(2) Adopting a non-zero full index method, wherein the non-zero full index method can comprise the following steps: setting a bit index identification bit field (minBitFlag) for the point to be coded based on the number M2 of non-zero residual values in the K first residual values corresponding to the point to be coded; the bit index identification bit field is used for indicating a seventh non-zero direction corresponding to a minimum occupied bit number Bmin, the minimum occupied bit number Bmin is the minimum value of K target occupied bit numbers corresponding to the to-be-coded point, M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer smaller than or equal to K. Wherein:
when M2 is equal to K, a bit index flag bit field (minBitFlag) occupying 2 bits may be set, and when the bit index flag bit field is set to the first flag value (minBitFlag is equal to 00), the seventh non-zero direction corresponding to the minimum occupied bit number Bmin is the x direction, that is, minBitFlag is equal to 00, and Bmin is equal to Bx.
When the bit index flag bit field is set to the second flag value (minBitFlag is 01), the seventh non-zero direction corresponding to the minimum occupied bit number Bmin is the y direction, that is, minBitFlag is 01, and Bmin is By.
When the bit index flag bit field is set to the third flag value (minBitFlag is 10), the seventh non-zero direction corresponding to the minimum occupied bit number Bmin is the z direction, that is, minBitFlag is 10, and Bmin is Bz.
When M2 is equal to K-1, a bit index flag bit field (minBitFlag) occupying 1bit is set, Bx is equal to 0(x direction is zero direction, y and z directions are non-zero directions), minBitFlag is equal to 0 (fourth flag value), Bmin is equal to By, and at this time, the seventh non-zero direction corresponding to Bmin is y direction; minBitFlag is equal to 1 (fifth identification value), and Bmin is equal to Bz, where the seventh non-zero direction corresponding to Bmin is the z-direction.
By is 0, minBitFlag is 0(y direction is zero direction, x and z directions are non-zero directions), Bmin is Bx, and the seventh non-zero direction corresponding to Bmin is x direction; minBitFlag is equal to 1, and Bmin is equal to Bz, where the seventh non-zero direction corresponding to Bmin is the z-direction.
Bz is 0(z direction is zero direction, x and y directions are non-zero directions), minBitFlag is 0, Bmin is Bx, and the seventh non-zero direction corresponding to Bmin is x direction; minBitFlag is equal to 1, and Bmin is equal to By, where the seventh non-zero direction corresponding to Bmin is the y-direction.
③ when M2< K-1, no bit index flag field (minBitFlag) is used.
Further, determining the rest directions except the seventh non-zero direction in the M2 non-zero directions as an eighth non-zero direction, and determining a candidate occupied bit number of the point to be encoded in the seventh non-zero direction based on the minimum occupied bit number Bmin, that is, B' ═ B-e (the value of e is 1); and determining the difference between the target occupied bit number of the point to be coded in the eighth non-zero direction and the minimum occupied bit number Bmin as the candidate occupied bit number of the point to be coded in the eighth non-zero direction, namely B' ═ B-Bmin.
In one or more embodiments, taking the ith direction of the M2 non-zero directions as an example, assuming that the encoding mode in the encoding mode information indicates that the current point to be encoded in the ith direction is a mode in which the second residual value of the point to be encoded in the ith direction is encoded after performing a remainder calculation (which may be referred to as a first remainder encoding mode for ease of understanding), the encoding process in the first remainder encoding mode may include: performing residue calculation on a second residual value A '[ i ] of the point to be coded in the ith non-zero direction to obtain a residual quotient A'1[ i ] and a residual remainder A '2[ i ] (A' [ i ]: A '1[ i ] multiplied by d + A'2[ i ]); determining candidate occupied bit number B ' i of residual quotient A '1 i, representing the candidate occupied bit number B ' i by using an occupied bit number field (ptn _ residual _ numbits [ i ]) corresponding to a point to be coded in the ith direction, and coding the occupied bit number field; adopting a residual residue field (ptn _ residual _ abs _ remaining [ i ]) corresponding to a point to be coded in the ith direction to represent a residual residue A'2[ i ], and coding the residual residue field; and (2) representing the value of each bit in the B ' i bits occupied by the residual quotient A '1 i by adopting the B ' i bit element (the B ' i bit element in the ptn _ residual _ value _ per [ k ]) in the occupied bit number field corresponding to the point to be coded in the ith direction, and coding the B ' i bit element in the occupied bit number field. Where d represents a divisor in the remainder calculation, for example, if the remainder calculation is a divide-by-2 remainder, d is 2. By the method, the second residual error value is subjected to residue-taking calculation and then is coded, so that the coded data amount can be further reduced, and the geometric coding efficiency of the point cloud can be further improved.
Optionally, assuming that the encoding mode in the encoding mode information indicating that the current point to be encoded is in the ith direction is a mode of performing remainder calculation on the candidate occupied bit number of the second residual value of the point to be decoded in the ith direction and then encoding the point to be decoded (which may be referred to as a second remainder encoding mode for ease of understanding), the encoding processing in the second remainder encoding mode may include: determining a candidate occupation bit number B '[ i ] of a second residual value A' [ i ] of the point to be coded in the ith direction; performing remainder calculation on the candidate occupied bit number B 'i to obtain a placeholder number B'1[ i ] and a placeholder remainder B '2[ i ] (B' i ═ B '1[ i ] × d + B'2[ i ]); adopting an occupied bit digit field (ptn _ residual _ numbits [ i ]) corresponding to a point to be coded in the ith direction to represent a placeholder number B'1[ i ], and coding the occupied bit digit field; adopting a corresponding occupation remainder field (ptn _ numbits _ remaining [ i ]) of a point to be decoded in the ith direction to represent an occupation remainder B'2[ i ], and coding the occupation remainder field; adopting a B '[ i ] bit element (B' [ i ] bit element in ptn _ residual _ value _ per [ i ] in a bit value field corresponding to the point to be coded in the ith direction) to represent the value of each bit in B '[ i ] bit occupied by the residual value of the point to be coded in the ith direction, and coding the B' [ i ] bit element in the bit value field; where d represents a divisor in the remainder calculation, for example, if the remainder calculation is a divide-by-2 remainder, d is 2. By the method, the candidate occupied bit number of the second residual value is subjected to redundancy calculation and then is encoded, so that the encoding data quantity can be reduced, and the geometric encoding efficiency of the point cloud is further improved.
It should be noted that the coding mode information may also be used to indicate that the coding mode of the point to be coded in the ith direction is a mode (which may be referred to as a third left-coding mode) in which, after performing left-over calculation on the second residual value of the point to be decoded in the ith direction, the candidate occupied bit number of the second residual value of the point to be decoded in the ith direction is subjected to left-over calculation and then coded, and a coding processing procedure in the third left-over coding mode may be combined with a coding processing procedure in the first left-over coding mode and a coding processing procedure in the second left-over coding mode, which is not described herein again.
In one or more embodiments, implementations of the encoding process of the residual sign bit information may include, but are not limited to, any of:
(1) and directly coding residual sign bit information. Specifically, based on the residual sign bit information of the point to be coded in each direction in the K directions, setting a residual sign flag field of the point to be coded in each direction in the K directions, and coding the numerical value of the residual sign flag field in each direction in the K directions;
when the residual sign bit information of the point to be coded in the ith direction is non-negative, setting a residual sign flag field of the point to be coded in the ith direction to be a target numerical value (ptn _ residual _ sign _ flag is 1); when the residual sign bit information of the point to be coded in the ith direction is negative, the residual sign flag field of the point to be coded in the ith direction is set to be a non-target value (ptn _ residual _ sign _ flag ═ 0).
(2) And setting a symbol identification bit field signFlag used for indicating the symbol association relation between the current point to be coded and the preamble point. Specifically, according to the symbol association relationship between the point to be coded and the preorder point in each direction of K directions, a symbol identification bit field of the point to be coded in each direction of K directions is set, and the numerical value of the symbol identification bit field in each direction of K directions is coded;
when residual sign bit information of a point to be coded and a preamble point in the ith direction is the same, setting a sign identification bit field of the point to be coded in the ith direction as a target numerical value (signFlag ═ 1); when residual sign bit information of a point to be coded and a preamble point in the ith direction is different, setting a sign identification bit field of the point to be coded in the ith direction to be a non-target value (signFlag ═ 0); the preorder points are points in the point cloud which are already coded.
It should be noted that, in the process of encoding a point to be encoded, the steps in the foregoing various implementation manners may be used alone, or may be used in combination, and this 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 geometric bit stream may be obtained, and the geometric bit stream may be transmitted to the decoding end.
In the embodiment of the application, in the process of encoding the point cloud, encoding mode information of the point cloud can be determined; acquiring first residual error information of a point to be coded in the point cloud in each direction of K directions based on a geometric prediction tree; second prediction can be carried out on the first residual error information of the point to be coded in each direction of the K directions to obtain second residual error information of the point to be coded in each direction 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; and according to the coding mode information, coding second residual information of the point to be coded in each direction of the K directions. By utilizing the relevance of the first residual value of the point to be coded in the front-rear sequence or in each direction, the residual coding value can be reduced, and the geometric coding efficiency is further improved; and the residue-taking coding can be adopted to code the second residual value or the candidate occupied bit number, so that the residual coding value can be further reduced, and the geometric coding efficiency can be further improved on the basis of not influencing the point cloud single-point reconstruction.
Please refer to fig. 9, fig. 9 is a schematic structural diagram of a point cloud processing apparatus according to an embodiment of the present disclosure; the point cloud processing means may be a computer program (comprising program code) running in the decoding device, e.g. the point cloud processing means is an application software in the decoding device. Referring to fig. 9, the point cloud processing apparatus 1 may include an obtaining module 11, a decoding module 12, and a reconstructing module 13;
the acquisition module 11 is used for acquiring the coding mode information of the point cloud;
the decoding module 12 is configured to decode a point to be decoded in the point cloud according to the coding mode information to obtain second residual information of the point to be decoded in each of the K directions; k is a positive integer;
the decoding module 12 is further configured to determine, based on the second residual information of the point to be decoded in each of the K directions, first residual information of the point to be decoded 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 a reconstructing module 13, configured to reconstruct geometric information of the point to be decoded according to the first residual information of the point to be decoded in each of the K directions.
In one or more embodiments, the obtaining module 11 is specifically configured to:
acquiring a default coding mode negotiated and set 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 the coding mode of the point to be decoded in the point cloud.
Or, the obtaining module 11 is specifically configured to:
acquiring a code packaging file of the point cloud; the encoding packaging file comprises an encoding parameter set or an encoding code stream;
and analyzing the code encapsulation file to obtain a code mode of the point to be decoded in the point cloud, and determining the code mode of the point to be decoded as the code mode information of the point cloud.
Alternatively, the obtaining module 11 is specifically configured to:
acquiring a judgment threshold corresponding to the point cloud; the judgment threshold is determined by the common negotiation of the encoding end and the decoding end, or the judgment threshold is obtained by analyzing the encoding parameter set or the encoding code stream of the point cloud;
when the judgment threshold comprises a first threshold, obtaining statistical characteristic information corresponding to residual analysis information of the point to be decoded, determining a coding mode of the point to be decoded based on a numerical comparison relation between the statistical characteristic information and the first threshold, and determining the coding mode of the point to be decoded as coding mode information;
when the judgment threshold comprises a second threshold, acquiring side length ratio information corresponding to the bounding box of the point cloud, determining a coding mode of a point to be decoded based on a numerical comparison relation between the side length ratio information and the second threshold, and determining the coding mode of the point to be decoded as coding mode information; the bounding box is used for representing a minimum cuboid containing all points in the point cloud;
when the judgment threshold comprises a third threshold and a fourth threshold, determining a threshold condition range based on the third threshold and the fourth threshold, determining the coding mode of the point to be decoded according to the subordination relation between the quantization parameter of the point to be decoded and the threshold condition range, and determining the coding mode of the point to be decoded as the coding mode information.
In one or more embodiments, the decoding process includes residual value decoding and residual symbol decoding; the decoding module 12 decodes the point to be decoded in the point cloud according to the encoding mode information, and obtaining the second residual information of the point to be decoded in each of the K directions may include:
according to the coding mode information, decoding residual error values of the points to be decoded in the point cloud to obtain second residual error values of the points to be decoded in each direction of K directions;
carrying out residual error symbol decoding on the point to be decoded to obtain residual error symbol bit information of the point to be decoded in each direction of K directions;
and determining second residual error information of the point to be decoded in each direction of the K directions based on the second residual error value of the point to be decoded in each direction of the K directions and the residual error sign bit information of the point to be decoded in each direction of the K directions.
In one or more embodiments, the decoding module 12 performs residual value decoding on the point to be decoded in the point cloud according to the encoding mode information, and obtaining a second residual value of the point to be decoded in each of the K directions may include:
determining a non-zero direction of a point to be decoded in the point cloud in K directions based on a residual error numerical value mark field in the encoding mode information; when a residual error value flag field of a point to be decoded in the ith direction is set as a target value, the ith direction is a non-zero direction, and i is a positive integer less than or equal to K;
determining the target bit number occupied by the point to be decoded in the non-zero direction by analyzing the bit number field occupied by the point to be decoded in the non-zero direction;
and analyzing an occupied bit value field of the point to be decoded in the non-zero direction based on the target occupied bit number to obtain a second residual value of the point to be decoded in the non-zero direction.
In one or more embodiments, the number of non-zero directions is M1, M1 is a positive integer less than or equal to K;
the decoding module 12 may determine the target occupied bit number of the point to be decoded in the non-zero direction by parsing the occupied bit number field of the point to be decoded in the non-zero direction, including:
analyzing bit number fields occupied by the point to be decoded in the M1 nonzero directions in sequence to obtain candidate bit number occupied by the point to be decoded in the M1 nonzero directions;
analyzing a bit index identification bit field corresponding to a point to be decoded to obtain a first non-zero direction indicated by a minimum bit occupation number B' min; the minimum occupied bit number B' min is the minimum value of M1 candidate occupied bit numbers corresponding to the point to be decoded;
determining the rest directions except the first non-zero direction in the M1 non-zero directions as second non-zero directions, and determining the target occupied bit number of the point to be decoded in the first non-zero direction based on the minimum occupied bit number B' min;
and determining the sum of the candidate occupied bit number of the point to be decoded in the second non-zero direction and the minimum occupied bit number B' min as the target occupied bit number of the point to be decoded in the second non-zero direction.
In one or more embodiments, M1 is equal to K; the decoding module 12 analyzes the bit index flag bit field corresponding to the point to be decoded to obtain the first non-zero direction indicated by the minimum occupied bit number B' min, which may include:
if the bit index identification bit field corresponding to the to-be-decoded point is a first identification value, determining that a first non-zero direction indicated by the minimum occupied bit number B' min is an abscissa direction;
if the bit index identification bit field corresponding to the to-be-decoded point is a second identification value, determining that a first non-zero direction indicated by the minimum occupied bit number B' min is a vertical coordinate direction;
and if the bit index identification bit field corresponding to the to-be-decoded point is a third identification value, determining that a third non-zero direction indicated by the minimum occupied bit number B' min is a vertical coordinate direction.
In one or more embodiments, M1 is equal to K-1; the decoding module 12 analyzes the bit index flag bit field corresponding to the point to be decoded to obtain the first non-zero direction indicated by the minimum occupied bit number B' min, which may include:
if the M1 nonzero directions comprise a vertical coordinate direction and a vertical coordinate direction, and a bit index identification bit field corresponding to the to-be-decoded point is a fourth identification value, determining that a first nonzero direction indicated by the minimum occupied bit number B' min is the vertical coordinate direction;
if the M1 nonzero directions comprise a horizontal coordinate direction and a vertical coordinate direction, and a bit index identification bit field corresponding to the to-be-decoded point is a fourth identification value, determining that a first nonzero direction indicated by the minimum occupied bit number B' min is the horizontal coordinate direction;
and if the M1 nonzero directions comprise an abscissa direction and an ordinate direction, and the bit index identification bit field corresponding to the to-be-decoded point is a fourth identification value, determining that the first nonzero direction indicated by the minimum occupied bit number B' min is the abscissa direction.
In one or more embodiments, M1 is less than K-1; the decoding module 12 is further configured to:
and stopping analyzing the bit index identification bit field corresponding to the point to be decoded, and determining the candidate occupied bit number of the point to be decoded in the M1 non-zero directions as the target occupied bit number of the point to be decoded in the M1 non-zero directions.
In one or more embodiments, the decoding module 12 performs residual value decoding on the point to be decoded in the point cloud according to the encoding mode information, and obtaining a second residual value of the point to be decoded in each of the K directions may include:
determining a non-zero direction of a point to be decoded in the point cloud in K directions based on a residual error numerical value mark field in the coding mode information; when the value of a residual error numerical value mark field of a point to be decoded in the ith direction is a target numerical value, the ith direction is a non-zero direction, and i is a positive integer less than or equal to K;
analyzing the bit number field occupied by the point to be decoded in the ith direction to obtain the target bit number B [ i ] occupied by the point to be decoded in the ith direction;
analyzing the value of B [ i ] bit in the occupied bit value field of the point to be decoded in the ith direction to obtain the residual quotient A1[ i ] of the point to be decoded in the ith direction;
analyzing a residual remainder field corresponding to the point to be decoded in the ith direction to obtain a residual remainder A2[ i ] of the point to be decoded in the ith direction;
and determining a second residual value A' i of the point to be decoded in the ith direction according to the residual quotient A1 i and the residual remainder A2 i.
In one or more embodiments, the decoding module 12 performs residual symbol decoding on the point to be decoded to obtain residual symbol bit information of the point to be decoded in each of the K directions, where the residual symbol bit information includes:
analyzing a residual error sign mark field of the point to be decoded in each direction of K directions to obtain residual error sign bit information of the point to be decoded in each direction of K directions;
when the residual error sign flag field in the ith direction is set as a target numerical value, the residual error sign bit information of the point to be decoded in the ith direction is non-negative; when the residual error sign flag field in the ith direction is not set as a target numerical value, the residual error sign bit information of the point to be decoded in the ith direction is negative; i is a positive integer less than or equal to K.
In one or more embodiments, the decoding module 12 performs residual symbol decoding on the point to be decoded to obtain residual symbol bit information of the point to be decoded in each of the K directions, where the residual symbol bit information may include:
analyzing the symbol identification bit field of the point to be decoded in each direction of K directions to obtain the symbol incidence relation of the point to be decoded and the preorder point in each direction of K directions, and determining the residual error symbol bit information of the point to be decoded in each direction of K directions based on the symbol incidence relation;
when the symbol mark bit field of the point to be decoded in the ith direction is set as a target numerical value, residual error symbol bit information of the point to be decoded and the preorder point in the ith direction is the same; when the symbol identification bit field of the point to be decoded in the ith direction is not set as a target numerical value, the residual error symbol bit information of the point to be decoded and the preorder point in the ith direction is different; the preamble point is a point in the point cloud which is decoded, and i is a positive integer less than or equal to K.
In one or more embodiments, the second residual information includes a second residual value and residual sign bit information; the determining, by the decoding module 12, the first residual information of each direction of the K directions of the point to be decoded based on the second residual information of each direction of the point to be decoded in the K directions may include:
analyzing a residual index identification bit field corresponding to a 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 point to be decoded;
determining the rest directions except the reference direction in the K directions as non-reference directions, and determining a first residual value of a point to be decoded in the reference direction based on the minimum residual value A' min;
determining the sum of a second residual value of the point to be decoded in the non-reference direction and the minimum residual value A' min as a first residual value of the point to be decoded in the non-reference direction;
determining first residual error information of the point to be decoded in each direction of K directions based on a first residual error value of the point to be decoded in the reference direction, a first residual error value of the point to be decoded in the non-reference direction and residual error sign bit information in the second residual error information;
when the residual error index identification bit field is a first identification value, the reference direction is the abscissa direction; when the residual error index identification bit field is a second identification value, the reference direction is a vertical coordinate direction; and when the residual error index identification bit field is the third identification value, the reference direction is the vertical coordinate direction.
In one or more embodiments, the second residual information includes a second residual value and residual sign bit information; the determining, by the decoding module 12, the first residual information of each of the K directions of the point to be decoded based on the second residual information of each of the K directions of the point to be decoded may include:
analyzing a residual error index identification bit field corresponding to the point to be decoded based on the number M1 of the point to be decoded in the non-zero direction in the K directions to obtain a third non-zero direction indicated by the minimum residual error value A' min; the minimum residual value A' min is the minimum value of the M1 second residual values corresponding to the point to be decoded, and M1 is a positive integer less than or equal to K;
determining the rest directions except the third non-zero direction in the M1 non-zero directions as fourth non-zero directions, and determining a first residual value of the point to be decoded in the third non-zero direction based on the minimum residual value A' min;
determining the sum of a second residual value of the point to be decoded in the fourth non-zero direction and the minimum residual value A' min as a first residual value of the point to be decoded in the fourth non-zero direction;
and determining first residual error information of the point to be decoded in each direction of the K directions based on the first residual error value of the point to be decoded in the third non-zero direction, the first residual error value of the point to be decoded in the fourth non-zero direction and residual error sign bit information in the second residual error information.
In one or more embodiments, where M1 is equal to K, the parsing, by decoding module 12, of the residual index flag field corresponding to the point to be decoded to obtain a third non-zero direction indicated by the minimum residual value a' min may include:
if the corresponding residual index identification bit field to be decoded is a first identification value, determining that a first non-zero direction indicated by the minimum residual value A' min is a horizontal coordinate direction;
if the corresponding residual index identification bit field to be decoded is a second identification value, determining that the first non-zero direction indicated by the minimum residual value A' min is the ordinate direction;
and if the corresponding residual index identification bit field to be decoded is a third identification value, determining that the third non-zero direction indicated by the minimum residual value A' min is the vertical coordinate direction.
In one or more embodiments, where M1 is equal to K-1, the parsing, by decoding module 12, of the residual index flag field corresponding to the point to be decoded to obtain a third non-zero direction indicated by the minimum residual value a' min may include:
if the M1 nonzero directions comprise a vertical coordinate direction and a vertical coordinate direction, and a residual index identifier bit field corresponding to the to-be-decoded point is a fourth identifier value, determining that a first nonzero direction indicated by the minimum residual value A' min is the vertical coordinate direction;
if the M1 non-zero directions comprise the horizontal coordinate direction and the vertical coordinate direction, and the corresponding residual index identification bit field to be decoded is the fourth identification value, determining 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 abscissa direction and the ordinate direction, and the residual index flag field corresponding to the point to be decoded is the fourth flag value, it is determined that the first non-zero direction indicated by the minimum residual value a' min is the abscissa direction.
In one or more embodiments, M1 is less than K-1; the decoding module 12 is further configured to:
and stopping analyzing the residual index identification bit field corresponding to the point to be decoded, and determining second residual values of the point to be decoded in M1 non-zero directions as first residual values of the point to be decoded in M1 non-zero directions.
In one or more embodiments, the second residual information includes a second residual value and residual sign bit information; the determining, by the decoding module 12, the first residual information of each of the K directions of the point to be decoded based on the second residual information of each of the K directions of the point to be decoded may include:
determining a default reference direction negotiated by a decoding end and an encoding end in the K directions, and determining directions except the reference direction in the K directions as non-reference directions;
if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis and is a fourth identification value, determining that a second residual value of the point to be decoded in the reference direction is not the minimum residual value A' min, and determining a first residual value of the point to be decoded based on the second residual value of the point to be decoded;
if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis and is a fifth identification value, determining that a second residual value of the point to be decoded in the reference direction is a minimum residual value A ' min, determining a first residual value of the point to be decoded in the reference direction based on the minimum residual value A ' min, and determining the sum of the second residual value of the point to be decoded in the non-reference direction and the minimum residual value A ' min as the first residual value of the point to be decoded in the non-reference direction;
and determining first residual error information of the point to be decoded in each direction in the K directions based on the first residual error value of the point to be decoded in each direction in the K directions and residual error sign bit information in the second residual error information.
In one or more embodiments, the second residual information includes a second residual value and residual sign bit information; the determining, by the decoding module 12, the first residual information of each direction of the K directions of the point to be decoded based on the second residual information of each direction of the point to be decoded in the K directions may include:
determining a default reference direction negotiated by a decoding end and an encoding end in the K directions, and determining directions except the reference direction in the K directions as non-reference directions;
when the second residual value of the point to be decoded in the reference direction is a nonzero value, if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis and is a fourth identification value, determining the first residual value of the point to be decoded based on the second residual value of the point to be decoded;
when the second residual value of the point to be decoded in the reference direction is a non-zero value, if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis and is a fifth identification value, determining that the second residual value of the point to be decoded in the reference direction is a minimum residual value A ' min, determining a first residual value of the point to be decoded in the reference direction based on the minimum residual value A ' min, and determining the sum of the second residual value of the point to be decoded in the non-reference direction and the minimum residual value A ' min as the first residual value of the point to be decoded in the non-reference direction;
and determining first residual error information of the point to be decoded in each direction of the K directions based on the first residual error value of the point to be decoded in each direction of the K directions and residual error sign bit information in the second residual error information.
In one or more embodiments, decoding module 12 is further configured to determine that the point to be decoded does not employ the residual index flag bit field when the second residual value of the point to be decoded in the reference direction is zero.
According to the embodiment of the present application, the units in the point cloud processing apparatus 1 shown in fig. 9 may be combined into one or several other units respectively or all, or one (some) of the units may be further split into multiple functionally smaller units, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can 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 may also include other units, and in practical applications, these functions may also be implemented by being assisted by other units, and may be implemented by cooperation of multiple units.
In the embodiment of the application, in the point cloud decoding process, the encoding mode information of the point cloud can be obtained, the point to be decoded in the point cloud is decoded based on the encoding mode information, the second residual error information of the point to be decoded can be obtained, the first residual error information is further determined based on the second residual error information, the geometric information of the point to be decoded can be reconstructed through the first residual error information, and the first created residual error value in the second residual error information is smaller than or equal to the first residual error value in the first residual error information. In the point cloud decoding process, the second residual error information is inversely predicted through the relevance of the geometric residual error information of the point to be decoded in each direction of the K directions, so that the geometric decoding efficiency of the point cloud can be improved.
Referring to fig. 10, fig. 10 is a schematic structural diagram of another point cloud processing apparatus according to an embodiment of the present disclosure; the point cloud processing means may be a computer program (including program code) running in the encoding device, for example, the point cloud processing means is an application software in the encoding device. Referring to fig. 10, the point cloud processing apparatus 2 may include a determining module 21, a residual information obtaining module 22, and an encoding module 23;
a determining module 21, configured to determine encoding mode information of the point cloud;
a residual information obtaining module 22, configured to obtain first residual information of a point to be encoded in each of K directions in the point cloud; k is a positive integer;
the residual error information obtaining module 22 is further configured to determine, based on the first residual error information of the point to be coded in each of the K directions, second residual error information of the point to be coded 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;
and the encoding module 23 is configured to perform encoding processing on the second residual information of the point to be encoded in each of the K directions according to the encoding mode information.
In one or more embodiments, the determining module 21 is specifically configured to:
acquiring a default coding mode negotiated and set 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 point to be coded in each direction of K directions in the point cloud.
Alternatively, the determining module 21 is specifically configured to:
determining a coding mode in each direction in K directions for a point to be coded in the point cloud, determining the coding mode in each direction in the K directions as coding mode information of the point cloud, and writing the coding mode information into a coding parameter set or a coding code stream of the point cloud.
Alternatively, the determining module 21 is specifically configured to:
acquiring a decision threshold value jointly negotiated and set by a decoding end and an encoding end;
when the judgment threshold comprises a first threshold, acquiring statistical characteristic information corresponding to a first residual value of the point to be encoded, determining an encoding mode of the point to be encoded based on a numerical comparison relation between the statistical characteristic information and the first threshold, and determining the encoding mode of the point to be encoded as encoding mode information of the point cloud;
when the judgment threshold comprises a second threshold, acquiring side length ratio information corresponding to the bounding box of the point cloud, determining a coding mode of the point to be coded based on a numerical comparison relation between the side length ratio information and the second threshold, and determining the coding mode of the point to be coded as coding mode information; the bounding box is used for representing the minimum cuboid containing all points of the point cloud;
when the judgment threshold comprises a third threshold and a fourth threshold, determining a threshold condition range based on the third threshold and the fourth threshold, determining the coding mode of the point to be coded according to the membership between the quantization parameter of the point to be coded and the threshold condition range, and determining the coding mode of the point to be coded as coding mode information.
And writing the judgment threshold and the coding mode information into a coding parameter set or a coding code stream of the point cloud.
In one or more embodiments, the obtaining of the first residual information of the point to be encoded in each of the K directions by the residual information obtaining module 22 may include:
constructing a geometric prediction tree corresponding to the point cloud, and acquiring first residual error information of a point to be coded in the point cloud in each direction of K directions based on the geometric prediction tree;
the first residual error information of the point to be coded in the ith direction comprises a first residual error value of the point to be coded in the ith direction and residual error sign bit information of the point to be coded in the ith direction; when the first residual value of the point to be coded in the ith direction is zero, the first residual value in the ith direction is coded as identification information.
In one or more embodiments, the determining, by the residual information obtaining module 22, the second residual information of each direction of the K directions of the point to be encoded based on the first residual information of each direction of the point to be encoded in the K directions may include:
acquiring a minimum residual value Amin of first residual values of a point to be coded in each direction of K directions, and setting a residual index identification bit field for the minimum residual value Amin; the residual error index identification bit field is used for indicating a reference direction corresponding to the minimum residual error value Amin;
determining the rest directions except the reference direction in the K directions as non-reference directions, and determining a second residual value of the point to be coded in the reference direction based on the minimum residual value Amin;
determining a difference value between a first residual value of a point to be coded in a non-reference direction and a minimum residual value Amin as a second residual value of the point to be coded in the non-reference direction;
determining second residual error information of the point to be coded in each direction of K directions based on a second residual error value of the point to be coded in the reference direction, a second residual error value of the point to be coded in the non-reference direction and residual error sign bit information in the first residual error information;
when the residual error index identification bit field is set as a first identification value, the reference direction is the abscissa direction; when the residual error index identification bit field is a second identification value, the reference direction is a vertical coordinate direction; and when the residual error index identification bit field is the first identification value, the reference direction is the vertical coordinate direction.
In one or more embodiments, the determining, by the residual information obtaining module 22, the second residual information of each direction of the K directions of the point to be encoded based on the first residual information of each direction of the point to be encoded in the K directions may include:
determining a non-zero minimum value in the first residual value of the point to be coded in each direction of K directions as a minimum residual value Amin;
acquiring the quantity M2 of non-zero residual values in K first residual values corresponding to points to be coded, and setting a residual index identification bit field for a minimum residual value Amin based on the quantity M2; the residual index flag field is used to indicate a fifth non-zero direction corresponding to the minimum residual value Amin, M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K;
determining the rest 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 point to be coded in the fifth non-zero direction based on the minimum residual value Amin;
determining a difference value between a first residual value of the point to be coded in a sixth non-zero direction and the minimum residual value Amin as a second residual value of the point to be coded in the sixth non-zero direction;
and determining second residual error information of the point to be coded in each direction of the K directions based on the second residual error value of the point to be coded in the fifth non-zero direction, the second residual error value of the point to be coded in the sixth non-zero direction and residual error sign bit information in the first residual error information.
In one or more embodiments, M2 is equal to K; the residual information obtaining module 22 is further configured to:
if the residual error index identification bit field corresponding to the point to be coded is set as the first identification value, determining that the fifth non-zero direction corresponding to the minimum residual error value Amin is the horizontal coordinate direction;
if the residual error index identification bit field corresponding to the point to be coded is set as a second identification value, determining a fifth non-zero direction corresponding to the minimum residual error value Amin as a longitudinal coordinate direction;
and if the residual error index identification bit field corresponding to the point to be coded is set as the third identification value, determining that the fifth non-zero direction corresponding to the minimum residual error value Amin is the vertical coordinate direction.
In one or more embodiments, M2 is equal to K-1; the residual information obtaining module 22 is further configured to:
if the M2 nonzero directions comprise a vertical coordinate direction and a vertical coordinate direction, and the residual error index flag field is set as a fourth flag value, determining that a fifth nonzero direction corresponding to the minimum residual error value Amin is the vertical coordinate direction;
if the M2 non-zero directions comprise the horizontal coordinate direction and the vertical coordinate direction, and the residual error index flag field is set as the fourth flag value, determining that the fifth non-zero direction corresponding to the minimum residual error value Amin is the horizontal coordinate direction;
if the M2 non-zero directions include the abscissa direction and the ordinate direction, and the residual index flag field is set to the fourth flag value, it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the abscissa direction.
In one or more embodiments, when M2 is less than K-1, the point to be encoded does not employ the residual index identification bit field.
In one or more embodiments, the determining, by the residual information obtaining module 22, the second residual information of each direction of the K directions of the point to be encoded based on the first residual information of each direction of the point to be encoded in the K directions may include:
determining a reference direction in the K directions, and determining directions except the reference direction in the K directions as non-reference directions;
if the first residual error value of the point to be coded in the reference direction is not the minimum residual error value Amin of the point to be coded, setting a residual error index identification bit field of the point to be coded as a fourth identification value, and determining a second residual error value of the point to be coded based on the first residual error value of the point to be coded;
if the first residual value of the point to be coded in the reference direction is the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fifth identification value, determining a second residual value of the point to be coded in the reference direction based on the minimum residual value Amin, and determining a difference value between the first residual value of the point to be coded in the non-reference direction and the minimum residual value Amin as the second residual value of the point to be coded in the non-reference direction;
and determining second residual error information of the point to be coded in each direction of the K directions based on the second residual error value of the point to be coded in each direction of the K directions and the residual error sign bit information in the first residual error information.
In one or more embodiments, the determining, by the residual information obtaining module 22, the second residual information of each direction of the K directions of the point to be encoded based on the first residual information of each direction of the point to be encoded in the K directions may include:
determining a reference direction in the K directions, determining the directions except the reference direction in the K directions as non-reference directions, and determining a first residual value of a point to be coded in the reference direction as a reference residual value;
if the reference residual value is a non-zero value and the reference residual value is not the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fourth identification value, and determining a second residual value of the point to be coded based on the first residual value of the point to be coded;
if the reference residual value is a non-zero value and the reference residual value is the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fifth identification value, determining a second residual value of the point to be coded in the reference direction based on the minimum residual value Amin, and determining a difference value between a first residual value of the point to be coded in the non-reference direction and the minimum residual value Amin as the second residual value of the point to be coded in the non-reference direction;
and determining second residual error information of the point to be coded in each direction of the K directions based on the second residual error value of the point to be coded in each direction of the K directions and the residual error sign bit information in the first residual error information.
In one or more embodiments, the residual information obtaining module 22 is further configured to:
and if the reference residual value is zero, determining that the point to be coded does not adopt the residual index identification bit field.
In one or more embodiments, the encoding module 23 is specifically configured to:
according to the coding mode information, coding a second residual error value of the point to be coded in each direction of the K directions;
and coding residual sign bit information of each direction of the point to be coded in the K directions.
In one or more embodiments, the encoding module 23 may encode the second residual value of the point to be encoded in each of the K directions according to the encoding mode information, including:
carrying out logarithm operation on non-zero residual values in second residual values of the point to be coded in each direction of the K directions to obtain target occupied bit numbers of the point to be coded in each direction of the K directions;
determining the candidate occupation bit number of the point to be coded in each direction in the K directions based on the target occupation bit number of the point to be coded in each direction in the K directions;
and coding the value corresponding to each bit in the candidate occupied bit number of the point to be coded in each direction in the K directions based on the occupied bit value field.
In one or more embodiments, the determining, by the encoding module 23, the candidate number of occupied bits of the point to be encoded in each of the K directions based on the target number of occupied bits of the point to be encoded in each of the K directions may include:
setting a bit index identification bit field for the point to be coded based on the number M2 of non-zero residual values in the K first residual values corresponding to the point to be coded; the bit index identification bit field is used for indicating a seventh non-zero direction corresponding to a minimum occupied bit number Bmin, the minimum occupied bit number Bmin is the minimum value of K target occupied bit numbers corresponding to a to-be-coded point, M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K;
determining the rest directions except the seventh non-zero direction in the M2 non-zero directions as eighth non-zero directions, and determining the candidate occupation bit number of the point to be coded in the seventh non-zero direction based on the minimum occupation bit number Bmin;
and determining the difference between the target occupied bit number of the point to be coded in the eighth non-zero direction and the minimum occupied bit number Bmin as the candidate occupied bit number of the point to be coded in the eighth non-zero direction.
In one or more embodiments, the encoding module 23 may encode the second residual value of the point to be encoded in each of the K directions according to the encoding mode information, including:
determining M2 nonzero directions of points to be coded in K directions; the first residual values of the points to be coded in the M2 nonzero directions are nonzero residual values, and M2 is a positive integer smaller than or equal to K;
performing residue taking calculation on a second residual value A ' [ i ] of the point to be coded 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;
determining candidate occupied bit number B ' i of residual quotient A '1 i, representing the candidate occupied bit number B ' i by adopting an occupied bit number field corresponding to a point to be coded in the ith direction, and coding the occupied bit number field;
adopting a residual residue number field corresponding to a point to be coded in the ith direction to represent a residual residue A'2[ i ], and coding the residual residue field;
and adopting B 'i bit elements in an occupied bit number field corresponding to the point to be coded in the ith direction to represent the value of each bit in B' i bit occupied by the residual quotient A '1 i, and coding the B' i bit elements in the occupied bit value field.
In one or more embodiments, the encoding module 23 may encode the residual sign bit information of the point to be encoded in each of K directions, including:
setting a residual error sign flag field of the point to be coded in each direction in K directions based on residual error sign bit information of the point to be coded in each direction in K directions, and coding the numerical value of the residual error sign flag field in each direction in K directions;
when the residual error sign bit information of the point to be coded in the ith direction is non-negative, setting a residual error sign mark field of the point to be coded in the ith direction as a target numerical value; when the residual error sign bit information of the point to be coded in the ith direction is negative, setting a residual error sign flag field of the point to be coded in the ith direction as a non-target numerical value; i is a positive integer less than or equal to K.
In one or more embodiments, the encoding module 23 may encode the residual sign bit information of the point to be encoded in each of K directions, including:
setting a symbol identification bit field of the point to be coded in each direction in K directions according to the symbol incidence relation between the point to be coded and the preorder point in each direction in K directions, and coding the numerical value of the symbol identification bit field in each direction in K directions;
when residual error sign bit information of a point to be coded and a preorder point in the ith direction is the same, setting a sign identification bit field of the point to be coded in the ith direction as a target numerical value; when the residual error sign bit information of the point to be coded and the preorder point in the ith direction is different, setting a sign identification bit field of the point to be coded in the ith direction as a non-target numerical value; the preamble point is a point which is coded in the point cloud, and i is a positive integer less than or equal to K.
According to the embodiment of the present application, the units in the point cloud processing apparatus 2 shown in fig. 10 may be respectively or entirely combined into one or several other units to form the structure, or some unit(s) may be further split into multiple functionally smaller units to form the structure, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can 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 2 may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of multiple units.
In the embodiment of the application, in the process of encoding the point cloud, encoding mode information of the point cloud can be determined; acquiring first residual error information of a point to be coded in the point cloud in each direction of K directions based on a geometric prediction tree; second residual error information of the point to be coded in each direction in the K directions can be obtained through second prediction; a first residual value in the first residual information is greater than or equal to a second residual value in the second residual information; and according to the coding mode information, coding second residual information of the point to be coded in each direction of the K directions. By utilizing the relevance of the first residual value of the point to be coded in the front-rear sequence or in each direction, the residual coding value can be reduced, and the geometric coding efficiency is further improved; and the residue-taking coding can be adopted to code the second residual value or the candidate occupied bit number, so that the residual coding value can be further reduced, and the geometric coding efficiency can be further improved on the basis of not influencing the point cloud single-point reconstruction.
Further, please refer to fig. 11, wherein fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 11, the computer device 1000 may be a user terminal or a server, which is not limited in this application. For convenience of understanding, in the present application, a computer device is taken as an example of a user terminal, and the computer device 1000 may include: the processor 1001, the network interface 1004, and the memory 1005, and the computer apparatus 1000 may further include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may alternatively be at least one memory device located remotely from the processor 1001. As shown in fig. 11, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
The network interface 1004 in the computer device 1000 may also provide a network communication function, and the optional user interface 1003 may also include a Display screen (Display) and a Keyboard (Keyboard). In the computer device 1000 shown in fig. 11, the network interface 1004 may provide a network communication function; and the user interface 1003 is primarily used to provide an interface for user input.
When the computer device 1000 is a decoding device, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:
acquiring encoding mode information of the point cloud;
decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual information of the point to be decoded in each direction of the K directions; k is a positive integer;
determining first residual error information of the point to be decoded in each direction of the K directions based on second residual error information of the point to be decoded in each direction 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 reconstructing the geometric information of the point to be decoded according to the first residual information of the point to be decoded in each direction of the K directions.
When the computer device 1000 is an encoding device, the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
determining encoding mode information of the point cloud;
acquiring first residual error information of a point to be coded in each direction of K directions in a point cloud; k is a positive integer;
determining second residual error information of the point to be coded in each direction of the K directions based on the first residual error information of the point to be coded in each direction 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;
and according to the coding mode information, coding second residual information of the point to be coded in each direction of the K directions.
It should be understood that the computer device 1000 described in this embodiment of the present application may perform the description of the point cloud processing method in the embodiment corresponding to fig. 7 or fig. 8, and may also perform the description of the point cloud processing apparatus 1 in the embodiment corresponding to fig. 9 or the point cloud processing apparatus 2 in the embodiment corresponding to fig. 10, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer-readable storage medium, where the aforementioned computer program executed by the point cloud processing apparatus 1 or the cloud processing apparatus 2 is stored in the computer-readable storage medium, and the computer program includes a computer instruction, and when the processor executes the computer instruction, the description of the point cloud processing method in the embodiment corresponding to fig. 7 or fig. 8 can be executed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. As an example, computer instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network, which may constitute a block chain system.
Further, it should be noted that: embodiments of the present application also provide a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor can execute the computer instruction, so that the computer device executes the description of the point cloud processing method in the embodiment corresponding to fig. 7 or fig. 8, which will not be described herein again. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer program product or the computer program referred to in the present application, reference is made to the description of the embodiments of the method of the present application.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The modules in the device can be merged, divided and deleted according to actual needs.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (30)

1. A point cloud processing method, comprising:
acquiring coding mode information of the point cloud;
decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual error information of the point to be decoded in each direction of the K directions; k is a positive integer;
determining first residual error information of the point to be decoded in each direction of the K directions based on second residual error information of the point to be decoded in each direction 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 reconstructing the geometric information of the point to be decoded according to the first residual error information of the point to be decoded in each direction of the K directions.
2. The method of claim 1, wherein the obtaining of the encoding mode information of the point cloud comprises:
acquiring a default coding mode which is negotiated and set by a decoding end and a coding end together, 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 point to be decoded in the point cloud; alternatively, the first and second electrodes may be,
analyzing the encoding parameter set or the encoding code stream of the point cloud to obtain the encoding mode of the point to be decoded in each direction of the K directions in the point cloud, and determining the encoding mode of the point to be decoded as the encoding mode information of the point cloud.
3. The method of claim 1, wherein obtaining the encoding mode information of the point cloud comprises:
acquiring a judgment threshold corresponding to the point cloud; the judgment threshold is determined by common negotiation of an encoding end and a decoding end, or the judgment threshold is obtained by analysis from an encoding parameter set or an encoding code stream of the point cloud;
when the judgment threshold comprises a first threshold, obtaining statistical characteristic information corresponding to residual analysis information of a point to be decoded, determining a coding mode of the point to be decoded based on a numerical comparison relation between the statistical characteristic information and the first threshold, and determining the coding mode of the point to be decoded as the coding mode information;
when the judgment threshold comprises a second threshold, acquiring side length ratio information corresponding to the bounding box of the point cloud, determining the coding mode of the point to be decoded based on the numerical comparison relationship between the side length ratio information and the second threshold, and determining the coding mode of the point to be decoded as the coding mode information; the bounding box is used to characterize a smallest cuboid containing all points in the point cloud;
when the judgment threshold comprises a third threshold and a fourth threshold, determining a threshold condition range based on the third threshold and the fourth threshold, determining the encoding mode of the point to be decoded according to the dependency relationship between the quantization parameter of the point to be decoded and the threshold condition range, and determining the encoding mode of the point to be decoded as the encoding mode information.
4. The method of claim 1, wherein the decoding process comprises residual value decoding and residual symbol decoding;
decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual information of the point to be decoded in each direction of the K directions, wherein the decoding process comprises the following steps:
according to the coding mode information, residual error value decoding is carried out on the point to be decoded in the point cloud, and second residual error values of the point to be decoded in each direction of the K directions are obtained;
residual error sign decoding is carried out on the point to be decoded to obtain residual error sign bit information of the point to be decoded in each direction of the K directions;
and determining second residual error information of the point to be decoded in each direction of the K directions based on the second residual error value of the point to be decoded in each direction of the K directions and the residual error sign bit information of the point to be decoded in each direction of the K directions.
5. The method according to claim 4, wherein said decoding, according to the coding mode information, residual values of the point to be decoded in the point cloud to obtain second residual values of the point to be decoded in each of the K directions comprises:
determining a non-zero direction of points to be decoded in the point cloud in the K directions; when a residual error numerical value flag field of the point to be decoded in the ith direction is set as a target numerical value, the ith direction is a non-zero direction, and i is a positive integer less than or equal to K;
determining the target bit occupation number of the point to be decoded in the non-zero direction by analyzing the bit occupation number field of the point to be decoded in the non-zero direction;
and analyzing an occupied bit numerical field of the point to be decoded in the non-zero direction based on the target occupied bit number to obtain a second residual value of the point to be decoded in the non-zero direction.
6. The method of claim 5, wherein the number of non-zero directions is M1, M1 is a positive integer less than or equal to K;
the determining the target bit occupation number of the point to be decoded in the non-zero direction by analyzing the bit occupation number field of the point to be decoded in the non-zero direction includes:
sequentially analyzing occupied bit digit fields of the point to be decoded in M1 non-zero directions to obtain candidate occupied bit digits of the point to be decoded in M1 non-zero directions;
analyzing a bit index identification bit field corresponding to the point to be decoded to obtain a first non-zero direction indicated by a minimum bit occupation number B' min; the minimum occupied bit number B' min is the minimum value of M1 candidate occupied bit numbers corresponding to the point to be decoded;
determining the rest directions except the first non-zero direction in the M1 non-zero directions as second non-zero directions, and determining the target occupied bit number of the point to be decoded in the first non-zero direction based on the minimum occupied bit number B' min;
and determining the sum of the candidate occupied bit number of the point to be decoded in the second non-zero direction and the minimum occupied bit number B' min as the target occupied bit number of the point to be decoded in the second non-zero direction.
7. The method according to claim 4, wherein said decoding, according to the coding mode information, residual values of the point to be decoded in the point cloud to obtain second residual values of the point to be decoded in each of the K directions comprises:
determining a non-zero direction of a point to be decoded in the point cloud in the K directions based on a residual numerical value flag field in the encoding mode information; when the value of the residual error numerical value mark field of the point to be decoded in the ith direction is a target numerical value, the ith direction is a non-zero direction, and i is a positive integer less than or equal to K;
analyzing the field of the bit number occupied by the point to be decoded in the ith direction to obtain the target bit number occupied by the point to be decoded in the ith direction;
analyzing the value of B [ i ] bit in the occupied bit value field of the point to be decoded in the ith direction to obtain the residual quotient A1[ i ] of the point to be decoded in the ith direction;
analyzing a residual residue field corresponding to the point to be decoded in the ith direction to obtain a residual residue A2[ i ] of the point to be decoded in the ith direction;
and determining a second residual value A' [ i ] of the point to be decoded in the ith direction according to the residual quotient A1[ i ] and the residual remainder A2[ i ].
8. The method according to claim 4, wherein said residual sign decoding said point to be decoded to obtain residual sign bit information of said point to be decoded in each of said K directions, comprises:
analyzing the residual error sign mark field of the point to be decoded in each direction of the K directions to obtain the residual error sign bit information of the point to be decoded in each direction of the K directions;
when the residual error sign flag field in the ith direction is set as a target numerical value, the residual error sign bit information of the point to be decoded in the ith direction is non-negative; when the residual error sign flag field in the ith direction is not set to a target numerical value, the residual error sign bit information of the point to be decoded in the ith direction is negative; i is a positive integer less than or equal to K.
9. The method according to claim 4, wherein said residual sign decoding said point to be decoded to obtain residual sign bit information of said point to be decoded in each of said K directions, comprises:
analyzing the symbol identification bit field of the point to be decoded in each direction of the K directions to obtain the symbol association relationship between the point to be decoded and the preorder point in each direction of the K directions, and determining residual error symbol bit information of the point to be decoded in each direction of the K directions based on the symbol association relationship;
when the symbol mark bit field of the point to be decoded in the ith direction is set as a target numerical value, the residual error symbol bit information of the point to be decoded and the preorder point in the ith direction is the same; when the symbol mark bit field of the point to be decoded in the ith direction is not set as a target numerical value, the residual error symbol bit information of the point to be decoded and the preorder point in the ith direction is different; the preamble point is a point in the point cloud which is decoded, and i is a positive integer less than or equal to K.
10. The method of claim 1, wherein the second residual information comprises a second residual value and residual sign bit information;
the determining, based on the second residual information of the point to be decoded in each of the K directions, the first residual information of the point to be decoded in each of the K directions comprises:
analyzing 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 point to be decoded;
determining the rest directions except the reference direction in the K directions as non-reference directions, and determining a first residual value of the point to be decoded in the reference direction based on the minimum residual value A' min;
determining the sum of a second residual value of the point to be decoded in the non-reference direction and the minimum residual value A' min as a first residual value of the point to be decoded in the non-reference direction;
determining first residual information of the point to be decoded in each direction of the K directions based on a first residual value of the point to be decoded in the reference direction, a first residual value of the point to be decoded in the non-reference direction, and residual sign bit information in the second residual information;
when the residual index identification bit field is a first identification value, the reference direction is the abscissa direction; when the residual index identification bit field is a second identification value, the reference direction is a vertical coordinate direction; and when the residual error index identification bit field is a third identification value, the reference direction is a vertical coordinate direction.
11. The method of claim 1, wherein the second residual information comprises a second residual value and residual sign bit information;
the determining, based on the second residual information of the point to be decoded in each of the K directions, first residual information of the point to be decoded in each of the K directions includes:
analyzing a residual index identification bit field corresponding to the point to be decoded based on the number M1 of the point to be decoded in the non-zero direction in the K directions to obtain a third non-zero direction indicated by a minimum residual value A' min; wherein the minimum residual value A' min is the minimum value of M1 second residual values corresponding to the point to be decoded, and M1 is a positive integer less than or equal to K;
determining the rest of the M1 non-zero directions except the third non-zero direction as a fourth non-zero direction, and determining a first residual value of the point to be decoded in the third non-zero direction based on the minimum residual value A' min;
determining the sum of a second residual value of the point to be decoded in the fourth non-zero direction and the minimum residual value A' min as a first residual value of the point to be decoded in the fourth non-zero direction;
and determining first residual error information of the point to be decoded in each direction of the K directions based on the first residual error value of the point to be decoded in the third non-zero direction, the first residual error value of the point to be decoded in the fourth non-zero direction and residual error sign bit information in the second residual error information.
12. The method of claim 11, wherein M1 is equal to K; analyzing a residual index flag bit field corresponding to the to-be-decoded point to obtain a third non-zero direction indicated by a minimum residual value A' min, including:
if the corresponding residual index identification bit field to be decoded is a first identification value, determining that a first non-zero direction indicated by the minimum residual value A' min is a horizontal coordinate direction;
if the corresponding residual index identification bit field to be decoded is a second identification value, determining that the first non-zero direction indicated by the minimum residual value A' min is a vertical coordinate direction;
and if the residual index identification bit field corresponding to the to-be-decoded point is a third identification value, determining that a third non-zero direction indicated by the minimum residual value A' min is a vertical coordinate direction.
13. The method of claim 11, wherein M1 is equal to K-1;
analyzing a residual index flag bit field corresponding to the to-be-decoded point to obtain a third non-zero direction indicated by a minimum residual value A' min, including:
if the M1 nonzero directions comprise a vertical coordinate direction and a vertical coordinate direction, and a residual index identifier bit field corresponding to the to-be-decoded point is a fourth identifier value, determining that a first nonzero direction indicated by the minimum residual value A' min is the vertical coordinate direction;
if the M1 nonzero directions comprise a horizontal coordinate direction and a vertical coordinate direction, and a residual index identification bit field corresponding to the to-be-decoded point is a fourth identification value, determining that a first nonzero direction indicated by the minimum residual value A' min is the horizontal coordinate direction;
and if the M1 nonzero directions comprise an abscissa direction and an ordinate direction, and the corresponding residual index identification bit field to be decoded is a fourth identification value, determining that the first nonzero direction indicated by the minimum residual value A' min is the abscissa direction.
14. The method of claim 11, wherein M1 is less than K "1; the method further comprises the following steps:
and stopping analyzing the residual index identification bit field corresponding to the point to be decoded, and determining second residual values of the point to be decoded in M1 non-zero directions as first residual values of the point to be decoded in M1 non-zero directions.
15. The method of claim 1, wherein the second residual information comprises a second residual value and residual sign bit information;
the determining, based on the second residual information of the point to be decoded in each of the K directions, first residual information of the point to be decoded in each of the K directions includes:
determining a default reference direction negotiated by a decoding end and an encoding end in the K directions, and determining directions except the reference direction in the K directions as non-reference directions;
if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis as a fourth identification value, determining that a second residual value of the point to be decoded in the reference direction is not a minimum residual value A' min, and determining a first residual value of the point to be decoded based on the second residual value of the point to be decoded;
if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis and is a fifth identification value, determining that a second residual value of the point to be decoded in the reference direction is a minimum residual value A ' min, determining a first residual value of the point to be decoded in the reference direction based on the minimum residual value A ' min, and determining the sum of the second residual value of the point to be decoded in the non-reference direction and the minimum residual value A ' min as the first residual value of the point to be decoded in the non-reference direction;
and determining first residual error information of the point to be decoded in each direction of the K directions based on the first residual error value of the point to be decoded in each direction of the K directions and residual error sign bit information in the second residual error information.
16. The method of claim 1, wherein the second residual information comprises a second residual value and residual sign bit information;
the determining, based on the second residual information of the point to be decoded in each of the K directions, first residual information of the point to be decoded in each of the K directions includes:
determining a default reference direction negotiated by a decoding end and an encoding end in the K directions, and determining directions except the reference direction in the K directions as non-reference directions;
when the second residual value of the point to be decoded in the reference direction is a nonzero value, if the residual index identification bit field corresponding to the point to be decoded is obtained through analysis and is a fourth identification value, determining the first residual value of the point to be decoded based on the second residual value of the point to be decoded;
when the second residual value of the point to be decoded in the reference direction is a nonzero value, if a residual index identification bit field corresponding to the point to be decoded is analyzed to be a fifth identification value, determining that the second residual value of the point to be decoded in the reference direction is a minimum residual value A ' min, determining a first residual value of the point to be decoded in the reference direction based on the minimum residual value A ' min, and determining the sum of the second residual value of the point to be decoded in the non-reference direction and the minimum residual value A ' min as the first residual value of the point to be decoded in the non-reference direction;
and determining first residual error information of the point to be decoded in each direction of the K directions based on the first residual error value of the point to be decoded in each direction of the K directions and residual error sign bit information in the second residual error information.
17. A point cloud processing method, comprising:
determining encoding mode information of the point cloud;
acquiring first residual error information of a point to be coded in the point cloud in each of K directions; k is a positive integer;
determining second residual error information of the point to be coded in each direction of the K directions based on first residual error information of the point to be coded in each direction 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;
and according to the coding mode information, coding second residual error information of the point to be coded in each direction of the K directions.
18. The method of claim 17, wherein obtaining first residual information for each of K directions for a point to be encoded in the point cloud comprises:
constructing a geometric prediction tree corresponding to the point cloud, and acquiring first residual error information of a point to be coded in the point cloud in each direction of the K directions based on the geometric prediction tree;
the first residual error information of the point to be coded in the ith direction comprises a first residual error value of the point to be coded in the ith direction and residual error sign bit information of the point to be coded in the ith direction; and when the first residual value of the point to be coded in the ith direction is zero, the first residual value in the ith direction is coded as identification information.
19. The method of claim 18, wherein the determining second residual information for each of the K directions for the point to be coded based on the first residual information for each of the K directions for the point to be coded comprises:
acquiring a minimum residual value Amin of first residual values of the point to be coded in each direction of the K directions, and setting a residual index identification bit field for the minimum residual value Amin; the residual error index identification bit field is used for indicating a reference direction corresponding to the minimum residual error value Amin;
determining the rest directions except the reference direction in the K directions as non-reference directions, and determining a second residual value of the point to be coded in the reference direction based on the minimum residual value Amin;
determining a difference value between a first residual difference value of the point to be coded in the non-reference direction and the minimum residual value Amin as a second residual difference value of the point to be coded in the non-reference direction;
determining second residual error information of the point to be coded in each direction of the K directions based on a second residual error value of the point to be coded in the reference direction, a second residual error value of the point to be coded in the non-reference direction and residual error sign bit information in the first residual error information;
when the residual error index identification bit field is set to be a first identification value, the reference direction is a horizontal coordinate direction; when the residual error index identification bit field is a second identification value, the reference direction is a vertical coordinate direction; and when the residual error index identification bit field is a first identification value, the reference direction is a vertical coordinate direction.
20. The method according to claim 18, wherein said determining second residual information for each direction of the K directions of the point to be coded based on the first residual information for each direction of the point to be coded comprises:
determining a non-zero minimum value in the first residual value of the point to be coded in each direction of the K directions as a minimum residual value Amin;
acquiring the quantity M2 of non-zero residual values in the K first residual values corresponding to the points to be coded, and setting a residual index identification bit field for the minimum residual value Amin based on the quantity M2; the residual index flag field is used for indicating a fifth non-zero direction corresponding to the minimum residual value Amin, M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K;
determining the rest 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 point to be encoded in the fifth non-zero direction based on the minimum residual value Amin;
determining a difference value between a first residual value of the point to be coded in the sixth non-zero direction and the minimum residual value Amin as a second residual value of the point to be coded in the sixth non-zero direction;
and determining second residual error information of the point to be coded in each direction of the K directions based on a second residual error value of the point to be coded in the fifth non-zero direction, a second residual error value of the point to be coded in the sixth non-zero direction and residual error sign bit information in the first residual error information.
21. The method of claim 18, wherein the determining second residual information for each of the K directions for the point to be coded based on the first residual information for each of the K directions for the point to be coded comprises:
determining a reference direction among the K directions, and determining directions other than the reference direction among the K directions as non-reference directions;
if the first residual error value of the point to be coded in the reference direction is not the minimum residual error value Amin of the point to be coded, setting a residual error index identification bit field of the point to be coded as a fourth identification value, and determining a second residual error value of the point to be coded based on the first residual error value of the point to be coded;
if the first residual value of the point to be coded in the reference direction is the minimum residual value Amin of the point to be coded, setting a residual index identification bit field of the point to be coded as a fifth identification value, determining a second residual value of the point to be coded in the reference direction based on the minimum residual value Amin, and determining a difference value between the first residual value of the point to be coded in the non-reference direction and the minimum residual value Amin as the second residual value of the point to be coded in the non-reference direction;
and determining second residual error information of the point to be coded in each direction of the K directions based on the second residual error value of the point to be coded in each direction of the K directions and residual error sign bit information in the first residual error information.
22. The method according to any one of claims 17 to 21, wherein said encoding, according to the coding mode information, second residual information of the point to be encoded in each of the K directions comprises:
according to the coding mode information, coding a second residual error value of the point to be coded in each direction of the K directions;
and coding residual sign bit information of the point to be coded in each direction of the K directions.
23. The method according to claim 22, wherein said encoding a second residual value of the point to be encoded in each of the K directions according to the encoding mode information comprises:
carrying out logarithm operation on a non-zero residual value in a second residual value of the point to be coded in each direction of the K directions to obtain a target occupied bit number of the point to be coded in each direction of the K directions;
determining the candidate bit number of the point to be coded in each direction of the K directions based on the target bit number of the point to be coded in each direction of the K directions;
and coding the value corresponding to each bit in the candidate occupied bit number of the point to be coded in each direction of the K directions on the basis of an occupied bit value field.
24. The method according to claim 23, wherein said determining the number of candidate occupied bits of the point to be encoded in each of the K directions based on the target number of occupied bits of the point to be encoded in each of the K directions comprises:
setting a bit index identification bit field for the point to be coded based on the number M2 of non-zero residual values in the K first residual values corresponding to the point to be coded; the bit index identification bit field is used for indicating a seventh non-zero direction corresponding to a minimum occupied bit number Bmin, the minimum occupied bit number Bmin is the minimum value of K target occupied bit numbers corresponding to the to-be-encoded point, M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K;
determining the rest directions except the seventh non-zero direction in the M2 non-zero directions as eighth non-zero directions, and determining the candidate occupation bit number of the point to be coded in the seventh non-zero direction based on the minimum occupation bit number Bmin;
and determining the difference value between the target occupied bit number of the point to be coded in the eighth non-zero direction and the minimum occupied bit number Bmin as the candidate occupied bit number of the point to be coded in the eighth non-zero direction.
25. The method according to claim 22, wherein said encoding a second residual value of the point to be encoded in each of the K directions according to the encoding mode information comprises:
determining M2 non-zero directions of the K directions of the point to be encoded; the first residual values of the point to be encoded in the M2 non-zero directions are non-zero residual values, and M2 is a positive integer smaller than or equal to K;
carrying out residue taking calculation on a second residual value A ' [ i ] of the point to be coded 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;
determining a candidate occupied bit number B ' i of the residual quotient A '1 i, representing the candidate occupied bit number B ' i by adopting an occupied bit number field corresponding to the point to be coded in the ith direction, and coding the occupied bit number field;
adopting a residual residue number field corresponding to the point to be coded in the ith direction to represent the residual residue A'2[ i ], and coding the residual residue field;
and adopting B '[ i ] bit elements in an occupied bit number field corresponding to the point to be coded in the ith direction to represent the value of each bit in the B' [ i ] bit occupied by the residual quotient A '1[ i ], and coding the B' [ i ] bit elements in the occupied bit value field.
26. The method according to claim 22, wherein said encoding residual sign bit information of said point to be encoded in each of said K directions comprises:
setting a symbol identification bit field of the point to be coded in each direction in the K directions according to the symbol incidence relation between the point to be coded and the preamble point in each direction in the K directions, and coding the numerical value of the symbol identification bit field in each direction in the K directions;
when residual error sign bit information of a point to be coded and the preamble point in the ith direction is the same, setting a sign bit field of the point to be coded in the ith direction as a target numerical value; when residual error sign bit information of a point to be coded and the preorder point in the ith direction is different, setting a sign identification bit field of the point to be coded in the ith direction as a non-target numerical value; the preamble point is a point which is coded in the point cloud, and i is a positive integer less than or equal to K.
27. A point cloud processing apparatus, comprising:
the acquisition module is used for acquiring the encoding mode information of the point cloud;
the decoding module is used for decoding the point to be decoded in the point cloud according to the coding mode information to obtain second residual information of the point to be decoded in each direction of K directions; k is a positive integer;
the decoding module is further configured to determine first residual information of the point to be decoded in each of the K directions based on second residual information of the point to be decoded 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 reconstruction module is used for reconstructing the geometric information of the point to be decoded according to the first residual error information of the point to be decoded in each direction of the K directions.
28. A point cloud processing apparatus, comprising:
the determining module is used for determining the encoding mode information of the point cloud;
the residual error information acquisition module is used for acquiring first residual error information of the point to be coded in each direction of K directions in the point cloud; k is a positive integer;
the residual error information obtaining module is further configured to determine, based on first residual error information of the point to be encoded in each of the K directions, second residual error information of the point to be encoded 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;
and the coding module is used for coding the second residual error information of the point to be coded in each direction of the K directions according to the coding mode information.
29. A computer device comprising a memory and a processor;
the memory is connected to the processor, the memory being configured to store a computer program, the processor being configured to invoke the computer program to cause the computer device to perform the method of any of claims 1 to 16, or to perform the method of any of claims 17 to 26.
30. A computer-readable storage medium, in which a computer program is stored which is adapted to be loaded and executed by a processor, to cause a computer device having the processor to perform the method of any of claims 1 to 16, or to perform the method of any of claims 17 to 26.
CN202210691565.3A 2022-06-18 2022-06-18 Point cloud processing method, device, equipment and medium Pending CN115100302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210691565.3A CN115100302A (en) 2022-06-18 2022-06-18 Point cloud processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210691565.3A CN115100302A (en) 2022-06-18 2022-06-18 Point cloud processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115100302A true CN115100302A (en) 2022-09-23

Family

ID=83290599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210691565.3A Pending CN115100302A (en) 2022-06-18 2022-06-18 Point cloud processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115100302A (en)

Similar Documents

Publication Publication Date Title
CN113615181B (en) Method and device for point cloud encoding and decoding
CN114598892B (en) Point cloud data encoding method, decoding method, device, equipment and storage medium
CN113632142A (en) Method and device for point cloud compression
US20220376702A1 (en) Methods and devices for tree switching in point cloud compression
WO2022121650A1 (en) Point cloud attribute predicting method, encoder, decoder, and storage medium
CN115379191B (en) Point cloud decoding method, point cloud encoding method and related equipment
WO2023241107A1 (en) Point cloud processing method and apparatus, computer device and storage medium
CN115379190B (en) Point cloud processing method and device, computer equipment and storage medium
CN115102935B (en) Point cloud encoding method, point cloud decoding method and related equipment
CN115086660B (en) Decoding and encoding method based on point cloud attribute prediction, decoder and encoder
US20220180567A1 (en) Method and apparatus for point cloud coding
CN115100302A (en) Point cloud processing method, device, equipment and medium
WO2023024840A1 (en) Point cloud encoding and decoding methods, encoder, decoder and storage medium
WO2024065269A1 (en) Point cloud encoding and decoding method and apparatus, device, and storage medium
CN115474041B (en) Method and device for predicting point cloud attribute and related equipment
US20240087174A1 (en) Coding and decoding point cloud attribute information
US20240087176A1 (en) Point cloud decoding method and apparatus, point cloud encoding method and apparatus, computer device, computer-readable storage medium
US20230412837A1 (en) Point cloud data transmission method, point cloud data transmission device, point cloud data reception method, and point cloud data reception device
US20230206510A1 (en) Point cloud data processing device and processing method
US20240037799A1 (en) Point cloud coding/decoding method and apparatus, device and storage medium
CN116320352A (en) Point cloud processing method and device, computer equipment and storage medium
CN116248893A (en) Point cloud coding method, device, equipment and storage medium based on predictive tree
CN116634179A (en) Point cloud data processing method and device, electronic equipment and storage medium
CN116016951A (en) Point cloud processing method, device, equipment and storage medium
CN117061770A (en) Point cloud processing method, device, equipment, storage medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40074432

Country of ref document: HK