WO2023240660A1 - 解码方法、编码方法、解码器以及编码器 - Google Patents

解码方法、编码方法、解码器以及编码器 Download PDF

Info

Publication number
WO2023240660A1
WO2023240660A1 PCT/CN2022/099635 CN2022099635W WO2023240660A1 WO 2023240660 A1 WO2023240660 A1 WO 2023240660A1 CN 2022099635 W CN2022099635 W CN 2022099635W WO 2023240660 A1 WO2023240660 A1 WO 2023240660A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
algorithm
encoded
decoded
decoding
Prior art date
Application number
PCT/CN2022/099635
Other languages
English (en)
French (fr)
Inventor
魏红莲
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/099635 priority Critical patent/WO2023240660A1/zh
Publication of WO2023240660A1 publication Critical patent/WO2023240660A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding

Definitions

  • the embodiments of the present application relate to the field of coding and decoding technology, and more specifically, to a decoding method, an encoding method, a decoder, and an encoder.
  • Point cloud has begun to spread into various fields, such as virtual/augmented reality, robotics, geographic information systems, medical fields, etc.
  • various fields such as virtual/augmented reality, robotics, geographic information systems, medical fields, etc.
  • a large number of point clouds on the surface of objects can be accurately obtained, often corresponding to hundreds of thousands of points in one scene.
  • Such a large number of points also poses challenges for computer storage and transmission. Therefore, point compression has become a hot issue.
  • the encoder For point cloud compression, it is mainly necessary to compress its geometric information and attribute information. Specifically, the encoder first divides the geometric information of the point cloud into octrees, and then uses an entropy coding algorithm to entropy encode the geometric information expressed through the octree structure to obtain a geometric code stream. At the same time, the encoder reconstructs the geometric information based on the geometric information expressed through the octree structure, predicts the attribute information of the current point based on the reconstructed geometric information, and obtains the current point by making a difference with the original value of the attribute information. The residual of the point is then quantized to obtain the quantized residual, and the entropy coding algorithm is used to entropy encode the quantized residual to obtain the attribute code stream.
  • Embodiments of the present application provide a decoding method, encoding method, decoder and encoder, which can improve entropy decoding performance.
  • this application provides a decoding method, including:
  • the value to be decoded is decoded using at least one entropy decoding algorithm maintained by the decoder to obtain a target decoded value; the target decoded value is a zero run value or a quotient of the zero run value; wherein, the zero run value The quotient of the value is determined based on the ratio between the zero run value and the preset value.
  • this application provides an encoding method, including:
  • the value to be encoded is encoded using at least one entropy encoding algorithm maintained by the encoder.
  • this application provides a decoder, including:
  • the acquisition unit is used to obtain the value to be decoded based on the point cloud code stream
  • a decoding unit configured to use at least one entropy decoding algorithm maintained by the decoder to decode the value to be decoded to obtain a target decoded value.
  • this application provides an encoder, including:
  • an acquisition unit for determining the value to be encoded based on the zero run value
  • An encoding unit configured to encode the value to be encoded using at least one entropy encoding algorithm maintained by the encoder.
  • this application provides a decoder, including:
  • a processor adapted to implement computer instructions
  • the computer-readable storage medium stores computer instructions, and the computer instructions are suitable for the processor to load and execute the decoding method in the above-mentioned first aspect or its respective implementations.
  • processors there are one or more processors and one or more memories.
  • the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be provided separately from the processor.
  • this application provides an encoder, including:
  • a processor adapted to implement computer instructions
  • the computer-readable storage medium stores computer instructions, and the computer instructions are suitable for the processor to load and execute the encoding method in the above-mentioned second aspect or its respective implementations.
  • processors there are one or more processors and one or more memories.
  • the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be provided separately from the processor.
  • the present application provides a computer-readable storage medium that stores computer instructions.
  • the computer instructions When the computer instructions are read and executed by a processor of a computer device, the computer device performs the above-mentioned first aspect.
  • embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are 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, so that the computer device performs the decoding method related to the first aspect or the encoding method related to the second aspect. .
  • the present application provides a code stream, which is a code stream involved in the method described in the first aspect or a code stream generated by the method described in the second aspect.
  • the embodiment of the present application combines at least one entropy decoding algorithm maintained by the decoder into the zero-run decoding process, which can improve the entropy decoding performance.
  • Figure 1 is an example of a point cloud image provided by an embodiment of this application.
  • Figure 2 is a partial enlarged view of the point cloud image shown in Figure 1.
  • Figure 3 is an example of a point cloud image with six viewing angles provided by an embodiment of the present application.
  • Figure 4 is a schematic block diagram of a coding framework provided by an embodiment of the present application.
  • Figures 5 to 7 show the arrangement sequence of Morton codes in two-dimensional space.
  • Figure 8 shows the arrangement order of Morton codes in three-dimensional space.
  • Figure 9 is a schematic block diagram of a decoding framework provided by an embodiment of the present application.
  • Figure 10 is a schematic flowchart of a decoding method provided by an embodiment of the present application.
  • Figure 11 is a schematic flow chart of the encoding method provided by the embodiment of the present application.
  • Figure 12 is a schematic flow chart of a decoder provided by an embodiment of the present application.
  • Figure 13 is a schematic flow chart of an encoder provided by an embodiment of the present application.
  • Figure 14 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • Point Cloud is a set of discrete points randomly distributed in space that expresses the spatial structure and surface properties of a three-dimensional object or scene.
  • Figures 1 and 2 show three-dimensional point cloud images and local enlargements respectively. It can be seen that the point cloud surface is composed of densely distributed points.
  • Two-dimensional images have information expressed in each pixel, so there is no need to record additional position information; however, the distribution of points in the point cloud in the three-dimensional space is random and irregular, so it is necessary to record the location of each point in the space. Only the position in can completely express a point cloud. Similar to two-dimensional images, each point in the point cloud has corresponding attribute information, usually an RGB color value, and the color value reflects the color of the object; for point clouds, the attribute information corresponding to each point is in addition to color. , or it can be a reflectance value, which reflects the surface material of the object. Each point in the point cloud may include geometric information and attribute information. The geometric information of each point in the point cloud refers to the Cartesian three-dimensional coordinate data of the point.
  • 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.
  • Color information can be information in any color space.
  • the color information may be Red Green Blue (RGB) information.
  • the color information may also be brightness and chromaticity (YCbCr, YUV) information.
  • Y represents brightness (Luma)
  • Cb(U) represents the blue chromaticity component
  • Cr(V) represents the red chromaticity component.
  • Each point in the point cloud has the same amount of attribute information.
  • each point in the point cloud has two attribute information: color information and laser reflection intensity.
  • each point in the point cloud has three attribute information: color information, material information and laser reflection intensity information.
  • a point cloud image can have multiple viewing angles.
  • a point cloud image can have six viewing angles as shown in Figure 3.
  • the data storage format of a point cloud image consists of a file header information part and a data part.
  • the header information contains Data format, data representation type, total number of points in the point cloud, and content represented by the point cloud.
  • the data storage format of point cloud images can be implemented as the following format:
  • the data format is ".ply" format, represented by ASCII code, the total number of points is 207242, and each point has three-dimensional position information xyz and three-dimensional color information rgb.
  • Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and because point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy, so they are widely used and their scope Including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive telepresence, three-dimensional reconstruction of biological tissues and organs, etc.
  • point clouds can be divided into two categories based on application scenarios, namely, machine-perceived point clouds and human-eye-perceived point clouds.
  • the application scenarios of machine-perceived point cloud include but are not limited to: autonomous navigation system, real-time inspection system, geographical information system, visual sorting robot, rescue and disaster relief robot and other point cloud application scenarios.
  • the application scenarios of point clouds perceived by the human eye include but are not limited to: digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive communication, three-dimensional immersive interaction and other point cloud application scenarios.
  • the point cloud can be divided into dense point cloud and sparse point cloud based on the point cloud acquisition method; the point cloud can also be divided into static point cloud and dynamic point cloud based on the point cloud acquisition method.
  • point cloud More specifically, it can It is divided into three types of point clouds, namely the first static point cloud, the second type dynamic point cloud and the third type dynamically acquired point cloud.
  • first static point cloud the object is stationary, and the device for acquiring the point cloud is also stationary;
  • second type of dynamic point cloud the object is moving, but the device for acquiring the point cloud is stationary;
  • third type of dynamic point cloud To obtain point cloud, the device that obtains point cloud is moving.
  • point cloud collection methods include but are not limited to: computer generation, 3D laser scanning, 3D photogrammetry, etc.
  • Computers can generate point clouds of virtual three-dimensional objects and scenes;
  • 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second;
  • 3D photogrammetry can obtain dynamic real-world three-dimensional objects or scenes
  • Point clouds can obtain tens of millions of point clouds per second.
  • point clouds on the surface of objects can be collected through collection equipment such as photoelectric radar, lidar, laser scanners, and multi-view cameras.
  • the point cloud obtained according to the principle of laser measurement can include the three-dimensional coordinate information of the point and the laser reflection intensity (reflectance) of the point.
  • the point cloud obtained according to the principle of photogrammetry may include the three-dimensional coordinate information of the point and the color information of the point.
  • the point cloud is obtained by combining the principles of laser measurement and photogrammetry, which may include the three-dimensional coordinate information of the point, the laser reflection intensity (reflectance) of the point, and the color information of the point.
  • These technologies reduce the cost and time period of point cloud data acquisition and improve the accuracy of the data.
  • point clouds of biological tissues and organs can be obtained using magnetic resonance imaging (MRI), computed tomography (CT), and electromagnetic positioning information.
  • MRI magnetic resonance imaging
  • CT computed tomography
  • electromagnetic positioning information These technologies reduce the cost and time period of point cloud acquisition and improve the accuracy of data. Changes in the way of obtaining point cloud data have made it possible to obtain large amounts of point cloud data. With the growth of application requirements, the processing of massive 3D point cloud data has encountered bottlenecks limited by storage space and transmission bandwidth.
  • each point in the point cloud of each frame has coordinate information xyz (float) and color information RGB.
  • Point cloud compression generally uses point cloud geometric information and attribute information to be compressed separately.
  • the point cloud geometric information is first encoded in the geometry encoder, and then the reconstructed geometric information is input into the attribute encoder as additional information to assist Point cloud attribute compression;
  • the point cloud geometric information is first decoded in the geometry decoder, and then the decoded geometric information is input into the attribute decoder as additional information to assist in point cloud attribute compression.
  • the entire codec consists of pre-processing/post-processing, geometry encoding/decoding, and attribute encoding/decoding.
  • the point cloud can be encoded and decoded through various types of encoding frameworks and decoding frameworks, respectively.
  • the codec framework may be the Geometry Point Cloud Compression (G-PCC) codec framework or the Video Point Cloud Compression (Video Point Cloud Compression) provided by the Moving Picture Experts Group (MPEG) , V-PCC) encoding and decoding framework, or it can be the AVS-PCC encoding and decoding framework or the Point Cloud Compression Reference Platform (PCRM) framework provided by the Audio Video Coding Standard (AVS) topic group.
  • G-PCC Geometry Point Cloud Compression
  • MPEG Moving Picture Experts Group
  • V-PCC Video Point Cloud Compression
  • PCM Point Cloud Compression Reference Platform
  • the G-PCC encoding and decoding framework can be used to compress the first static point cloud and the third type of dynamically acquired point cloud, and the V-PCC encoding and decoding framework can be used to compress the second type of dynamic point cloud.
  • the G-PCC encoding and decoding framework is also called point cloud codec TMC13, and the V-PCC encoding and decoding framework is also called point cloud codec TMC2.
  • G-PCC and AVS-PCC both target static sparse point clouds, and their coding frameworks are roughly the same.
  • Figure 4 is a schematic block diagram of a coding framework provided by an embodiment of the present application.
  • the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately.
  • the original geometric information is preprocessed, that is, the geometric origin is normalized to the minimum position in the point cloud space through coordinate translation, and the geometric information is converted from floating point numbers to integers through coordinate quantization. , to facilitate subsequent regularization processing. Since quantization and rounding make the geometric information of some points the same, it is necessary to decide whether to remove duplicate points. Removing duplicate points is also a preprocessing process; then, perform geometric processing on the regularized geometric information.
  • Encoding that is, using an octree structure to recursively divide the point cloud space, divide the current block into eight sub-blocks of the same size each time, and determine the occupied code words of each sub-block.
  • the occupied codeword information of all blocks is recorded and encoded; that is, the geometric information expressed through the octree structure is input to the geometric entropy encoder on the one hand to form
  • the geometry code stream is used to reconstruct geometric information and encode attribute information based on the reconstructed geometric information.
  • the attribute encoding part first, determine whether to perform color space conversion. If the attribute information processed is color information, the original color needs to be converted into a color space to convert it into a YUV color space that is more in line with the visual characteristics of the human eye; then , in the case of geometric lossy coding, since the geometric information changes after the geometric coding, it is necessary to reassign the attribute value to each point after the geometric coding, so that the attribute error between the reconstructed point cloud and the original point cloud is minimized. This The process is called attribute interpolation or attribute recoloring; then, attribute encoding is performed on the preprocessed attribute information. In the attribute encoding process, the point cloud first needs to be reordered.
  • the reordering method is Morton code, so the attribute encoding
  • the traversal order is Morton order, and then single-point prediction based on Morton order, that is, going back one point from the current point to be encoded in Morton order, the found point is the prediction reference point of the current point to be encoded, and then the prediction reference
  • the attribute reconstruction value of the point is used as the attribute prediction value, and the attribute residual is the difference between the attribute value of the current point to be encoded and the attribute prediction value; finally, the residual is quantified, and the quantized residual is input into the attribute entropy encoder to form Attribute code stream.
  • Figures 5 to 7 show the arrangement sequence of Morton codes in two-dimensional space.
  • the encoder can adopt the "z"-shaped Morton arrangement sequence in the two-dimensional space formed by 2*2 blocks.
  • the encoder can adopt the "z"-shaped Morton arrangement sequence in the two-dimensional space formed by four 2*2 blocks.
  • the two-dimensional space formed by each 2*2 block can also be Using the "z"-shaped Morton arrangement, we can finally get the Morton arrangement used by the encoder in the two-dimensional space formed by 4*4 blocks.
  • the encoder can adopt the "z"-shaped Morton arrangement sequence in the two-dimensional space formed by four 4*4 blocks.
  • the two-dimensional space formed by each four 2*2 blocks and each The "z"-shaped Morton arrangement sequence can also be used in the two-dimensional space formed by 2*2 blocks, and finally the Morton arrangement order adopted by the encoder in the two-dimensional space formed by 8*8 blocks can be obtained.
  • Figure 8 shows the arrangement order of Morton codes in three-dimensional space.
  • Morton's arrangement order is not only applicable to two-dimensional space, but can also be extended to three-dimensional space.
  • Figure 8 shows 16 points, inside each "z", each "z”
  • the Morton arrangement sequence between "z” and "z” is encoded first along the x-axis, then along the y-axis, and finally along the z-axis.
  • Figure 9 is a schematic block diagram of a decoding framework provided by an embodiment of the present application.
  • geometry and attributes are also decoded separately.
  • the geometry decoding part the geometry code stream is first entropy decoded to obtain the geometric information of each point, and then the octree structure is constructed in the same way as the geometry encoding, and the decoded geometry is combined to reconstruct the coordinate transformed, through the octree
  • the information is subjected to coordinate inverse quantization and inverse translation to obtain decoded geometric information; on the other hand, it is input into the attribute decoder as additional information.
  • the Morton order is constructed in the same way as the encoding side.
  • the attribute code stream is entropy decoded to obtain the quantized residual information; then inverse quantization is performed to obtain the point cloud residual; similarly, in accordance with In the same way as attribute encoding, the attribute prediction value of the current point to be decoded is obtained, and then the attribute prediction value and the residual value are added to recover the YUV attribute value of the current point to be decoded; finally, the decoded value is obtained after inverse transformation of the color space attribute information.
  • the attribute predicted value (predictedvalue) of the current point to be encoded can also be called the predicted value of the attribute information or the predicted color value (predictedColor).
  • the attribute value of the current point to be encoded can also be called the real value or the original color value of the attribute information of the current point.
  • the residual value of the current point to be encoded can also be called the difference between the attribute value of the current point to be encoded and the predicted attribute value of the current point, or it can also be called the color residual value (residualColor) of the current point.
  • the reconstructed value of the attribute of the current point to be encoded (reconstructedvalue) may also be called the reconstructed value of the attribute of the current point to be encoded or the reconstructed color value (reconstructedColor).
  • Condition 1 The geometric position is limited and the attributes are lossy.
  • Condition 2 The geometric position is lossless and the attributes are lossy.
  • Condition 3 The geometric position is lossless, and the attributes are limited and lossy.
  • Condition 4 The geometric position is lossless and the attributes are lossless.
  • the general test sequence of the encoding and decoding framework includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1B Point clouds contain both color and reflectivity attribute information.
  • the encoding and decoding framework compresses the attribute information of point clouds, it can be divided into the following technical routes based on the algorithm used.
  • Attribute compression uses an intra prediction based method.
  • the prediction algorithm is first used to obtain the attribute prediction value, and the attribute prediction value is obtained based on the attribute value and attribute prediction
  • the attribute residuals are obtained, and then the attribute residuals are quantified to generate quantized residuals, and finally the quantized residuals are encoded;
  • at the decoding end in a certain order (point cloud original acquisition order, Morton order, Hilbert order order, etc.) to process the points in the point cloud, first use the prediction algorithm to obtain the attribute prediction value, then decode to obtain the quantized residual, then inversely quantify the quantized residual, and finally obtain the attribute based on the attribute prediction value and the inverse quantized residual.
  • Rebuild value when processing points in the point cloud according to a certain order (point cloud original acquisition order, Morton order, Hilbert order, etc.), the prediction algorithm is first used to obtain the attribute prediction value, and the attribute prediction value is obtained based on the attribute value and attribute prediction The attribute residuals are obtained, and then the attribute residuals are quantified to
  • Attribute compression uses a method based on intra-frame prediction and DCT transformation.
  • a limit to the maximum number of points X such as 4096
  • the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), and the entire point cloud is first divided into several groups with a maximum length of Y (such as 2) , then combine these groups into several large groups (the number of points in each large group does not exceed Perform DCT transformation on the attribute residuals in small groups to generate transform coefficients, then quantize the transform coefficients to generate quantized transform coefficients, and finally encode the quantized transform coefficients in large groups; at the decoding end, according to To process the points in the point cloud in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), first divide the entire point cloud into several small groups with a maximum length of Y (such as 2), and then divide these several Small groups are combined into several large groups (the number of points in each large group does not exceed The unit performs inverse quantization and inverse transformation on the quantized transformation coefficients, and finally obtains the attribute reconstruction value based on the attribute prediction value and the inverse
  • Attribute compression uses a method based on intra-frame prediction and DCT transform.
  • the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), and the entire point cloud is first divided into several groups with a maximum length of Y (such as 2) , then use the prediction algorithm to obtain the attribute prediction value, obtain the attribute residual according to the attribute value and the attribute prediction value, perform DCT transformation on the attribute residual in groups as a unit, generate the transformation coefficient, and then quantize the transformation coefficient to generate the quantized transformation coefficients, and finally encode the quantized transformation coefficients of the entire point cloud; at the decoding end, the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), first Divide the entire point cloud into several small groups with a maximum length of Y (such as
  • Attribute compression adopts a method based on multi-layer wavelet transform.
  • multi-layer wavelet transform is performed on the entire point cloud to generate transform coefficients, then the transform coefficients are quantized, the quantized transform coefficients are generated, and finally the quantized transform coefficients of the entire point cloud are encoded;
  • Decode to obtain the quantized transformation coefficients of the entire point cloud, and then perform inverse quantization and inverse transformation on the quantized transformation coefficients to obtain attribute reconstruction values.
  • the encoding and decoding algorithms or entropy encoding and decoding methods used include but are not limited to: unary codes, truncated unary codes, K-order exponential Golomb coding, and Huffman coding.
  • unary codes truncated unary codes
  • K-order exponential Golomb coding K-order exponential Golomb coding
  • Huffman coding Huffman coding
  • the truncated unary encoding algorithm is a variant of the unary encoding algorithm and is used when the maximum value Max of the syntax element to be encoded is known.
  • the main encoding format of K-order exponential Golomb coding is the structure of [prefix 0][1][bit information].
  • the encoding steps are as follows:
  • Figure 10 is a schematic flow chart of the decoding method 300 provided by the embodiment of the present application. It should be understood that the decoding method 300 may be performed by a decoder or a decoding framework. For example, it is applied to the decoding framework 200 shown in FIG. 9 . For the convenience of description, the following takes the decoder as an example.
  • the decoding method 300 may include:
  • S320 use at least one entropy decoding algorithm maintained by the decoder to decode the value to be decoded to obtain a target decoded value;
  • the target decoded value is a zero run value or a quotient of the zero run value; wherein, The quotient of the zero run value is determined based on the ratio between the zero run value and the preset value.
  • the decoder uses a zero run length decoding (Zero run length coding) algorithm to perform entropy decoding on the zero run length value in the sequence to be decoded.
  • the target decoding value is the quotient of the zero run value.
  • the quotient of the zero run value may be the ratio of the zero run value and the preset value.
  • the quotient of the zero run value and the zero run value to be decoded may be expressed as a run length (length).
  • the symbol sequence output by the at least one entropy decoding algorithm is 0(r)4 0(r)5 3(r)2 0(r)1 1(r)2, then 0(r)4 0
  • the zero-run values in (r)5 3(r)2 0(r)1 1(r)2 include 0 0 3 0 1, where r represents a zero-run value.
  • the symbol sequence 4 5 0 0 0 2 1 0 2 can be obtained.
  • Table 1 shows the representative rate distortion (Bit distortion, BD-rate) of each component of Cat1B, Cat1C and Cat3 under the condition of limiting lossy geometry (limit-lossy geometry) compression and lossy attributes (lossy attributes) compression.
  • Table 2 shows the BD-rate of each component of Cat1B, Cat1C and Cat3 in the case of lossless geometry compression and lossy attribute compression.
  • Bit distortion (BD-rate) is an indicator to measure algorithm performance or coding performance. It indicates the transformation of the coding algorithm provided by this application in terms of code rate and PSNR compared to the original coding algorithm. The overall negative value indicates the performance. Get better.
  • L, Cb and Cr also called Y, U, V
  • the single entropy decoding algorithm whose decoding parameter is the first value is used to decode the value to be decoded to obtain the target decoding value; otherwise, the single entropy decoding algorithm whose decoding parameter is the second value is used.
  • the single entropy decoding algorithm decodes the value to be decoded to obtain the target decoded value;
  • the single entropy decoding algorithm is an exponential Golomb decoding algorithm
  • the decoding parameter is the order of the exponential Golomb decoding algorithm
  • the decoder uses K 1 (such as 1, 2, 3, etc.) order exponential Golomb algorithm decodes the value to be decoded to obtain the target decoded value; otherwise, the decoder uses K 2 (such as 1, 2, 3, etc.) order exponential Golomb algorithm to decode all Decode the value to be decoded to obtain the target decoded value.
  • K 1 is different from K 2 .
  • the decoder only needs to maintain a single entropy decoding algorithm, which is conducive to device implementation, thereby reducing device complexity and decoding costs.
  • it is conducive to using decoding parameters with different values for different situations, which in turn is conducive to improving entropy decoding performance.
  • the first value or the second value is G; where G is a preset value, or G is a quantified variable based on the attribute information of the point cloud and/or the decoder. determined value.
  • G is a value determined based on the quantized residual of decoded points in the point cloud.
  • G is the maximum value, minimum value or average value of the quantized residual according to the decoded points in the point cloud.
  • the first value and/or the second value may be a default value or G written in the code stream by the encoding end.
  • the first value and/or the second value may be default values relative to the encoder and the decoder.
  • the absolute value of the difference between the first numerical value and the second numerical value is less than or equal to a preset upper limit threshold, or the absolute value of the difference between the first numerical value and the second numerical value is The value is within the preset numerical range.
  • the absolute value of the difference between the first numerical value and the second numerical value is greater than or equal to the preset lower threshold, and indeed less than or equal to the preset upper threshold.
  • the preset numerical range may be a set of preset numerical values, or may be a range formed by an upper limit value and a lower limit value.
  • the at least one entropy decoding algorithm is a single entropy decoding algorithm; wherein the S320 may include:
  • the single entropy decoding algorithm whose decoding parameter is the target value is used to decode the value to be decoded to obtain the target decoded value.
  • the decoding parameter is the order of the exponential Golomb decoding algorithm; in this case, the decoder can directly adopt K (such as 1, 2, The 3rd order exponential Golomb algorithm is used to decode the value to be decoded to obtain the target decoded value. That is to say, the decoder can directly use the K (such as 1, 2, 3, etc.) order exponential Golomb algorithm to decode the value to be decoded without having to judge whether the point cloud meets the preset conditions, and obtain The target decoding value.
  • K such as 1, 2, 3, etc.
  • the decoder only needs to maintain a single entropy decoding algorithm and only needs to maintain a single decoding parameter, which is beneficial to device implementation, thereby reducing device complexity and decoding costs.
  • the target value is G, a default value or a value obtained by decoding the code stream; where G is a preset value, or G is based on the attribute information of the point cloud and/or the The numerical value determined by the quantization variable used by the decoder.
  • G is a value determined based on the quantized residual of decoded points in the point cloud.
  • G is the maximum value, minimum value or average value of the quantized residual according to the decoded points in the point cloud.
  • the target value may be a default value or G written in the code stream by the encoding end.
  • the target value may be a default value relative to the encoder and decoder.
  • the decoding parameter is an order of the exponential Golomb decoding algorithm.
  • the single entropy decoding algorithm can also be other entropy decoding algorithms, such as arithmetic decoding algorithms or Huffman decoding algorithms.
  • the decoding parameters can also be adjusted to be used by other decoding algorithms. parameters, this application does not specifically limit this.
  • the at least one entropy decoding algorithm is a plurality of entropy decoding algorithms; wherein, the S320 may include:
  • the first entropy decoding algorithm among the plurality of entropy decoding algorithms is used to decode the value to be decoded to obtain the target decoding value; otherwise, the first entropy decoding algorithm among the plurality of entropy decoding algorithms is used.
  • the second entropy decoding algorithm decodes the value to be decoded to obtain the target decoded value.
  • the multiple entropy decoding algorithms are K (such as 1, 2, 3, etc.) order exponential Golomb decoding algorithm and arithmetic decoding algorithm; in this case, as an implementation manner, the first entropy decoding algorithm The algorithm is K (such as 1, 2, 3, etc.) order exponential Golomb algorithm, and the second entropy decoding algorithm is an arithmetic decoding algorithm; that is, if the preset conditions are met, the decoder uses K (such as 1, 2 , 3, etc.) order exponential Golomb algorithm to decode the value to be decoded to obtain the target decoded value; otherwise, the decoder uses an arithmetic decoding algorithm to decode the value to be decoded to obtain the target decoded value; as another In one implementation, the first entropy decoding algorithm is an arithmetic decoding algorithm, and the second entropy decoding algorithm is a K (such as 1, 2, 3, etc.) order exponential Golomb algorithm; that is, if the preset conditions are met
  • the order of the exponential Golomb decoding algorithm is equal to G; where G is a preset value, or G It is a value determined based on the attribute information of the point cloud and/or the quantified variable used by the decoder. For example, G is a value determined based on the quantized residual of decoded points in the point cloud. For example, G is the maximum value, minimum value or average value of the quantized residual according to the decoded points in the point cloud.
  • the preset conditions include at least one of the following:
  • G is a preset value, or G is a value determined based on the attribute information of the point cloud and/or the quantized variable used by the decoder, and T is a preset threshold.
  • G is a value determined based on the quantized residual of decoded points in the point cloud.
  • G is the maximum value, minimum value or average value of the quantized residual according to the decoded points in the point cloud.
  • G is a preset value, the value of G may be different for different types of point clouds.
  • the G encoder determines the value, and accordingly, the decoder obtains G by parsing the code stream.
  • the encoder can determine G by:
  • Max represents the maximum value of the attribute information of the point cloud
  • Min represents the minimum value of the attribute information of the point cloud
  • ceil() represents the rounding operation
  • attrQuantParam represents the quantization variable used by the encoder
  • >> represents the right shift operation
  • the preset condition may also be other conditions, which is not specifically limited in this application.
  • the entropy decoding algorithm in the at least one entropy decoding algorithm is a default entropy decoding algorithm.
  • the default entropy decoding algorithm may also be called the default entropy decoding algorithm.
  • the at least one entropy decoding algorithm is a default entropy decoding algorithm.
  • the default entropy decoding algorithm may be an exponential Golomb decoding algorithm.
  • the at least one entropy decoding algorithm is a single entropy decoding algorithm
  • the single entropy decoding algorithm defaults to an exponential Golomb decoding algorithm.
  • the default entropy decoding algorithm may also be other decoding algorithms, which is not specifically limited in this application.
  • the decoding performance of the entropy decoding algorithm in the at least one entropy decoding algorithm is higher than the decoding performance of the reference entropy decoding algorithm.
  • the binarization efficiency of the entropy decoding algorithm in the at least one entropy decoding algorithm is higher than the binarization efficiency of the reference entropy decoding algorithm.
  • the reference entropy decoding algorithm may be a unary entropy decoding algorithm. Of course, it may also be other entropy decoding algorithms, which is not specifically limited in this application.
  • the method 300 may further include:
  • the value of the i-th flag bit among the N flag bits is a third value, it is used to indicate that the target decoded value is a value not equal to i-1 or to indicate that the target decoded value is A value greater than i-1.
  • the value of the i-th flag bit among the N flag bits is the fourth value, it is used to indicate that the target decoded value is a value equal to i-1 or to indicate that the The target decoding value is a value not greater than i-1; N is an integer greater than 0;
  • the decoder obtains the N flag bits before entropy decoding the decoded value using the at least one entropy decoding algorithm.
  • the value of the i-th flag bit among the N flag bits is used to indicate that the target decoded value is a value not equal to i-1, or the i-th flag among the N flag bits is The value of the bit is used to indicate that the target decoded value is a value equal to i-1, the third value is 0, and the fourth value is 1.
  • the value of the i-th flag bit among the N flag bits is used to indicate that the target decoded value is a value greater than i-1
  • the value of the i-th flag bit among the N flag bits is The value is used to indicate that the target decoding value is a value not greater than i-1
  • the third value is 1, and the fourth value is 0.
  • i is an integer greater than 0.
  • the decoder determines whether to obtain the i+1-th flag bit based on the value of the i-th flag bit. For example, if the value of the i-th flag bit is the third value, the decoder continues to obtain the i+1-th flag bit, and if the value of the i-th flag bit is the the fourth value, the decoder determines not to use the at least one entropy decoding algorithm to decode the value to be decoded; for example, the decoder may determine i-1 as the target decoding value, And end the decoding of the value to be decoded.
  • the third numerical value is 0 and the fourth numerical value is 1; or the third numerical value is 1 and the fourth numerical value is 0.
  • the values of the N flag bits are all the third value, it is determined to use the at least one entropy decoding algorithm to decode the value to be decoded.
  • '0' which means that the target decoding value is not equal to 2.
  • a value of '1' means that the target decoding value is equal to 2.
  • the decoder decodes the "isZero" flag. If it is 1, it means that the value to be decoded is equal to 0, and the decoding is completed. Otherwise, it decodes the "isOne” flag. If it is 1, it means that the value to be decoded is equal to 1, and the decoding is completed. Otherwise, the decoding is completed.
  • the "isTwo" flag bit if it is 1, indicates that the value to be decoded is equal to 2, then the decoding is completed; otherwise, the at least one entropy decoding algorithm is used to decode the value to be decoded.
  • the N flag bits include: "gtZero", which is used to mark whether the target decoding value is greater than 0.
  • a value of '0' indicates that the target decoding value is not greater than 0, and a value of '1' indicates that the target decoding value is not greater than 0.
  • "gtOne” is used to mark whether the target decoding value is greater than 1. Its value is '0', which means that the target decoding value is not greater than 1, and its value is '1. ' indicates that the target decoding value is greater than 1.
  • this syntax element does not appear, its default value is 0;
  • "gtTwo" is used to mark whether the target decoding value is greater than 2.
  • '0' indicates that the target decoding value is not greater than 2.
  • a value of '1' means that the target decoding value is greater than 2.
  • the decoder decodes the "gtZero" flag. If it is 0, it means that the target decoding value is equal to 0. Then the decoding is completed, otherwise the "gtOne" flag is decoded. If it is 0, it means that the target decoding value is equal to 1, then the decoding is completed. Otherwise, the "gtTwo" flag is decoded. If it is 0, it means that the target decoding value is equal to 2, then the decoding is completed. Otherwise, use The at least one entropy decoding algorithm decodes the value to be decoded.
  • the N flag bits may also include a number of flag bits greater than 3 or less than 3, which is not specifically limited in this application.
  • the S320 may include:
  • the target decoding value is determined.
  • the number of digits in the left shift operation is a preset value.
  • the number of digits in the left shift operation is 1 or other numerical values.
  • the first flag bit is obtained based on the code stream; the first flag bit is used To indicate the parity of the target decoded value. Based on this, when the decoder determines the target decoding value based on the sixth numerical value and N, the sum of the sixth numerical value, N and the value of the first flag bit may be determined as the target decoding value. value.
  • the decoder can also decode the value to be decoded first, and then obtain the first flag bit based on the code stream; or the decoder can also decode the value to be decoded. At the same time, the first flag bit is obtained based on the code stream, which is not specifically limited in this application.
  • the decoder determines whether to decode the first flag bit or obtain the first flag bit based on the N flag bits mentioned above. For example, after the decoder sequentially obtains the i-th flag bit among the N flag bits mentioned above, it determines whether to obtain the i+1-th flag bit based on the value of the i-th flag bit.
  • the decoder determines not to decode the first flag bit or obtain the first flag bit; for example, the decoder determines the i-1 as the target decoding value, And end the decoding of the value to be decoded.
  • the target decoding value is a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is determined according to a ratio between the zero run value and a preset value.
  • the quotient of the zero run value may be a value calculated by rounding down the ratio between the zero run value and the preset value.
  • the quotient of the zero run value may be a value calculated by rounding up the ratio between the zero run value and the preset value.
  • the quotient of the zero run value may be 3 or 4.
  • the quotient of the zero run value may be 3.
  • the decoding method according to the embodiment of the present application is described in detail from the perspective of the decoder above.
  • the encoding method according to the embodiment of the present application will be described from the perspective of the encoder with reference to FIG. 11 below.
  • Figure 11 is a schematic flow chart of the encoding method 400 provided by the embodiment of the present application. It should be understood that the encoding method 400 can be performed by an encoder. For example, it is applied to the coding framework 100 shown in FIG. 1 . For ease of description, the following uses an encoder as an example.
  • S420 Use at least one entropy coding algorithm maintained by the encoder to encode the value to be encoded.
  • the at least one entropy coding algorithm is a single entropy coding algorithm; wherein, the S420 may include:
  • the single entropy coding algorithm with the coding parameter being the first value is used to encode the value to be encoded; otherwise, the single entropy coding algorithm with the coding parameter being the second value is used to encode the value.
  • the value to be encoded is encoded;
  • the first numerical value is not equal to the second numerical value.
  • the first value or the second value is G; where G is a preset value, or G is a quantized variable based on the attribute information of the point cloud and/or the encoder. determined value.
  • the first value and/or the second value are default values.
  • the method 400 may further include:
  • the first value and/or the second value are encoded.
  • the absolute value of the difference between the first numerical value and the second numerical value is less than or equal to a preset upper limit threshold, or the absolute value of the difference between the first numerical value and the second numerical value is The value is within the preset numerical range.
  • the at least one entropy coding algorithm is a single entropy coding algorithm; wherein, the S420 may include:
  • the value to be encoded is encoded using the single entropy encoding algorithm with the encoding parameter being the target value.
  • the target value is G or the target value is a default value; where G is a preset value, or G is based on the attribute information of the point cloud and/or the value adopted by the encoder.
  • the numerical value determined by the quantitative variable.
  • the method 400 may further include:
  • the coding parameter is an order of the exponential Golomb coding algorithm.
  • the at least one entropy coding algorithm is a plurality of entropy coding algorithms; wherein, the S420 may include:
  • the first entropy coding algorithm in the entropy coding algorithm is used to encode the value to be encoded; otherwise, the second entropy coding algorithm in the entropy coding algorithm is used to encode the value to be encoded. Encode.
  • the order of the exponential Golomb coding algorithm is equal to G; where G is a preset value, or G It is a value determined based on the attribute information of the point cloud and/or the quantization variable used by the encoder.
  • the preset conditions include at least one of the following:
  • G is a preset value, or G is a value determined based on the attribute information of the point cloud and/or the quantized variable used by the encoder, and T is a preset threshold.
  • the entropy coding algorithm in the at least one entropy coding algorithm is a default entropy coding algorithm.
  • the coding performance of the entropy coding algorithm in the at least one entropy coding algorithm is higher than the coding performance of the reference entropy coding algorithm.
  • the method 400 may further include:
  • the value of the i-th flag bit among the N flag bits is the third value, it is used to indicate that the value to be encoded is a value not equal to i-1 or to indicate that the value to be encoded is A value greater than i-1.
  • the value of the i-th flag bit among the N flag bits is the fourth value, it is used to indicate that the value to be encoded is a value equal to i-1 or to indicate that the The value to be encoded is a value not greater than i-1; N is an integer greater than 0;
  • the values of the N flag bits are all the third value, it is determined to use the at least one entropy coding algorithm to encode the value to be encoded;
  • the S420 may include:
  • the N flag bits are encoded and the at least one entropy coding algorithm is used to encode the value to be encoded.
  • the encoder first encodes the N flag bits, and then uses the at least one entropy coding algorithm to encode the value to be encoded to obtain the code stream.
  • the value to be encoded can also be encoded first, and then the N flag bits can be encoded, or the N flag bits and the value to be encoded can be encoded simultaneously. , this application does not specifically limit this.
  • the N flag bits include a target flag bit whose value is the fourth value, it is determined not to use the at least one entropy coding algorithm to encode the value to be encoded; at this time, the value to be encoded can be directly
  • the flag bits located before the target flag bit and the target flag bit among the N flag bits are encoded to obtain the code stream.
  • the S420 may include:
  • the eighth value is encoded using the at least one entropy encoding algorithm.
  • the number of digits in the right shift operation is a preset value.
  • the number of digits in the right shift operation is 1 or other numerical values.
  • the S420 may include:
  • the first flag bit is encoded and the at least one entropy coding algorithm is used to encode the value to be encoded; the first flag bit is used to indicate the parity of the value to be encoded.
  • the encoder first encodes the first flag bit, and then uses the at least one entropy coding algorithm to encode the value to be encoded to obtain the code stream.
  • the value to be encoded can also be encoded first, and then the first flag bit can be encoded, or the first flag bit and the value to be encoded can be encoded simultaneously. , this application does not specifically limit this.
  • the encoder may determine whether to encode the first flag bit based on the N flag bits mentioned above. For example, if the values of the N flag bits are all the third numerical value, it is determined to encode the first flag bit, and if the N flag bits include a target whose value is the fourth numerical value, flag bit, it is determined not to encode the first flag bit. At this time, the flag bits located before the target flag bit and the target flag bit among the N flag bits can be directly encoded to obtain the code stream.
  • the S410 may include:
  • the quotient of the zero run value is determined as the value to be encoded, and the quotient of the zero run value is determined according to the ratio between the zero run value and a preset value.
  • the encoding process is the reverse operation or inverse operation of the decoding process
  • the implementation manner and related terms of the method 400 can be referred to the relevant content of the method 300. To avoid repetition, they will not be described again here.
  • the encoding end uses at least one entropy coding algorithm to perform entropy coding on the zero run value or the quotient of the zero run value to obtain a code stream of the point cloud.
  • the decoder uses at least one entropy decoding algorithm to entropy decode the value to be decoded to obtain a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is based on the difference between the zero run value and a preset value. The ratio between them is determined.
  • the quotient of the zero run value may be a value calculated by rounding down the ratio between the zero run value and the preset value.
  • this article refers to the zero-run value and the quotient of the zero-run value as the value to be encoded that the encoder needs to encode/the target decoding value obtained by the decoder after entropy decoding the value to be decoded, that is, the value to be encoded/target decoded value.
  • isZero is used to mark whether the value to be encoded/target decoded value is equal to 0.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 0, and a value of '1' means that the value to be encoded/target decoded value is equal to 0.
  • this syntax element does not appear, its default value is 0;
  • isOne is used to mark whether the value to be encoded/target decoded value is equal to 1.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 1
  • a value of '1' means that the value to be encoded/target decoded value is equal to 1.
  • this syntax element does not appear, its default value is 0;
  • isTwo is used to mark whether the value to be encoded/target decoded value is equal to 2.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 2
  • a value of '1' means that the value to be encoded/target decoded value is equal to 2.
  • parity is used to mark the parity of the value to be encoded/the target decoded value.
  • G is a preset value, or G represents a value determined based on the attribute information and/or quantified variables of the point cloud.
  • G represents a value determined based on the quantized residual of encoded/decoded points in the point cloud.
  • G represents the maximum value, minimum value or average value of the quantized residual according to the encoded/decoded points in the point cloud.
  • Theshold is a preset threshold, such as 1, 2, etc.
  • the encoding process is as follows:
  • parity (length-3)%2
  • a parity of 1 means that the value to be encoded is an even number
  • a parity of 0 means that the value to be encoded is an odd number.
  • the decoding process is as follows:
  • step d decode the "isTwo" flag. If it is 1, it means that the value to be decoded is equal to 2, then the decoding is completed, otherwise go to step d);
  • zero_run_length [(residual_zero_run_length_equal_zero? 0:
  • remainder represents the remainder of the ratio between the zero run value and the preset value.
  • the default value is 2.
  • the decoder only needs to maintain the exponential Golomb decoding algorithm, which is conducive to device implementation, thereby reducing device complexity and decoding costs.
  • the decoder by introducing preset conditions and orders with different values, it is helpful to use orders with different values for different situations, which in turn helps improve the entropy decoding performance.
  • the encoding end uses at least one entropy coding algorithm to perform entropy coding on the zero run value or the quotient of the zero run value to obtain a code stream of the point cloud.
  • the decoder uses at least one entropy decoding algorithm to entropy decode the value to be decoded to obtain a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is based on the difference between the zero run value and a preset value. The ratio between them is determined.
  • the quotient of the zero run value may be a value calculated by rounding down the ratio between the zero run value and the preset value.
  • this article refers to the zero-run value and the quotient of the zero-run value as the value to be encoded that the encoder needs to encode/the target decoding value obtained by the decoder after entropy decoding the value to be decoded, that is, the value to be encoded/target decoded value.
  • gtZero is used to mark whether the value to be encoded/target decoded value is greater than 0.
  • a value of '0' means that the value to be encoded/target decoded value is not greater than 0, and a value of '1' means that the value to be encoded/target decoded value is greater than 0.
  • this syntax element does not appear, its default value is 0;
  • gtOne is used to mark whether the value to be encoded/target decoded value is greater than 1.
  • a value of '0' means that the value to be encoded/target decoded value is not greater than 1
  • a value of '1' means that the value to be encoded/target decoded value is greater than 1.
  • gtTwo is used to mark whether the value to be encoded/target decoded value is greater than 2.
  • a value of '0' means that the value to be encoded/target decoded value is not greater than 2
  • a value of '1' means that the value to be encoded/target decoded value is greater than 2.
  • parity is used to mark the parity of the value to be encoded/the target decoded value.
  • G is a preset value, or G represents a value determined based on the attribute information and/or quantified variables of the point cloud.
  • G represents a value determined based on the quantized residual of encoded/decoded points in the point cloud.
  • G represents the maximum value, minimum value or average value of the quantized residual according to the encoded/decoded points in the point cloud.
  • Theshold is a preset threshold, such as 1, 2, etc.
  • the encoding process is as follows:
  • step d encode the "gtTwo" flag, if it is 0, the encoding is completed, otherwise go to step d);
  • parity (length-3)%2
  • a parity of 1 means that the value to be encoded is an even number
  • a parity of 0 means that the value to be encoded is an odd number.
  • the decoding process is as follows:
  • step b) Decode the "gtZero" flag. If it is 0, it means that the value to be decoded is equal to 0, then the decoding is completed, otherwise go to step b);
  • step c) Decode the "gtOne" flag. If it is 0, it means that the value to be decoded is equal to 1, then the decoding is completed, otherwise go to step c);
  • step d decode the "gtTwo" flag. If it is 0, it means that the value to be decoded is equal to 2, then the decoding is completed, otherwise go to step d);
  • zero_run_length [(residual_zero_run_length_gt_zero+
  • remainder represents the remainder of the ratio between the zero run value and the preset value.
  • the default value is 2.
  • the decoder only needs to maintain the exponential Golomb decoding algorithm, which is conducive to device implementation, thereby reducing device complexity and decoding costs.
  • the decoder by introducing preset conditions and orders with different values, it is helpful to use orders with different values for different situations, which in turn helps improve the entropy decoding performance.
  • the encoding end uses at least one entropy coding algorithm to perform entropy coding on the zero run value or the quotient of the zero run value to obtain a code stream of the point cloud.
  • the decoder uses at least one entropy decoding algorithm to entropy decode the value to be decoded to obtain a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is based on the difference between the zero run value and a preset value. The ratio between them is determined.
  • the quotient of the zero run value may be a value calculated by rounding down the ratio between the zero run value and the preset value.
  • this article refers to the zero-run value and the quotient of the zero-run value as the value to be encoded that the encoder needs to encode/the target decoding value obtained by the decoder after entropy decoding the value to be decoded, that is, the value to be encoded/target decoded value.
  • isZero is used to mark whether the value to be encoded/target decoded value is equal to 0.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 0, and a value of '1' means that the value to be encoded/target decoded value is equal to 0.
  • this syntax element does not appear, its default value is 0;
  • isOne is used to mark whether the value to be encoded/target decoded value is equal to 1.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 1
  • a value of '1' means that the value to be encoded/target decoded value is equal to 1.
  • this syntax element does not appear, its default value is 0;
  • isTwo is used to mark whether the value to be encoded/target decoded value is equal to 2.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 2
  • a value of '1' means that the value to be encoded/target decoded value is equal to 2.
  • parity is used to mark the parity of the value to be encoded/the target decoded value.
  • the encoding process is as follows:
  • parity (length-3)%2
  • a parity of 1 means that the value to be encoded is an even number
  • a parity of 0 means that the value to be encoded is an odd number.
  • the decoding process is as follows:
  • step d decode the "isTwo" flag. If it is 1, it means that the value to be decoded is equal to 2, then the decoding is completed, otherwise go to step d);
  • K such as 1, 2, 3, etc.
  • zero_run_length [(residual_zero_run_length_equal_zero? 0:
  • remainder represents the remainder of the ratio between the zero run value and the preset value.
  • the default value is 2.
  • the decoder only needs to maintain a single exponential Golomb decoding algorithm and only needs to maintain a single decoding parameter K, which is conducive to device implementation and can thereby reduce device complexity and decoding costs.
  • the encoding end uses at least one entropy coding algorithm to perform entropy coding on the zero run value or the quotient of the zero run value to obtain a code stream of the point cloud.
  • the decoder uses at least one entropy decoding algorithm to entropy decode the value to be decoded to obtain a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is based on the difference between the zero run value and a preset value. The ratio between them is determined.
  • the quotient of the zero run value may be a value calculated by rounding down the ratio between the zero run value and the preset value.
  • this article refers to the zero-run value and the quotient of the zero-run value as the value to be encoded that the encoder needs to encode/the target decoding value obtained by the decoder after entropy decoding the value to be decoded, that is, the value to be encoded/target decoded value.
  • gtZero is used to mark whether the value to be encoded/target decoded value is greater than 0.
  • a value of '0' means that the value to be encoded/target decoded value is not greater than 0, and a value of '1' means that the value to be encoded/target decoded value is greater than 0.
  • this syntax element does not appear, its default value is 0;
  • gtOne is used to mark whether the value to be encoded/target decoded value is greater than 1.
  • a value of '0' means that the value to be encoded/target decoded value is not greater than 1
  • a value of '1' means that the value to be encoded/target decoded value is greater than 1.
  • gtTwo is used to mark whether the value to be encoded/target decoded value is greater than 2.
  • a value of '0' means that the value to be encoded/target decoded value is not greater than 2
  • a value of '1' means that the value to be encoded/target decoded value is greater than 2.
  • parity is used to mark the parity of the value to be encoded/the target decoded value.
  • the encoding process is as follows:
  • step d encode the "gtTwo" flag, if it is 0, the encoding is completed, otherwise go to step d);
  • parity (length-3)%2
  • a parity of 1 means that the value to be encoded is an even number
  • a parity of 0 means that the value to be encoded is an odd number.
  • the decoding process is as follows:
  • step b) Decode the "gtZero" flag. If it is 0, it means that the value to be decoded is equal to 0, then the decoding is completed, otherwise go to step b);
  • step c) Decode the "gtOne" flag. If it is 0, it means that the value to be decoded is equal to 1, then the decoding is completed, otherwise go to step c);
  • step d decode the "gtTwo" flag. If it is 0, it means that the value to be decoded is equal to 2, then the decoding is completed, otherwise go to step d);
  • K such as 1, 2, 3, etc.
  • zero_run_length [(residual_zero_run_length_gt_zero+
  • remainder represents the remainder of the ratio between the zero run value and the preset value.
  • the default value is 2.
  • the decoder only needs to maintain a single exponential Golomb decoding algorithm and only needs to maintain a single decoding parameter K, which is conducive to device implementation and can thereby reduce device complexity and decoding costs.
  • the encoding end uses at least one entropy coding algorithm to perform entropy coding on the zero run value or the quotient of the zero run value to obtain a code stream of the point cloud.
  • the decoder uses at least one entropy decoding algorithm to entropy decode the value to be decoded to obtain a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is based on the difference between the zero run value and a preset value. The ratio between them is determined.
  • the quotient of the zero run value may be a value calculated by rounding down the ratio between the zero run value and the preset value.
  • this article refers to the zero-run value and the quotient of the zero-run value as the value to be encoded that the encoder needs to encode/the target decoding value obtained by the decoder after entropy decoding the value to be decoded, that is, the value to be encoded/target decoded value.
  • isZero is used to mark whether the value to be encoded/target decoded value is equal to 0.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 0, and a value of '1' means that the value to be encoded/target decoded value is equal to 0.
  • this syntax element does not appear, its default value is 0.
  • isOne is used to mark whether the value to be encoded/target decoded value is equal to 1.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 1
  • a value of '1' means that the value to be encoded/target decoded value is equal to 1.
  • this syntax element does not appear, its default value is 0.
  • isTwo is used to mark whether the value to be encoded/target decoded value is equal to 2.
  • a value of '0' means that the value to be encoded/target decoded value is not equal to 2
  • a value of '1' means that the value to be encoded/target decoded value is equal to 2.
  • parity is used to mark the parity of the value to be encoded/the target decoded value.
  • G is a preset value, or G represents a value determined based on the attribute information and/or quantified variables of the point cloud.
  • G represents a value determined based on the quantized residual of encoded/decoded points in the point cloud.
  • G represents the maximum value, minimum value or average value of the quantized residual according to the encoded/decoded points in the point cloud.
  • Theshold is a preset threshold, such as 1, 2, etc.
  • the encoding process is as follows:
  • the decoding process is as follows:
  • step d decode the "isTwo" flag. If it is 1, it means that the value to be decoded is equal to 2, then the decoding is completed, otherwise go to step d);
  • zero_run_length [(residual_zero_run_length_equal_zero? 0:
  • remainder represents the remainder of the ratio between the zero run value and the preset value.
  • the default value is 2.
  • the introduction of the second-order exponential Golomb decoding algorithm and the arithmetic decoding algorithm is beneficial to improving the entropy decoding performance.
  • the arithmetic decoding algorithm can also be replaced by other entropy decoding algorithms, which is not specifically limited in this application.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be used in this application.
  • the implementation of the examples does not constitute any limitations.
  • Figure 12 is a schematic block diagram of the decoder 500 according to the embodiment of the present application.
  • the decoder 500 may include:
  • the acquisition unit 510 is used to obtain the value to be decoded based on the point cloud code stream;
  • the decoding unit 520 is configured to use at least one entropy decoding algorithm maintained by the decoder to decode the value to be decoded to obtain a target decoded value; the target decoded value is a zero run value or a quotient of the zero run value; Wherein, the quotient of the zero run value is determined based on the ratio between the zero run value and the preset value.
  • the at least one entropy decoding algorithm is a single entropy decoding algorithm
  • the decoding unit 520 is specifically used for:
  • the single entropy decoding algorithm whose decoding parameter is the first value is used to decode the value to be decoded to obtain the target decoding value; otherwise, the single entropy decoding algorithm whose decoding parameter is the second value is used.
  • the single entropy decoding algorithm decodes the value to be decoded to obtain the target decoded value;
  • the first numerical value is not equal to the second numerical value.
  • the first value or the second value is G; where G is a preset value, or G is a quantified variable based on the attribute information of the point cloud and/or the decoder. determined value.
  • the first value and/or the second value are default values; or, the first value and/or the second value are values obtained by decoding the code stream.
  • the absolute value of the difference between the first numerical value and the second numerical value is less than or equal to a preset upper limit threshold, or the absolute value of the difference between the first numerical value and the second numerical value is The value is within the preset numerical range.
  • the at least one entropy decoding algorithm is a single entropy decoding algorithm
  • the decoding unit 520 is specifically used for:
  • the single entropy decoding algorithm whose decoding parameter is the target value is used to decode the value to be decoded to obtain the target decoded value.
  • the target value is G, a default value or a value obtained by decoding the code stream; where G is a preset value, or G is based on the attribute information of the point cloud and/or the The numerical value determined by the quantization variable used by the decoder.
  • the decoding parameter is an order of the exponential Golomb decoding algorithm.
  • the at least one entropy decoding algorithm is a plurality of entropy decoding algorithms
  • the decoding unit 520 is specifically used for:
  • the first entropy decoding algorithm among the plurality of entropy decoding algorithms is used to decode the value to be decoded to obtain the target decoding value; otherwise, the first entropy decoding algorithm among the plurality of entropy decoding algorithms is used.
  • the second entropy decoding algorithm decodes the value to be decoded to obtain the target decoded value.
  • the order of the exponential Golomb decoding algorithm is equal to G; where G is a preset value, or G It is a value determined based on the attribute information of the point cloud and/or the quantified variable used by the decoder.
  • the preset conditions include at least one of the following:
  • G is a preset value, or G is a value determined based on the attribute information of the point cloud and/or the quantized variable used by the decoder, and T is a preset threshold.
  • the entropy decoding algorithm in the at least one entropy decoding algorithm is a default entropy decoding algorithm.
  • the decoding performance of the entropy decoding algorithm in the at least one entropy decoding algorithm is higher than the decoding performance of the reference entropy decoding algorithm.
  • the decoding unit 520 is also used to:
  • the value of the i-th flag bit among the N flag bits is a third value, it is used to indicate that the target decoded value is a value not equal to i-1 or to indicate that the target decoded value is A value greater than i-1.
  • the value of the i-th flag bit among the N flag bits is the fourth value, it is used to indicate that the target decoded value is a value equal to i-1 or to indicate that the The target decoding value is a value not greater than i-1; N is an integer greater than 0;
  • the decoding unit 520 is specifically used to:
  • the values of the N flag bits are all the third value, it is determined to use the at least one entropy decoding algorithm to decode the value to be decoded.
  • the decoding unit 520 is specifically used to:
  • the target decoding value is determined.
  • the decoding unit 520 before the decoding unit 520 uses the at least one entropy decoding algorithm to decode the value to be decoded to obtain the fifth value, it is also used to:
  • the first flag bit is used to indicate the parity of the target decoded value
  • the decoding unit 520 determines the target decoding value based on the sixth numerical value and N, the sum of the sixth numerical value, N and the value of the first flag bit is determined as the target decoding value. .
  • the target decoding value is a zero run value or a quotient of the zero run value; wherein the quotient of the zero run value is determined according to a ratio between the zero run value and a preset value.
  • Figure 13 is a schematic block diagram of the encoder 600 according to the embodiment of the present application.
  • the encoder 600 may include:
  • Obtaining unit 610 used to determine the value to be encoded based on the zero run value
  • the encoding unit 620 is configured to encode the value to be encoded using at least one entropy encoding algorithm maintained by the encoder.
  • the at least one entropy coding algorithm is a single entropy coding algorithm
  • the encoding unit 620 is specifically used for:
  • the single entropy coding algorithm with the coding parameter being the first value is used to encode the value to be encoded; otherwise, the single entropy coding algorithm with the coding parameter being the second value is used to encode the value.
  • the value to be encoded is encoded;
  • the first numerical value is not equal to the second numerical value.
  • the first value or the second value is G; where G is a preset value, or G is a quantized variable based on the attribute information of the point cloud and/or the encoder. determined value.
  • the first value and/or the second value are default values.
  • the encoding unit 620 is also used to:
  • the first value and/or the second value are encoded.
  • the absolute value of the difference between the first numerical value and the second numerical value is less than or equal to a preset upper limit threshold, or the absolute value of the difference between the first numerical value and the second numerical value is The value is within the preset numerical range.
  • the at least one entropy coding algorithm is a single entropy coding algorithm
  • the encoding unit 620 is specifically used for:
  • the value to be encoded is encoded using the single entropy encoding algorithm with the encoding parameter being the target value.
  • the target value is G or the target value is a default value; where G is a preset value, or G is based on the attribute information of the point cloud and/or the value adopted by the encoder.
  • the numerical value determined by the quantitative variable.
  • the encoding unit 620 is also used to:
  • the coding parameter is an order of the exponential Golomb coding algorithm.
  • the at least one entropy coding algorithm is a plurality of entropy coding algorithms
  • the encoding unit 620 is specifically used for:
  • the first entropy coding algorithm in the entropy coding algorithm is used to encode the value to be encoded; otherwise, the second entropy coding algorithm in the entropy coding algorithm is used to encode the value to be encoded. Encode.
  • the order of the exponential Golomb coding algorithm is equal to G; where G is a preset value, or G It is a value determined based on the attribute information of the point cloud and/or the quantization variable used by the encoder.
  • the preset conditions include at least one of the following:
  • G is a preset value, or G is a value determined based on the attribute information of the point cloud and/or the quantized variable used by the encoder, and T is a preset threshold.
  • the entropy coding algorithm in the at least one entropy coding algorithm is a default entropy coding algorithm.
  • the coding performance of the entropy coding algorithm in the at least one entropy coding algorithm is higher than the coding performance of the reference entropy coding algorithm.
  • the encoding unit 620 before encoding the value to be encoded using at least one entropy encoding algorithm maintained by the encoder, the encoding unit 620 is also used to:
  • the value of the i-th flag bit among the N flag bits is the third value, it is used to indicate that the value to be encoded is a value not equal to i-1 or to indicate that the value to be encoded is A value greater than i-1.
  • the value of the i-th flag bit among the N flag bits is the fourth value, it is used to indicate that the value to be encoded is a value equal to i-1 or to indicate that the The value to be encoded is a value not greater than i-1; N is an integer greater than 0;
  • the encoding unit 620 is specifically used to:
  • the values of the N flag bits are all the third numerical value, it is determined to use the at least one entropy coding algorithm to encode the value to be encoded;
  • the N flag bits are encoded and the at least one entropy coding algorithm is used to encode the value to be encoded.
  • the encoding unit 620 is specifically used to:
  • the eighth value is encoded using the at least one entropy encoding algorithm.
  • the encoding unit 620 is also used to:
  • the first flag bit is encoded and the at least one entropy coding algorithm is used to encode the value to be encoded; the first flag bit is used to indicate the parity of the value to be encoded.
  • the acquisition unit 610 is specifically used to:
  • the quotient of the zero run value is determined as the value to be encoded, and the quotient of the zero run value is determined according to the ratio between the zero run value and a preset value.
  • the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be repeated here.
  • the decoder 500 shown in Figure 12 may correspond to the corresponding subject in performing the method 300 of the embodiment of the present application, and the foregoing and other operations and/or functions of each unit in the decoder 500 are respectively to implement the method 300, etc.
  • the encoder 600 shown in Figure 13 may correspond to the corresponding subject in performing the method 400 of the embodiment of the present application, that is, the aforementioned and other operations and/or functions of each unit in the encoder 600 are respectively used to implement the method 400 and other methods. corresponding process.
  • each unit in the decoder 500 or encoder 600 involved in the embodiment of the present application can be separately or entirely combined into one or several other units to form, or some of the units (some) can also be disassembled. It is divided into multiple units with smaller functions, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, the decoder 500 or the encoder 600 may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units in cooperation.
  • a general-purpose computing device including a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), etc.
  • Run a computer program capable of executing each step involved in the corresponding method to construct the decoder 500 or encoder 600 involved in the embodiment of the present application, and implement the encoding method or decoding method of the embodiment of the present application.
  • the computer program can be recorded on, for example, a computer-readable storage medium, loaded into an electronic device through the computer-readable storage medium, and run therein to implement the corresponding methods of the embodiments of the present application.
  • the units mentioned above can be implemented in the form of hardware, can also be implemented in the form of instructions in the form of software, or can be implemented in the form of a combination of software and hardware.
  • each step of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in the processor and/or instructions in the form of software.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly embodied in hardware.
  • the execution of the decoding processor is completed, or the execution is completed using a combination of hardware and software in the decoding processor.
  • the software can be located in a mature storage medium in this field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.
  • FIG. 14 is a schematic structural diagram of an electronic device 700 provided by an embodiment of the present application.
  • the electronic device 700 at least includes a processor 710 and a computer-readable storage medium 720 .
  • the processor 710 and the computer-readable storage medium 720 may be connected through a bus or other means.
  • the computer-readable storage medium 720 is used to store a computer program 721
  • the computer program 721 includes computer instructions
  • the processor 710 is used to execute the computer instructions stored in the computer-readable storage medium 720.
  • the processor 710 is the computing core and the control core of the electronic device 700. It is suitable for implementing one or more computer instructions. Specifically, it is suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding functions.
  • the processor 710 may also be called a central processing unit (Central Processing Unit, CPU).
  • the processor 710 may include, but is not limited to: a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the computer-readable storage medium 720 can be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it can also be at least one located far away from the aforementioned processor 710 Computer-readable storage media.
  • the computer-readable storage medium 720 includes, but is not limited to: volatile memory and/or non-volatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the electronic device 700 may be the encoder or coding framework involved in the embodiment of the present application; the computer-readable storage medium 720 stores the first computer instructions; the computer-readable instructions are loaded and executed by the processor 710
  • the first computer instructions stored in the storage medium 720 are used to implement the corresponding steps in the encoding method provided by the embodiment of the present application; in other words, the first computer instructions in the computer-readable storage medium 720 are loaded by the processor 710 and execute the corresponding steps, To avoid repetition, they will not be repeated here.
  • the electronic device 700 may be the decoder or decoding framework involved in the embodiment of the present application; the computer-readable storage medium 720 stores second computer instructions; the computer-readable instructions are loaded and executed by the processor 710 The second computer instructions stored in the storage medium 720 are used to implement the corresponding steps in the decoding method provided by the embodiment of the present application; in other words, the second computer instructions in the computer-readable storage medium 720 are loaded by the processor 710 and execute the corresponding steps, To avoid repetition, they will not be repeated here.
  • embodiments of the present application also provide a coding and decoding system, including the above-mentioned encoder and decoder.
  • embodiments of the present application also provide a computer-readable storage medium (Memory).
  • the computer-readable storage medium is a memory device in the electronic device 700 and is used to store programs and data.
  • computer-readable storage medium 720 may include a built-in storage medium in the electronic device 700 , and of course may also include an extended storage medium supported by the electronic device 700 .
  • the computer-readable storage medium provides storage space that stores the operating system of the electronic device 700 .
  • one or more computer instructions suitable for being loaded and executed by the processor 710 are also stored in the storage space. These computer instructions may be one or more computer programs 721 (including program codes).
  • a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium.
  • the data processing device 700 can be a computer.
  • the processor 710 reads the computer instructions from the computer-readable storage medium 720.
  • the processor 710 executes the computer instructions, so that the computer executes the encoding method provided in the above various optional ways. or decoding method.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transmitted from a website, computer, server, or data center to Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) methods.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本申请实施例提供了一种解码方法、编码方法、解码器以及编码器,所述解码方法,包括:基于点云的码流获取待解码值;采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值;所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。本申请实施例将解码器维持的至少一个熵解码算法结合至零游程解码过程,能够提升熵解码性能。

Description

解码方法、编码方法、解码器以及编码器 技术领域
本申请实施例涉及编解码技术领域,并且更具体地,涉及解码方法、编码方法、解码器以及编码器。
背景技术
点云已经开始普及到各个领域,例如,虚拟/增强现实、机器人、地理信息系统、医学领域等。随着扫描设备的基准度和速率的不断提升,可以准确地获取物体表面的大量点云,往往一个场景下就可以对应几十万个点。数量如此庞大的点也给计算机的存储和传输带来了挑战。因此,对点的压缩也就成为一个热点问题。
对于点云的压缩来说,主要需要压缩其几何信息和属性信息。具体而言,编码器先通过对点云的几何信息进行八叉树划分,然后利用熵编码算法对通过八叉树结构表达的几何信息进行熵编码得到几何码流。同时,编码器根据通过八叉树结构表达的几何信息对几何信息进行重建,并基于重建的几何信息对当前点的属性信息进行预测,并通过与属性信息的原始值进行做差的方式得到当前点的残差,然后对残差进行量化得到的量化残差,并利用熵编码算法对量化残差进行熵编码得到属性码流。
然而,如何提升熵编解码性能仍是本领域亟需解决的技术问题。
发明内容
本申请实施例提供了一种解码方法、编码方法、解码器以及编码器,能够提升熵解码性能。
第一方面,本申请提供了一种解码方法,包括:
基于点云的码流获取待解码值;
采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值;所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
第二方面,本申请提供了一种编码方法,包括:
基于零游程值确定待编码值;
采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码。
第三方面,本申请提供了一种解码器,包括:
获取单元,用于基于点云的码流获取待解码值;
解码单元,用于采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值。
第四方面,本申请提供了一种编码器,包括:
获取单元,用于基于零游程值确定待编码值;
编码单元,用于采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码。
第五方面,本申请提供了一种解码器,包括:
处理器,适于实现计算机指令;以及,
计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令适于由处理器加载并执行上述第一方面或其各实现方式中的解码方法。
在一种实现方式中,该处理器为一个或多个,该存储器为一个或多个。
在一种实现方式中,该计算机可读存储介质可以与该处理器集成在一起,或者该计算机可读存储介质与处理器分离设置。
第六方面,本申请提供了一种编码器,包括:
处理器,适于实现计算机指令;以及,
计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令适于由处理器加载并执行上述第二方面或其各实现方式中的编码方法。
在一种实现方式中,该处理器为一个或多个,该存储器为一个或多个。
在一种实现方式中,该计算机可读存储介质可以与该处理器集成在一起,或者该计算机可读存储介质与处理器分离设置。
第七方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机指令,该计算机指令被计算机设备的处理器读取并执行时,使得计算机设备执行上述第一方面涉及的解码方法或上述第二方面涉及的编码方法。
第八方面,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程 序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述第一方面涉及的解码方法或上述第二方面涉及的编码方法。。
第九方面,本申请提供了一种码流,该码流如上述第一方面所述的方法中涉及的码流或如上述第二方面所述的方法生成的码流。
基于以上技术方案,本申请实施例将解码器维持的至少一个熵解码算法结合至零游程解码过程,能够提升熵解码性能。
附图说明
图1是本申请实施例提供的点云图像的示例。
图2是图1所示的点云图像的局部放大图。
图3是本申请实施例提供的具有的六个观看角度的点云图像的示例。
图4是本申请实施例提供的编码框架的示意性框图。
图5至图7示出了莫顿码在二维空间中的排列顺序。
图8示出了莫顿码在三维空间中的排列顺序。
图9是本申请实施例提供的解码框架的示意性框图。
图10是本申请实施例提供的解码方法的示意性流程图。
图11是本申请实施例提供的编码方法的示意性流程图。
图12是本申请实施例提供的解码器的示意性流程图。
图13是本申请实施例提供的编码器的示意性流程图。
图14是本申请实施例提供的电子设备的示意性框图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
点云(Point Cloud)是空间中一组无规则分布的、表达三维物体或三维场景的空间结构及表面属性的离散点集。图1和图2分别示出了三维点云图像和局部放大图,可以看到点云表面是由分布稠密的点所组成的。
二维图像在每一个像素点均有信息表达,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,点云中的每一个点均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色以外,还可以是反射率(reflectance)值,反射率值反映物体的表面材质。点云中每个点可以包括几何信息和属性信息,其中,点云中每个点的几何信息是指该点的笛卡尔三维坐标数据,点云中每个点的属性信息可以包括但不限于以下至少一种:颜色信息、材质信息、激光反射强度信息。颜色信息可以是任意一种色彩空间上的信息。例如,颜色信息可以是红绿蓝(Red Green Blue,RGB)信息。再如,颜色信息还可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色度分量,Cr(V)表示红色色度分量。点云中的每个点都具有相同数量的属性信息。例如,点云中的每个点都具有颜色信息和激光反射强度两种属性信息。再如,点云中的每个点都具有颜色信息、材质信息和激光反射强度信息三种属性信息。
点云图像可具有的多个观看角度,例如,如图3所示的点云图像可具有的六个观看角度,点云图像的数据存储格式由文件头信息部分和数据部分组成,头信息包含数据格式、数据表示类型、点云总点数、以及点云所表示的内容。
示例性地,点云图像的数据存储格式可实现为以下格式:
ply
format ascii 1.0
element vertex 207242
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
75 318 0 0 142 0
75 319 0 0 143 0
75 319 1 1 9 9
75 315 0 1 9 9;
针对上述点云图像的数据存储格式,其数据格式为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维位置信息xyz和三维颜色信息rgb。
点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。
示例性地,可以基于应用场景可以将点云划分为两大类别,即机器感知点云和人眼感知点云。机器感知点云的应用场景包括但不限于:自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等点云应用场景。人眼感知点云的应用场景包括但不限于:数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。相应的,可以基于点云的获取方式,将点云划分为密集型点云和稀疏型点云;也可基于点云的获取途径将点云划分为静态点云和动态点云,更具体可划分为三种类型的点云,即第一静态点云、第二类动态点云以及第三类动态获取点云。针对第一静态点云,物体是静止的,且获取点云的设备也是静止的;针对第二类动态点云,物体是运动的,但获取点云的设备是静止的;针对第三类动态获取点云,获取点云的设备是运动的。
示例性地,点云的采集途径包括但不限于:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。具体而言,可通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云。根据激光测量原理得到的点云,其可以包括点的三维坐标信息和点的激光反射强度(reflectance)。根据摄影测量原理得到的点云,其可以可包括点的三维坐标信息和点的颜色信息。结合激光测量和摄影测量原理得到点云,其可以可包括点的三维坐标信息、点的激光反射强度(reflectance)和点的颜色信息。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。例如,在医学领域,由磁共振成像(magnetic resonance imaging,MRI)、计算机断层摄影(computed tomography,CT)、电磁定位信息,可以获得生物组织器官的点云。这些技术降低了点云的获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。
以帧率为30fps(帧每秒)的点云视频为例,每帧点云的点数为70万,其中,每一帧点云中的每一个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s长度的点云视频的数据量大约为0.7百万(million)×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,而YUV采样格式为4:2:0,帧率为24fps的1280×720二维视频,其10s的数据量约为1280×720×12bit×24frames×10s≈0.33GB,10s的两视角3D视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。
点云压缩一般采用点云几何信息和属性信息分别压缩的方式,在编码端,首先在几何编码器中编码点云几何信息,然后将重建几何信息作为附加信息输入到属性编码器中,以辅助点云的属性压缩;在解码端,首先在几何解码器中解码点云几何信息,然后将解码后的几何信息作为附加信息输入到属性解码器中,辅助点云的属性压缩。整个编解码器由预处理/后处理、几何编码/解码、属性编码/解码几部分组成。
示例性地,点云可通过各种类型的编码框架和解码框架分别进行编码和解码。作为示例,编解码框架可以是运动图象专家组(Moving Picture Experts Group,MPEG)提供的几何点云压缩(Geometry Point Cloud Compression,G-PCC)编解码框架或视频点云压缩(Video Point Cloud Compression,V-PCC)编解码框架,也可以是音视频编码标准(Audio Video Standard,AVS)专题组提供的AVS-PCC编解码框架或点云压缩参考平台(PCRM)框架。G-PCC编解码框架可用于针对第一静态点云和第三类动态获取点云进行压缩,V-PCC编解码框架可用于针对第二类动态点云进行压缩。G-PCC编解码框架也称为点云编解码器TMC13,V-PCC编解码框架也称为点云编解码器TMC2。G-PCC及AVS-PCC均针对静态的稀疏型点云,其编码框架大致相同。
下面以PCRM框架为例对本申请实施例可适用的编解码框架进行说明。
图4是本申请实施例提供的编码框架的示意性框图。
如图4所示,在编码框架中,点云的几何信息和每点所对应的属性信息是分开编码的。
在编码端的几何编码部分,首先,对原始几何信息进行预处理,即通过坐标平移将几何原点归一化到点云空间中的最小值位置,并通过坐标量化将几何信息从浮点数转化为整形,便于后续的规则化处理, 由于量化取整使得一部分点的几何信息相同,此时需要决定是否移除重复点,移除重复点也属于预处理过程;然后,对规则化的几何信息进行几何编码,即采用八叉树结构对点云空间进行递归划分,每次将当前块划分成八个相同大小的子块,并判断每个子块的占有码字情况,当子块内不包含点时记为空,否则记为非空,在递归划分的最后一层记录所有块的占有码字信息,并进行编码;即通过八叉树结构表达的几何信息一方面输入到几何熵编码器中形成几何码流,另一方面用于对几何信息进行重建,并基于重建的几何信息来对属性信息进行编码。
在属性编码部分,首先,判断是否进行颜色空间的转换,如果处理的属性信息为颜色信息,还需要将原始颜色进行颜色空间变换,将其转变成更符合人眼视觉特性的YUV色彩空间;然后,在几何有损编码的情况下,由于几何信息在几何编码之后有所异动,因此需要为几何编码后的每一个点重新分配属性值,使得重建点云和原始点云的属性误差最小,这个过程叫做属性插值或属性重上色;接着,对预处理后属性信息进行属性编码,在属性编码过程中,首先需要将点云进行重排序,重排序的方式是莫顿码,因此属性编码的遍历顺序为莫顿顺序,然后基于莫顿顺序的单点预测,即按照莫顿顺序从当前待编码点向前回溯一个点,找到的点为当前待编码点的预测参考点,然后将预测参考点的属性重建值作为属性预测值,属性残差为当前待编码点的属性值与属性预测值之间的差值;最后对残差进行量化,将量化残差输入到属性熵编码器中形成属性码流。
图5至图7示出了莫顿码在二维空间中的排列顺序。
如图5所示,编码器在2*2个块形成的二维空间中可以采用“z”字形莫顿排列顺序。如图6所示,编码器在4个2*2个块形成的二维空间中可以采用“z”字形莫顿排列顺序,其中,每个2*2个块形成的二维空间中也可以采用“z”字形莫顿排列顺序,最终可以得到编码器在4*4个块形成的二维空间中采用的莫顿排列顺序。如图7所示,编码器在4个4*4个块形成的二维空间中可以采用“z”字形莫顿排列顺序,其中,每4个2*2个块形成的二维空间以及每个2*2个块形成的二维空间中也可以采用“z”字形莫顿排列顺序,最终可以得到编码器在8*8个块形成的二维空间中采用的莫顿排列顺序。
图8示出了莫顿码在三维空间中的排列顺序。
如图8所示,莫顿排列顺序不仅适用于二维空间,也可以将其扩展到三维空间中,例如图8中展示了16个点,每个“z”字内部,每个“z”与“z”之间的莫顿排列顺序都是先沿x轴方向编码,再沿y轴,最后沿z轴。
图9是本申请实施例提供的解码框架的示意性框图。
如图9所示,在解码端,同样采用几何和属性分别解码的方式。在几何解码部分,首先对几何码流进行熵解码,得到每个点的几何信息,然后按照和几何编码相同的方式构建八叉树结构,结合解码几何重建出坐标变换后的、通过八叉树结构表达的几何信息,一方面将该信息进行坐标反量化和反平移,得到解码几何信息,另一方面将其作为附加信息输入到属性解码器中。在属性解码部分,按照与编码端相同的方式构建莫顿顺序,先对属性码流进行熵解码,得到量化后的残差信息;然后进行反量化,得到点云残差;类似的,按照与属性编码相同的方式,获得当前待解码点的属性预测值,然后将属性预测值与残差值相加,可以恢复出当前待解码点的YUV属性值;最后,经过颜色空间反变换得到解码后的属性信息。
需要说明的是,当前待编码点的属性预测值(predictedvalue)也可称为属性信息的预测值或颜色预测值(predictedColor)。当前待编码点的属性值也可称为当前点的属性信息的真实值或颜色原始值。当前待编码点的残差值也可称为当前待编码点的属性值与当前点的属性预测值的差值或,其也可称为当前点的颜色残差值(residualColor)。当前待编码点的属性重建值(reconstructedvalue)也可称为当前待编码点的属性的重建值或颜色重建值(reconstructedColor)。
编解码框架的测试条件共4种:
条件1:几何位置有限度有损、属性有损。
条件2:几何位置无损、属性有损。
条件3:几何位置无损、属性有限度有损。
条件4:几何位置无损、属性无损。
编解码框架的通用测试序列包括Cat1A,Cat1B,Cat1C,Cat2-frame和Cat3共五类,其中Cat1A、Cat2-frame点云只包含反射率属性信息,Cat1B、Cat3点云只包含颜色属性信息,Cat1B点云同时包含颜色和反射率属性信息。
编解码框架在对点云的属性信息进行压缩时,基于采用的算法进行区分可分为以下几种技术路线。
技术路线1:预测分支。
属性压缩采用基于帧内预测的方法。在编码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点时,先采用预测算法得到属性预测值,并根据属性值和属性预测值得 到属性残差,然后对属性残差进行量化,生成量化残差,最后对量化残差进行编码;在解码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先采用预测算法得到属性预测值,然后解码获取量化残差,再对量化残差进行反量化,最后根据属性预测值和反量化后的残差,获得属性重建值。
技术路线2:预测变换分支且资源受限。
属性压缩采用基于帧内预测和DCT变换的方法,在编码量化后的变换系数时,有最大点数X(如4096)的限制,即最多每X点为一组进行编码。在编码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后将这若干个小组组合成若干个大组(每个大组中的点数不超过X,如4096),然后采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差,以小组为单位对属性残差进行DCT变换,生成变换系数,再对变换系数进行量化,生成量化后的变换系数,最后以大组为单位对量化后的变换系数进行编码;在解码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后将这若干个小组组合成若干个大组(每个大组中的点数不超过X,如4096),以大组为单位解码获取量化后的变换系数,然后采用预测算法得到属性预测值,再以小组为单位对量化后的变换系数进行反量化、反变换,最后根据属性预测值和反量化、反变换后的系数,获得属性重建值。
技术路线3:预测变换分支且资源不受限。
属性压缩采用基于帧内预测和DCT变换的方法,在编码量化后的变换系数时,没有最大点数X的限制,即所有系数一起进行编码。在编码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差,以小组为单位对属性残差进行DCT变换,生成变换系数,再对变换系数进行量化,生成量化后的变换系数,最后对整个点云的量化后的变换系数进行编码;在解码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,解码获取整个点云的量化后的变换系数,然后采用预测算法得到属性预测值,再以小组为单位对量化后的变换系数进行反量化、反变换,最后根据属性预测值和反量化、反变换后的系数,获得属性重建值。
技术路线4:多层变换分支。
属性压缩采用基于多层小波变换的方法。在编码端,对整个点云进行多层小波变换,生成变换系数,然后对变换系数进行量化,生成量化后的变换系数,最后对整个点云的量化后的变换系数进行编码;在解码端,解码获取整个点云的量化后的变换系数,然后对量化后的变换系数进行反量化、反变换,获得属性重建值。
编解码框架在进行熵编码或熵解码时,采用的编解码算法或熵编解码方法包括但不限于:一元码,截断一元码,K阶指数哥伦布编码以及霍夫曼(Huffman)编码。为便于理解本申请的技术方案,下面对各种熵编解码方法进行简单的介绍。
1、一元编码算法。
对于待编码的符号“x”>=0,一元编码将其编码为x个“1”再加一个“0”。举例来说,假设x=5,则经由一元编码后,编码为“111110”。
2、截断一元编码算法。
截断一元编码算法属于一元编码算法的变体,用在已知待编码的语法元素的最大值Max的情况下。假设待编码符号为x:如果0<x<Max,x二值化采用一元码的方式;如果x=Max,x二值化的二进制串全部由1组成,长度为Max。举例来说,假设Max=6,则对符号“6”进行编码时,结果为“111111”,对符号“3”进行编码时,按一元码的编码方式,结果为“1110”。
3、K阶指数哥伦布编码算法。
K阶指数哥伦布编码主要的编码格式为[前缀0][1][bit信息]的结构。编码步骤如下:
(1)将待编码的数据以二进制的形式表示,去掉最低位的k个比特,然后加1,得到新的值T1,查看T1含多少个bit,将该值减1,得到的便是前缀0的个数;
(2)将第一步中去掉的最低K个比特位加到T1后,暂称其为T2;
(3)在T2前增加前缀0,以完成编码。
举例来说,假设对7进行一阶指数哥伦布编码,则k=1。首先计算前缀0的个数:7的二进制表示为111,去掉最低位的1个比特为11,然后加1,得T1=100,T1包含3个比特,3-1=2,所以前缀0的个数为2;将去掉的1个比特位加上,得T2=1001;在T2前增加两个前缀0,得001001,即最终的编码结果为001001。
图10是本申请实施例提供的解码方法300的示意性流程图。应理解,该解码方法300可由解码器或解码框架执行。例如应用于图9所示的解码框架200。为便于描述,下面以解码器为例进行说明。
如图10所示,所述解码方法300可包括:
S310,基于点云的码流获取待解码值;
S320,采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值;所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
示例性地,用于目标解码值为零游程值时,解码器使用零游程解码(Zero run length coding)算法对待解码序列中的零游程值进行熵解码。当然,在其他可替代实施例中,目标解码值为零游程值的商,例如所述零游程值的商可以是所述零游程值和预设数值的比值。示例性地,所述零游程值和待解码的零游程值的商可表示为游程长度(length)。
示例性地,假如所述至少一个熵解码算法输出的符号序列为0(r)4 0(r)5 3(r)2 0(r)1 1(r)2,则0(r)4 0(r)5 3(r)2 0(r)1 1(r)2中的零游程值包括0 0 3 0 1,其中r表示数值为零游程值。进一步的,通过零游程解码算法对零游程值进行解码后,可得到符号序列4 5 0 0 0 2 1 0 2。若符号序列4 5 0 0 0 2 1 0 2为点云的属性残差序列,则符号序列4 5 0 0 0 2 1 0 2中的每一个数值代表一个点的属性残差。值得注意的是,符号序列为0(r)4 0(r)5 3(r)2 0(r)1 1(r)2中的除零游程值之外的符号可以采用本申请的商解码方法,也可以采用单独的商解码方法,本申请对此不作具体限定。
本实施例中,将解码器维持的至少一个熵解码算法结合至零游程解码过程,能够提升熵解码性能。
下面结合表1至表2,对本申请提供的方案进行测试得到的结果进行说明。
其中,表1是在限制有损几何(limit-lossy geometry)压缩和有损属性(lossy attributes)压缩的情况下,Cat1B、Cat1C以及Cat3的各个分量的代表率失真(Bit distortion,BD-rate)。表2是在无损几何(lossless geometry)压缩和有损属性压缩的情况下,Cat1B、Cat1C以及Cat3的各个分量的BD-rate。代表率失真(Bit distortion,BD-rate)为衡量算法性能或编码性能的指标,表示本申请提供的编码算法相对于原来的编码算法在码率和PSNR上的变换情况,整体为负值说明性能变好。L、Cb和Cr(也叫称为Y,U,V)表示点云颜色的亮度和色度三种分量的性能。
表1
Figure PCTCN2022099635-appb-000001
如表1所示,在限制有损几何压缩和有损属性压缩的情况下,Cat1C和Cat3的各个分量的性能均有提升,即本申请提供的方案能够提升解码性能。
表2
Figure PCTCN2022099635-appb-000002
如表1所示,在无损几何压缩和有损属性压缩的情况下,Cat1B、Cat1C以及Cat3的各个分量的性能均有提升,即本申请提供的方案能够提升解码性能。
在一些实施例中,所述至少一个熵解码算法为单个熵解码算法;其中,所述S320可包括:
若满足预设条件,则采用解码参数为第一数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值;否则,采用所述解码参数为第二数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值;
其中,所述第一数值不等于第二数值。
示例性地,假设所述单个熵解码算法为指数哥伦布解码算法,所述解码参数为所述指数哥伦布解码算法的阶数;这种情况下,若满足预设条件,则解码器采用K 1(如1、2、3等)阶指数哥伦布算法对所述待解码值进行解码,得到所述目标解码值;否则,解码器采用K 2(如1、2、3等)阶指数哥伦布算法对所述待解码值进行解码,得到所述目标解码值。其中,K 1不同于K 2
本实施例中,解码器只需要维持单个熵解码算法,有利于设备实现,进而能够降低设备复杂度和解码成本。此外,通过引入预设条件和解码参数,有利于针对不同的情况采用不同取值的解码参数,进而 有利于提升熵解码性能。
在一些实施例中,所述第一数值或所述第二数值为G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。示例性地,G为根据所述点云中已解码点的量化残差确定的数值。示例性地,G为根据所述点云中已解码点的量化残差的最大值、最小值或平均值。
在一些实施例中,所述第一数值和/或所述第二数值为缺省值;或者,所述第一数值和/或所述第二数值为解码所述码流获取的数值。所述缺省值也可称为默认值。
示例性地,所述第一数值和/或所述第二数值可以是编码端写入码流中的缺省值或G。
示例性地,所述第一数值和/或所述第二数值可以是相对编码器和解码器而言的缺省值。
在一些实施例中,所述第一数值和所述第二数值的差值的绝对值小于或等于预设的上限阈值,或者,所述第一数值和所述第二数值的差值的绝对值位于预设的数值范围内。示例性地,所述第一数值和所述第二数值的差值的绝对值大于或等于预设的下限阈值,确小于或等于预设的上限阈值。示例性地,所述预设的数值范围可以是预设的数值的集合,也可以是由上限值和下限值形成的范围。
在一些实施例中,所述至少一个熵解码算法为单个熵解码算法;其中,所述S320可包括:
采用解码参数为目标数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值。
示例性地,假设所述单个熵解码算法为指数哥伦布解码算法,所述解码参数为所述指数哥伦布解码算法的阶数;这种情况下,解码器可直接采用采用K(如1、2、3等)阶指数哥伦布算法对所述待解码值进行解码,得到所述目标解码值。也即是说,解码器可以在不需要判断点云是否满足预设条件的情况下,直接采用采用K(如1、2、3等)阶指数哥伦布算法对所述待解码值进行解码,得到所述目标解码值。
本实施例中,解码器只需要维持单个熵解码算法且只需维持单个解码参数,有利于设备实现,进而能够降低设备复杂度和解码成本。
在一些实施例中,所述目标数值为G、缺省值或解码所述码流获取的数值;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。示例性地,G为根据所述点云中已解码点的量化残差确定的数值。示例性地,G为根据所述点云中已解码点的量化残差的最大值、最小值或平均值。
示例性地,所述目标数值可以是编码端写入码流中的缺省值或G。
示例性地,所述目标数值可以是相对编码器和解码器而言的缺省值。
在一些实施例中,所述单个熵解码算法为指数哥伦布解码算法时,所述解码参数为所述指数哥伦布解码算法的阶数。
当然,在其他可替代实施例中,所述单个熵解码算法也可为其他熵解码算法,例如算数解码算法或霍夫曼解码算法,此时,所述解码参数也可以调整为其他解码算法使用的参数,本申请对此不作具体限定。
在一些实施例中,所述至少一个熵解码算法为多个熵解码算法;其中,所述S320可包括:
若满足预设条件,则采用所述多个熵解码算法中的第一熵解码算法对所述待解码值进行解码,得到所述目标解码值;否则,采用所述多个熵解码算法中的第二熵解码算法对所述待解码值进行解码,得到所述目标解码值。
示例性地,假设所述多个熵解码算法为K(如1、2、3等)阶指数哥伦布解码算法和算数解码算法;这种情况下,作为一种实现方式,所述第一熵解码算法为K(如1、2、3等)阶指数哥伦布算法,所述第二熵解码算法为算数解码算法;也即是说,若满足预设条件,则解码器采用K(如1、2、3等)阶指数哥伦布算法对所述待解码值进行解码,得到所述目标解码值;否则,解码器采用算数解码算法对所述待解码值进行解码,得到所述目标解码值;作为另一种实现方式,所述第一熵解码算法为算数解码算法,所述第二熵解码算法为K(如1、2、3等)阶指数哥伦布算法;也即是说,若满足预设条件,则解码器采用算数解码算法对所述待解码值进行解码,得到所述目标解码值;否则,解码器采用K(如1、2、3等)阶指数哥伦布算法对所述待解码值进行解码,得到所述目标解码值。
本实施例中,通过引入多个熵解码算法,有利于针对不同的情况采用不同的熵解码算法,进而有利于提升熵解码性能。
在一些实施例中,所述第一熵解码算法或所述第二熵解码算法为指数哥伦布解码算法时,所述指数哥伦布解码算法的阶数等于G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。示例性地,G为根据所述点云中已解码点的量化残差确定的数值。示例性地,G为根据所述点云中已解码点的量化残差的最大值、最小值或平均值。
在一些实施例中,所述预设条件包括以下中的至少一项:
G≤T;
G=T;
G≥T;
其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值,T为预设阈值。
示例性地,G为根据所述点云中已解码点的量化残差确定的数值。示例性地,G为根据所述点云中已解码点的量化残差的最大值、最小值或平均值。示例性地,G为预设值时,针对不同类型的点云,G的取值可以不同。
示例性地,G编码器确定的数值,相应的,解码器通过解析码流获取G。
示例性地,编码器可通过以下方式确定G:
res=Max-Min;
int index=ceilLog2(res>>(attrQuantParam/8));
G=KthIndex[index-1]。
其中,Max表示点云的属性信息的最大值,Min表示点云的属性信息的最小值,ceil()表示取整运算,attrQuantParam表示编码器采用的量化变量,>>表示右移运算,KthIndex[]表示预定义的表格。例如,编码器算出index之后根据index查找预定义的表格得到G。例如编码器可将表格中第index-1个数值确定为G。举例来说,若KthIndex[13]={1,1,1,2,2,2,3,3,3,4,5,6,7},当index=3时,G=1,当index=4时,G=2。
当然,在其他可替代实施例中,所述预设条件也可以是其他条件,本申请对此不作具体限定。
在一些实施例中,所述至少一个熵解码算法中的熵解码算法为缺省熵解码算法。缺省熵解码算法也可称为默认的熵解码算法。
换言之,所述至少一个熵解码算法为缺省熵解码算法。
示例性地,所述缺省熵解码算法可以是指数哥伦布解码算法。例如,所述至少一个熵解码算法为单个熵解码算法时,所述单个熵解码算法默认为指数哥伦布解码算法。当然,所述缺省熵解码算法也可以是其他解码算法,本申请对此不作具体限定。
在一些实施例中,所述至少一个熵解码算法中的熵解码算法的解码性能高于参考熵解码算法的解码性能。示例性地,所述至少一个熵解码算法中的熵解码算法的二值化效率高于参考熵解码算法的二值化效率。示例性地,所述参考熵解码算法可以是一元熵解码算法,当然,也可以是其他熵解码算法,本申请对此不作具体限定。
在一些实施例中,所述方法300还可包括:
基于所述码流获取所述待解码值的N个标志位;
其中,所述N个标志位中的第i个标志位的取值为第三数值时,用于指示所述目标解码值为不等于i-1的数值或用于指示所述目标解码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值为第四数值时,用于指示所述目标解码值为等于i-1的数值或用于指示所述目标解码值为不大于i-1的数值;N为大于0的整数;
基于所述N个标志位,确定是否采用所述至少一个熵解码算法对所述待解码值进行解码。
示例性地,解码器采用所述至少一个熵解码算法对所述解码值进行熵解码之前获取所述N个标志位。
示例性地,所述N个标志位中的第i个标志位的取值用于指示所述目标解码值为不等于i-1的数值,或所述N个标志位中的第i个标志位的取值用于指示所述目标解码值为等于i-1的数值,所述第三数值为0,所述第四数值为1。
示例性地,所述N个标志位中的第i个标志位的取值用于指示所述目标解码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值用于指示所述目标解码值为不大于i-1的数值,所述第三数值为1,所述第四数值为0。
示例性地,i为大于0的整数。
示例性地,解码器依次获取所述第i个标志位后,基于所述第i个标志位的取值确定是否获取第i+1个标志位。例如,若所述第i个标志位的取值为所述第三数值,则所述解码器继续获取所述第i+1个标志位,若所述第i个标志位的取值为所述第四数值,则所述解码器确定不采用所述至少一个熵解码算法对所述待解码值进行解码;例如,所述解码器可将所述i-1确定为所述目标解码值,并结束对所述待解码值的解码。
示例性地,所述第三数值为0且所述第四数值为1;或所述第三数值为1且所述第四数值为0。
在一些实施例中,若所述N个标志位的取值均为所述第三数值,则确定采用所述至少一个熵解码算法对所述待解码值进行解码。
示例性地,假设所述N个标志位包括:"isZero",用来标志目标解码值是否等于0,其值为‘0’表示目标解码值不等于0,值为‘1’表示目标解码值等于0,当"isZero"不出现的时候,其默认值为0;"isOne",用来标志目标解码值是否等于1,其值为‘0’表示目标解码值不等于1,值为‘1’表示目标解码值等于1,当"isOne"不出现的时候,其默认值为0;"isTwo",用来标志目标解码值是否等于2,其值为‘0’表示目标解码值不等于2,值为‘1’表示目标解码值等于2,当"isTwo"不出现的时候,其默认值为0。此时,解码器解码"isZero"标志位,如果为1表示待解码值等于0,则解码完成,否则解码"isOne"标志位,如果为1表示待解码值等于1,则解码完成,否则解码"isTwo"标志位,如果为1表示待解码值等于2,则解码完成,否则采用所述至少一个熵解码算法对所述待解码值进行解码。
示例性地,假设所述N个标志位包括:"gtZero",用来标志目标解码值是否大于0,其值为‘0’表示目标解码值不大于0,值为‘1’表示目标解码值大于0,当该语法元素不出现的时候,其默认值为0;"gtOne",用来标志目标解码值是否大于1,其值为‘0’表示目标解码值不大于1,值为‘1’表示目标解码值大于1,当该语法元素不出现的时候,其默认值为0;"gtTwo",用来标志目标解码值是否大于2,其值为‘0’表示目标解码值不大于2,值为‘1’表示目标解码值大于2,当该语法元素不出现的时候,其默认值为0;此时,解码器解码"gtZero"标志位,如果为0表示目标解码值等于0,则解码完成,否则解码"gtOne"标志位,如果为0表示目标解码值等于1,则解码完成,否则解码"gtTwo"标志位,如果为0表示目标解码值等于2,则解码完成,否则采用所述至少一个熵解码算法对所述待解码值进行解码。
当然,在其他可替代实施例中,所述N个标志位也可以包括大于3或小于3的数量个标志位,本申请对此不作具体限定。
在一些实施例中,所述S320可包括:
采用所述至少一个熵解码算法对所述待解码值进行解码,得到第五数值;
对所述第五数值进行左移运算,得到第六数值;
基于所述第六数值和N,确定所述目标解码值。
示例性地,所述左移运算的位数为预设值,例如,所述左移运算的位数为1或其他数值。
在一些实施例中,首先,解码器采用所述至少一个熵解码算法对所述待解码值进行解码得到第五数值之前,基于所述码流获取第一标志位;所述第一标志位用于指示所述目标解码值的奇偶性。基于此,解码器基于所述第六数值和N,确定所述目标解码值时,可以将所述第六数值、N和所述第一标志位的取值的和,确定为所述目标解码值。
当然,在其他可替代实施例中,解码器也可先对所述待解码值进行解码,然后基于所述码流获取第一标志位;或者,解码器也可对所述待解码值进行解码的同时,基于所述码流获取所述第一标志位,本申请对此不作具体限定。
示例性地,解码器基于上文涉及的N个标志位确定是否对所述第一标志位进行解码或是否获取所述第一标志位。例如,所述解码器依次获取上文涉及的N个标志位中的第i个标志位后,基于所述第i个标志位的取值确定是否获取第i+1个标志位。例如,若所述第i个标志位的取值为所述第三数值,则所述解码器继续获取所述第i+1个标志位,若所述第i个标志位的取值为所述第四数值,则所述解码器确定不对所述第一标志位进行解码或不获取所述第一标志位;例如,所述解码器将所述i-1确定为所述目标解码值,并结束对所述待解码值的解码。
示例性地,所述解码器不对所述第一标志位进行解码时,所述第一标志位的取值为默认值。例如,所述默认值可以为0。
在一些实施例中,所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
示例性地,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向下取整计算得到的数值。当然,在其他可替代实施例中,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向上取整计算得到的数值。
举例来说,假设所述零游程值为7,且所述预设数值为2时,所述零游程值的商可以是3,也可以是4。优选的,所述零游程值的商可以是3。
上文中从解码器的角度详细描述了根据本申请实施例的解码方法,下面将结合图11从编码器的角度描述根据本申请实施例的编码方法。
图11是本申请实施例提供的编码方法400的示意性流程图。应理解,该编码方法400可由编码器执行。例如应用于图1所示的编码框架100。为便于描述,下面以编码器为例进行说明。
S410,基于零游程值确定待编码值;
S420,采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码。
在一些实施例中,所述至少一个熵编码算法为单个熵编码算法;其中,所述S420可包括:
若满足预设条件,则采用编码参数为第一数值的所述单个熵编码算法对所述待编码值进行编码;否则,采用所述编码参数为第二数值的所述单个熵编码算法对所述待编码值进行编码;
其中,所述第一数值不等于第二数值。
在一些实施例中,所述第一数值或所述第二数值为G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值。
在一些实施例中,所述第一数值和/或所述第二数值为缺省值。
在一些实施例中,所述方法400还可包括:
对所述第一数值和/或所述第二数值进行编码。
在一些实施例中,所述第一数值和所述第二数值的差值的绝对值小于或等于预设的上限阈值,或者,所述第一数值和所述第二数值的差值的绝对值位于预设的数值范围内。
在一些实施例中,所述至少一个熵编码算法为单个熵编码算法;其中,所述S420可包括:
采用编码参数为目标数值的所述单个熵编码算法对所述待编码值进行编码。
在一些实施例中,所述目标数值为G或所述目标数值为缺省值;其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值。
在一些实施例中,所述方法400还可包括:
对所述目标数值进行编码。
在一些实施例中,所述单个熵编码算法为指数哥伦布编码算法时,所述编码参数为所述指数哥伦布编码算法的阶数。
在一些实施例中,所述至少一个熵编码算法为多个熵编码算法;其中,所述S420可包括:
若满足预设条件,则采用所述熵编码算法中的第一熵编码算法对所述待编码值进行编码;否则,采用所述熵编码算法中的第二熵编码算法对所述待编码值进行编码。
在一些实施例中,所述第一熵编码算法或所述第二熵编码算法为指数哥伦布编码算法时,所述指数哥伦布编码算法的阶数等于G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值。
在一些实施例中,所述预设条件包括以下中的至少一项:
G≤T;
G=T;
G≥T;
其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值,T为预设阈值。
在一些实施例中,所述至少一个熵编码算法中的熵编码算法为缺省熵编码算法。
在一些实施例中,所述至少一个熵编码算法中的熵编码算法的编码性能高于参考熵编码算法的编码性能。
在一些实施例中,所述S420可之前,所述方法400还可包括:
确定N个标志位;
其中,所述N个标志位中的第i个标志位的取值为第三数值时,用于指示所述待编码值为不等于i-1的数值或用于指示所述待编码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值为第四数值时,用于指示所述待编码值为等于i-1的数值或用于指示所述待编码值为不大于i-1的数值;N为大于0的整数;
基于所述N个标志位,确定是否采用所述至少一个熵编码算法对所述待编码值进行编码。
在一些实施例中,若所述N个标志位的取值均为所述第三数值,则确定采用所述至少一个熵编码算法对所述待编码值进行编码;
其中,所述S420可包括:
对所述N个标志位进行编码并采用所述至少一个熵编码算法对所述待编码值进行编码。
示例性地,编码器先对所述N个标志位进行编码,然后采用所述至少一个熵编码算法对所述待编码值进行编码,以得到所述码流。当然,在其他可替代实施例中,也可以先对所述待编码值进行编码,然后对所述N个标志位进行编码,或者同时对所述N个标志位和所述待编码值进行编码,本申请对此不作具体限定。
示例性地,若所述N个标志位包括取值为所述第四数值的目标标志位,则确定不采用所述至少一个熵编码算法对所述待编码值进行编码;此时,可直接对所述N个标志位中的位于所述目标标志位之前的标志位以及所述目标标志位进行编码,以得到所述码流。
在一些实施例中,所述S420可包括:
利用所述待编码值减去N,得到第七数值;
对所述第七数值进行右移运算,得到第八数值;
利用所述至少一个熵编码算法对所述第八数值进行编码。
示例性地,所述右移运算的位数为预设值,例如,所述右移运算的位数为1或其他数值。
在一些实施例中,所述S420可包括:
对第一标志位进行编码并采用所述至少一个熵编码算法对所述待编码值进行编码;所述第一标志位用于指示所述待编码值的奇偶性。
示例性地,编码器先对所述第一标志位进行编码,然后采用所述至少一个熵编码算法对所述待编码值进行编码,以得到所述码流。当然,在其他可替代实施例中,也可以先对所述待编码值进行编码,然后对所述第一标志位进行编码,或者同时对所述第一标志位和所述待编码值进行编码,本申请对此不作具体限定。
示例性地,编码器可基于上文涉及的N个标志位确定是否对所述第一标志位进行编码。例如,若所述N个标志位的取值均为所述第三数值,则确定对所述第一标志位进行编码,若所述N个标志位包括取值为所述第四数值的目标标志位,则确定不对所述第一标志位进行编码。此时,可直接对所述N个标志位中的位于所述目标标志位之前的标志位以及所述目标标志位进行编码,以得到所述码流。
在一些实施例中,所述S410可包括:
将所述零游程值确定为所述待编码值;或
将所述零游程值的商确定为所述待编码值,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
应当理解,由于编码过程为解码过程的反操作或逆操作,因此,所述方法400的实现方式和相关术语可参考方法300的相关内容,为避免重复,此处不再赘述。
下面结合编码端和解码端对本申请提供的优选实施例进行说明。
实施例1:
本实施例中,编码端采用至少一个熵编码算法对零游程值或所述零游程值的商进行熵编码进而得到点云的码流。相应的,解码器采用至少一个熵解码算法对待解码值进行熵解码得到零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。示例性地,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向下取整计算得到的数值。为便于描述,本文将零游程值和零游程值的商统称为编码器需要对其进行编码的待编码值/解码器对待解码值进行熵解码后得到的目标解码值,即待编码值/目标解码值。
本实施例涉及的各标志位的含义:
"isZero",用来标志待编码值/目标解码值是否等于0,其值为‘0’表示待编码值/目标解码值不等于0,值为‘1’表示待编码值/目标解码值等于0,当该语法元素不出现的时候,其默认值为0;
"isOne",用来标志待编码值/目标解码值是否等于1,其值为‘0’表示待编码值/目标解码值不等于1,值为‘1’表示待编码值/目标解码值等于1,当该语法元素不出现的时候,其默认值为0;
"isTwo",用来标志待编码值/目标解码值是否等于2,其值为‘0’表示待编码值/目标解码值不等于2,值为‘1’表示待编码值/目标解码值等于2,当该语法元素不出现的时候,其默认值为0;
"parity",用来标志待编码值/目标解码值的奇偶性。
本实施例涉及的各符号的含义:
"GolombNum",其中,G为预设值,或G表示根据所述点云的属性信息和/或量化变量确定的数值。示例性地,G表示根据所述点云中已编码/解码点的量化残差确定的数值。示例性地,G表示根据所述点云中已编码/解码点的量化残差的最大值、最小值或平均值。;
"Threshold",为预先设定的阈值,如1、2等
在编码端,其编码过程如下:
a)、编码"isZero"标志位,如果为1则编码完成,否则进入步骤b);
b)、编码"isOne"标志位,如果为1则编码完成,否则进入步骤c);
c)、编码"isTwo"标志位,如果为1则编码完成,否则进入步骤d);
d)、在本例中,parity=(length-3)%2,parity为1表示待编码值为偶数,为0表示待编码值为奇数,编码"parity",进入步骤e);
e)、如果GolombNum≤Threshold,使用K1(如1、2、3等)阶指数哥伦布编码算法编码value(为(length-3)>>1),否则使用K2(如1、2、3等)(K1和K2不相等)阶指数哥伦布编码算法编码value(为(length-3)>>1),编码完成。
在解码端,其解码过程如下:
a)、解码"isZero"标志位,如果为1表示待解码值等于0,则解码完成,否则进入步骤b);
b)、解码"isOne"标志位,如果为1表示待解码值等于1,则解码完成,否则进入步骤c);
c)、解码"isTwo"标志位,如果为1表示待解码值等于2,则解码完成,否则进入步骤d);
d)、解码"parity"标志位,进入步骤e);
e)、如果GolombNum≤Threshold,使用K1(如1、2、3等)阶指数哥伦布解码算法解码value,否则使用K2(如1、2、3等)(K1和K2不相等)阶指数哥伦布解码算法解码value,解码完成。
零游程值zero_run_length=residual_zero_run_length_equal_zero?0:
(residual_zero_run_length_equal_one?1:
(residual_zero_run_length_equal_two?2:
(3+parity+(value<<1))))。
或零游程值zero_run_length=[(residual_zero_run_length_equal_zero?0:
(residual_zero_run_length_equal_one?1:
(residual_zero_run_length_equal_two?2:
(3+parity+(value<<1)))))<<1]+remainder。
其中,remainder表示所述零游程值与预设数值之间的比值的余数。示例性地,预设数值为2。
值得注意的是,"isZero"标志位、"isOne"标志位或"isTwo"标志位为1时,parity的取值为默认值,且默认值为0。
本实施例中,解码器只需要维持指数哥伦布解码算法,有利于设备实现,进而能够降低设备复杂度和解码成本。此外,通过引入预设条件和不同取值的阶数,有利于针对不同的情况采用不同取值的阶数,进而有利于提升熵解码性能。
实施例2:
本实施例中,编码端采用至少一个熵编码算法对零游程值或所述零游程值的商进行熵编码进而得到点云的码流。相应的,解码器采用至少一个熵解码算法对待解码值进行熵解码得到零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。示例性地,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向下取整计算得到的数值。为便于描述,本文将零游程值和零游程值的商统称为编码器需要对其进行编码的待编码值/解码器对待解码值进行熵解码后得到的目标解码值,即待编码值/目标解码值。
本实施例涉及的各标志位的含义:
"gtZero",用来标志待编码值/目标解码值是否大于0,其值为‘0’表示待编码值/目标解码值不大于0,值为‘1’表示待编码值/目标解码值大于0,当该语法元素不出现的时候,其默认值为0;
"gtOne",用来标志待编码值/目标解码值是否大于1,其值为‘0’表示待编码值/目标解码值不大于1,值为‘1’表示待编码值/目标解码值大于1,当该语法元素不出现的时候,其默认值为0;
"gtTwo",用来标志待编码值/目标解码值是否大于2,其值为‘0’表示待编码值/目标解码值不大于2,值为‘1’表示待编码值/目标解码值大于2,当该语法元素不出现的时候,其默认值为0;
"parity",用来标志待编码值/目标解码值的奇偶性。
本实施例涉及的各符号的含义:
"GolombNum",其中,G为预设值,或G表示根据所述点云的属性信息和/或量化变量确定的数值。示例性地,G表示根据所述点云中已编码/解码点的量化残差确定的数值。示例性地,G表示根据所述点云中已编码/解码点的量化残差的最大值、最小值或平均值。;
"Threshold",为预先设定的阈值,如1、2等
在编码端,其编码过程如下:
a)、编码"gtZero"标志位,如果为0则编码完成,否则进入步骤b);
b)、编码"gtOne"标志位,如果为0则编码完成,否则进入步骤c);
c)、编码"gtTwo"标志位,如果为0则编码完成,否则进入步骤d);
d)、在本例中,parity=(length-3)%2,parity为1表示待编码值为偶数,为0表示待编码值为奇数,编码"parity",进入步骤e);
e)、如果GolombNum≤Threshold,使用K1(如1、2、3等)阶指数哥伦布编码算法编码value(为(length-3)>>1),否则使用K2(如1、2、3等)(K1和K2不相等)阶指数哥伦布编码算法编码value(为(length-3)>>1),编码完成。
在解码端,其解码过程如下:
a)、解码"gtZero"标志位,如果为0表示待解码值等于0,则解码完成,否则进入步骤b);
b)、解码"gtOne"标志位,如果为0表示待解码值等于1,则解码完成,否则进入步骤c);
c)、解码"gtTwo"标志位,如果为0表示待解码值等于2,则解码完成,否则进入步骤d);
d)、解码"parity"标志位,进入步骤e);
e)、如果GolombNum≤Threshold,使用K1(如1、2、3等)阶指数哥伦布解码算法解码value,否则使用K2(如1、2、3等)(K1和K2不相等)阶指数哥伦布解码算法解码value,解码完成。
零游程值zero_run_length=residual_zero_run_length_gt_zero+
residual_zero_run_length_gt_one+
residual_zero_run_length_gt_two+
parity+(value<<1)。
或零游程值zero_run_length=[(residual_zero_run_length_gt_zero+
residual_zero_run_length_gt_one+
residual_zero_run_length_gt_two)+
parity+(value<<1))<<1]+remainder。
其中,remainder表示所述零游程值与预设数值之间的比值的余数。示例性地,预设数值为2。
值得注意的是,"gtZero"标志位、"gtOne"标志位或"gtTwo"标志位为0时,parity的取值为默认值,且默认值为0。
本实施例中,解码器只需要维持指数哥伦布解码算法,有利于设备实现,进而能够降低设备复杂度和解码成本。此外,通过引入预设条件和不同取值的阶数,有利于针对不同的情况采用不同取值的阶数,进而有利于提升熵解码性能。
实施例3:
本实施例中,编码端采用至少一个熵编码算法对零游程值或所述零游程值的商进行熵编码进而得到点云的码流。相应的,解码器采用至少一个熵解码算法对待解码值进行熵解码得到零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。示例性地,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向下取整计算得到的数值。为便于描述,本文将零游程值和零游程值的商统称为编码器需要对其进行编码的待编码值/解码器对待解码值进行熵解码后得到的目标解码值,即待编码值/目标解码值。
本实施例涉及的各标志位的含义:
"isZero",用来标志待编码值/目标解码值是否等于0,其值为‘0’表示待编码值/目标解码值不等于0,值为‘1’表示待编码值/目标解码值等于0,当该语法元素不出现的时候,其默认值为0;
"isOne",用来标志待编码值/目标解码值是否等于1,其值为‘0’表示待编码值/目标解码值不等于1,值为‘1’表示待编码值/目标解码值等于1,当该语法元素不出现的时候,其默认值为0;
"isTwo",用来标志待编码值/目标解码值是否等于2,其值为‘0’表示待编码值/目标解码值不等于2,值为‘1’表示待编码值/目标解码值等于2,当该语法元素不出现的时候,其默认值为0;
"parity",用来标志待编码值/目标解码值的奇偶性。
在编码端,其编码过程如下:
a)、编码"isZero"标志位,如果为1则编码完成,否则进入步骤b);
b)、编码"isOne"标志位,如果为1则编码完成,否则进入步骤c);
c)、编码"isTwo"标志位,如果为1则编码完成,否则进入步骤d);
d)、在本例中,parity=(length-3)%2,parity为1表示待编码值为偶数,为0表示待编码值为奇数,编码"parity",进入步骤e);
e)、使用K(如1、2、3等)阶指数哥伦布编码算法编码value(为(length-3)>>1),编码完成。
在解码端,其解码过程如下:
a)、解码"isZero"标志位,如果为1表示待解码值等于0,则解码完成,否则进入步骤b);
b)、解码"isOne"标志位,如果为1表示待解码值等于1,则解码完成,否则进入步骤c);
c)、解码"isTwo"标志位,如果为1表示待解码值等于2,则解码完成,否则进入步骤d);
d)、解码"parity"标志位,进入步骤e);
e)、使用K(如1、2、3等)阶指数哥伦布解码算法解码value,解码完成。
零游程值zero_run_length=residual_zero_run_length_equal_zero?0:
(residual_zero_run_length_equal_one?1:
(residual_zero_run_length_equal_two?2:
(3+parity+(value<<1))))。
或零游程值zero_run_length=[(residual_zero_run_length_equal_zero?0:
(residual_zero_run_length_equal_one?1:
(residual_zero_run_length_equal_two?2:
(3+parity+(value<<1)))))<<1]+remainder。
其中,remainder表示所述零游程值与预设数值之间的比值的余数。示例性地,预设数值为2。
值得注意的是,"isZero"标志位、"isOne"标志位或"isTwo"标志位为1时,parity的取值为默认值,且默认值为0。
本实施例中,解码器只需要维持单个指数哥伦布解码算法且只需维持单个解码参数K,有利于设备实现,进而能够降低设备复杂度和解码成本。
实施例4:
本实施例中,编码端采用至少一个熵编码算法对零游程值或所述零游程值的商进行熵编码进而得到点云的码流。相应的,解码器采用至少一个熵解码算法对待解码值进行熵解码得到零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。示例性地,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向下取整计算得到的数值。为便于描述,本文将零游程值和零游程值的商统称为编码器需要对其进行编码的待编码值/解码器对待解码值进行熵解码后得到的目标解码值,即待编码值/目标解码值。
本实施例涉及的各标志位的含义:
"gtZero",用来标志待编码值/目标解码值是否大于0,其值为‘0’表示待编码值/目标解码值不大于0,值为‘1’表示待编码值/目标解码值大于0,当该语法元素不出现的时候,其默认值为0;
"gtOne",用来标志待编码值/目标解码值是否大于1,其值为‘0’表示待编码值/目标解码值不大于1,值为‘1’表示待编码值/目标解码值大于1,当该语法元素不出现的时候,其默认值为0;
"gtTwo",用来标志待编码值/目标解码值是否大于2,其值为‘0’表示待编码值/目标解码值不大于2,值为‘1’表示待编码值/目标解码值大于2,当该语法元素不出现的时候,其默认值为0;
"parity",用来标志待编码值/目标解码值的奇偶性。
在编码端,其编码过程如下:
a)、编码"gtZero"标志位,如果为0则编码完成,否则进入步骤b);
b)、编码"gtOne"标志位,如果为0则编码完成,否则进入步骤c);
c)、编码"gtTwo"标志位,如果为0则编码完成,否则进入步骤d);
d)、在本例中,parity=(length-3)%2,parity为1表示待编码值为偶数,为0表示待编码值为奇数,编码"parity",进入步骤e);
e)、使用K(如1、2、3等)阶指数哥伦布编码算法编码value(为(length-3)>>1),编码完成。
在解码端,其解码过程如下:
a)、解码"gtZero"标志位,如果为0表示待解码值等于0,则解码完成,否则进入步骤b);
b)、解码"gtOne"标志位,如果为0表示待解码值等于1,则解码完成,否则进入步骤c);
c)、解码"gtTwo"标志位,如果为0表示待解码值等于2,则解码完成,否则进入步骤d);
d)、解码"parity"标志位,进入步骤e);
e)、使用K(如1、2、3等)阶指数哥伦布解码算法解码value,解码完成。
零游程值zero_run_length=residual_zero_run_length_gt_zero+
residual_zero_run_length_gt_one+
residual_zero_run_length_gt_two+
parity+(value<<1)。
或零游程值zero_run_length=[(residual_zero_run_length_gt_zero+
residual_zero_run_length_gt_one+
residual_zero_run_length_gt_two)+
parity+(value<<1))<<1]+remainder。
其中,remainder表示所述零游程值与预设数值之间的比值的余数。示例性地,预设数值为2。
值得注意的是,"gtZero"标志位、"gtOne"标志位或"gtTwo"标志位为0时,parity的取值为默认值,且默认值为0。
本实施例中,解码器只需要维持单个指数哥伦布解码算法且只需维持单个解码参数K,有利于设备实现,进而能够降低设备复杂度和解码成本。
实施例5:
本实施例中,编码端采用至少一个熵编码算法对零游程值或所述零游程值的商进行熵编码进而得到点云的码流。相应的,解码器采用至少一个熵解码算法对待解码值进行熵解码得到零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。示例性地,所述零游程值的商可以是对所述零游程值与预设数值之间的比值进行向下取整计算得到的数值。为便于描述, 本文将零游程值和零游程值的商统称为编码器需要对其进行编码的待编码值/解码器对待解码值进行熵解码后得到的目标解码值,即待编码值/目标解码值。
本实施例涉及的各标志位的含义:
"isZero",用来标志待编码值/目标解码值是否等于0,其值为‘0’表示待编码值/目标解码值不等于0,值为‘1’表示待编码值/目标解码值等于0,当该语法元素不出现的时候,其默认值为0。
"isOne",用来标志待编码值/目标解码值是否等于1,其值为‘0’表示待编码值/目标解码值不等于1,值为‘1’表示待编码值/目标解码值等于1,当该语法元素不出现的时候,其默认值为0。
"isTwo",用来标志待编码值/目标解码值是否等于2,其值为‘0’表示待编码值/目标解码值不等于2,值为‘1’表示待编码值/目标解码值等于2,当该语法元素不出现的时候,其默认值为0。
"parity",用来标志待编码值/目标解码值的奇偶性。
本实施例涉及的各符号的含义:
"GolombNum",其中,G为预设值,或G表示根据所述点云的属性信息和/或量化变量确定的数值。示例性地,G表示根据所述点云中已编码/解码点的量化残差确定的数值。示例性地,G表示根据所述点云中已编码/解码点的量化残差的最大值、最小值或平均值。
"Threshold",为预先设定的阈值,如1、2等。
在编码端,其编码过程如下:
a)、编码"isZero"标志位,如果为1则编码完成,否则进入步骤b);
b)、编码"isOne"标志位,如果为1则编码完成,否则进入步骤c);
c)、编码"isTwo"标志位,如果为1则编码完成,否则进入步骤d);
d)、编码"parity"标志位,parity=(length-3)%2,parity为1表示待编码值为偶数,为0表示待编码值为奇数,编码"parity",进入步骤e);
e)、如果GolombNum≤Threshold,使用二阶指数哥伦布编码算法编码value(为(length-3)>>1),否则使用算术编码算法编码value(为(length-3)>>1),编码完成。
在解码端,其解码过程如下:
a)、解码"isZero"标志位,如果为1表示待解码值等于0,则解码完成,否则进入步骤b);
b)、解码"isOne"标志位,如果为1表示待解码值等于1,则解码完成,否则进入步骤c);
c)、解码"isTwo"标志位,如果为1表示待解码值等于2,则解码完成,否则进入步骤d);
d)、解码"parity"标志位,进入步骤e);
e)、如果GolombNum≤Threshold,使用二阶指数哥伦布解码算法解码value,否则使用算术解码算法解码value,解码完成。
零游程值zero_run_length=residual_zero_run_length_equal_zero?0:
(residual_zero_run_length_equal_one?1:
(residual_zero_run_length_equal_two?2:
(3+parity+(value<<1))))。
或零游程值zero_run_length=[(residual_zero_run_length_equal_zero?0:
(residual_zero_run_length_equal_one?1:
(residual_zero_run_length_equal_two?2:
(3+parity+(value<<1)))))<<1]+remainder。
其中,remainder表示所述零游程值与预设数值之间的比值的余数。示例性地,预设数值为2。
值得注意的是,"isZero"标志位、"isOne"标志位或"isTwo"标志位为1时,parity的取值为默认值,且默认值为0。
本实施例中,通过引入二阶指数哥伦布解码算法和算术解码算法,有利于提升熵解码性能。当然,在其他可替代实施例中,算术解码算法也可替换为其他熵解码算法,本申请对此不作具体限定。
以上结合附图详细描述了本申请的优选实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上文详细描述了本申请的方法实施例,下文结合图11至图10,详细描述本申请的装置实施例。
图12是本申请实施例的解码器500的示意性框图。
如图12所示,所述解码器500可包括:
获取单元510,用于基于点云的码流获取待解码值;
解码单元520,用于采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值;所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
在一些实施例中,所述至少一个熵解码算法为单个熵解码算法;
其中,所述解码单元520具体用于:
若满足预设条件,则采用解码参数为第一数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值;否则,采用所述解码参数为第二数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值;
其中,所述第一数值不等于第二数值。
在一些实施例中,所述第一数值或所述第二数值为G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。
在一些实施例中,所述第一数值和/或所述第二数值为缺省值;或者,所述第一数值和/或所述第二数值为解码所述码流获取的数值。
在一些实施例中,所述第一数值和所述第二数值的差值的绝对值小于或等于预设的上限阈值,或者,所述第一数值和所述第二数值的差值的绝对值位于预设的数值范围内。
在一些实施例中,所述至少一个熵解码算法为单个熵解码算法;
其中,所述解码单元520具体用于:
采用解码参数为目标数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值。
在一些实施例中,所述目标数值为G、缺省值或解码所述码流获取的数值;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。
在一些实施例中,所述单个熵解码算法为指数哥伦布解码算法时,所述解码参数为所述指数哥伦布解码算法的阶数。
在一些实施例中,所述至少一个熵解码算法为多个熵解码算法;
其中,所述解码单元520具体用于:
若满足预设条件,则采用所述多个熵解码算法中的第一熵解码算法对所述待解码值进行解码,得到所述目标解码值;否则,采用所述多个熵解码算法中的第二熵解码算法对所述待解码值进行解码,得到所述目标解码值。
在一些实施例中,所述第一熵解码算法或所述第二熵解码算法为指数哥伦布解码算法时,所述指数哥伦布解码算法的阶数等于G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。
在一些实施例中,所述预设条件包括以下中的至少一项:
G≤T;
G=T;
G≥T;
其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值,T为预设阈值。
在一些实施例中,所述至少一个熵解码算法中的熵解码算法为缺省熵解码算法。
在一些实施例中,所述至少一个熵解码算法中的熵解码算法的解码性能高于参考熵解码算法的解码性能。
在一些实施例中,所述解码单元520还用于:
基于所述码流获取所述待解码值的N个标志位;
其中,所述N个标志位中的第i个标志位的取值为第三数值时,用于指示所述目标解码值为不等于i-1的数值或用于指示所述目标解码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值为第四数值时,用于指示所述目标解码值为等于i-1的数值或用于指示所述目标解码值为不大于i-1的数值;N为大于0的整数;
基于所述N个标志位,确定是否采用所述至少一个熵解码算法对所述待解码值进行解码。
在一些实施例中,所述解码单元520具体用于:
若所述N个标志位的取值均为所述第三数值,则确定采用所述至少一个熵解码算法对所述待解码值进行解码。
在一些实施例中,所述解码单元520具体用于:
采用所述至少一个熵解码算法对所述待解码值进行解码,得到第五数值;
对所述第五数值进行左移运算,得到第六数值;
基于所述第六数值和N,确定所述目标解码值。
在一些实施例中,所述解码单元520采用所述至少一个熵解码算法对所述待解码值进行解码得到第五数值之前,还用于:
基于所述码流获取第一标志位;所述第一标志位用于指示所述目标解码值的奇偶性;
所述解码单元520基于所述第六数值和N,确定所述目标解码值时,将所述第六数值、N和所述第一标志位的取值的和,确定为所述目标解码值。
在一些实施例中,所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
图13是本申请实施例的编码器600的示意性框图。
如图13所示,所述编码器600可包括:
获取单元610,用于基于零游程值确定待编码值;
编码单元620,用于采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码。
在一些实施例中,所述至少一个熵编码算法为单个熵编码算法;
其中,所述编码单元620具体用于:
若满足预设条件,则采用编码参数为第一数值的所述单个熵编码算法对所述待编码值进行编码;否则,采用所述编码参数为第二数值的所述单个熵编码算法对所述待编码值进行编码;
其中,所述第一数值不等于第二数值。
在一些实施例中,所述第一数值或所述第二数值为G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值。
在一些实施例中,所述第一数值和/或所述第二数值为缺省值。
在一些实施例中,所述编码单元620还用于:
对所述第一数值和/或所述第二数值进行编码。
在一些实施例中,所述第一数值和所述第二数值的差值的绝对值小于或等于预设的上限阈值,或者,所述第一数值和所述第二数值的差值的绝对值位于预设的数值范围内。
在一些实施例中,所述至少一个熵编码算法为单个熵编码算法;
其中,所述编码单元620具体用于:
采用编码参数为目标数值的所述单个熵编码算法对所述待编码值进行编码。
在一些实施例中,所述目标数值为G或所述目标数值为缺省值;其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值。
在一些实施例中,所述编码单元620还用于:
对所述目标数值进行编码。
在一些实施例中,所述单个熵编码算法为指数哥伦布编码算法时,所述编码参数为所述指数哥伦布编码算法的阶数。
在一些实施例中,所述至少一个熵编码算法为多个熵编码算法;
其中,所述编码单元620具体用于:
若满足预设条件,则采用所述熵编码算法中的第一熵编码算法对所述待编码值进行编码;否则,采用所述熵编码算法中的第二熵编码算法对所述待编码值进行编码。
在一些实施例中,所述第一熵编码算法或所述第二熵编码算法为指数哥伦布编码算法时,所述指数哥伦布编码算法的阶数等于G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值。
在一些实施例中,所述预设条件包括以下中的至少一项:
G≤T;
G=T;
G≥T;
其中,G为预设值,或G为根据所述点云的属性信息和/或所述编码器采用的量化变量确定的数值,T为预设阈值。
在一些实施例中,所述至少一个熵编码算法中的熵编码算法为缺省熵编码算法。
在一些实施例中,所述至少一个熵编码算法中的熵编码算法的编码性能高于参考熵编码算法的编码性能。
在一些实施例中,所述编码单元620采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码之前,还用于:
确定N个标志位;
其中,所述N个标志位中的第i个标志位的取值为第三数值时,用于指示所述待编码值为不等于i-1的数值或用于指示所述待编码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值为第四数值时,用于指示所述待编码值为等于i-1的数值或用于指示所述待编码值为不大于i-1的数值;N为大于0的整数;
基于所述N个标志位,确定是否采用所述至少一个熵编码算法对所述待编码值进行编码。
在一些实施例中,所述编码单元620具体用于:
若所述N个标志位的取值均为所述第三数值,则确定采用所述至少一个熵编码算法对所述待编码值进行编码;
对所述N个标志位进行编码并采用所述至少一个熵编码算法对所述待编码值进行编码。
在一些实施例中,所述编码单元620具体用于:
利用所述待编码值减去N,得到第七数值;
对所述第七数值进行右移运算,得到第八数值;
利用所述至少一个熵编码算法对所述第八数值进行编码。
在一些实施例中,所述编码单元620还用于:
对第一标志位进行编码并采用所述至少一个熵编码算法对所述待编码值进行编码;所述第一标志位用于指示所述待编码值的奇偶性。
在一些实施例中,所述获取单元610具体用于:
将所述零游程值确定为所述待编码值;或
将所述零游程值的商确定为所述待编码值,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图12所示的解码器500可以对应于执行本申请实施例的方法300中的相应主体,并且解码器500中的各个单元的前述和其它操作和/或功能分别为了实现方法300等各个方法中的相应流程。图13所示的编码器600可以对应于执行本申请实施例的方法400中的相应主体,即编码器600中的各个单元的前述和其它操作和/或功能分别为了实现方法400等各个方法中的相应流程。
还应当理解,本申请实施例涉及的解码器500或编码器600中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,该解码器500或编码器600也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。根据本申请的另一个实施例,可以通过在包括例如中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的通用计算机的通用计算设备上运行能够执行相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造本申请实施例涉及的解码器500或编码器600,以及来实现本申请实施例的编码方法或解码方法。计算机程序可以记载于例如计算机可读存储介质上,并通过计算机可读存储介质装载于电子设备中,并在其中运行,来实现本申请实施例的相应方法。
换言之,上文涉及的单元可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过软硬件结合的形式实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件组合执行完成。可选地,软件可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。
图14是本申请实施例提供的电子设备700的示意结构图。
如图14所示,该电子设备700至少包括处理器710以及计算机可读存储介质720。其中,处理器710以及计算机可读存储介质720可通过总线或者其它方式连接。计算机可读存储介质720用于存储计算机程序721,计算机程序721包括计算机指令,处理器710用于执行计算机可读存储介质720存储的计算机指令。处理器710是电子设备700的计算核心以及控制核心,其适于实现一条或多条计算机指令,具体适于加载并执行一条或多条计算机指令从而实现相应方法流程或相应功能。
作为示例,处理器710也可称为中央处理器(Central Processing Unit,CPU)。处理器710可以包 括但不限于:通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。
作为示例,计算机可读存储介质720可以是高速RAM存储器,也可以是非不稳定的存储器(Non-VolatileMemory),例如至少一个磁盘存储器;可选的,还可以是至少一个位于远离前述处理器710的计算机可读存储介质。具体而言,计算机可读存储介质720包括但不限于:易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
在一种实现方式中,该电子设备700可以是本申请实施例涉及的编码器或编码框架;该计算机可读存储介质720中存储有第一计算机指令;由处理器710加载并执行计算机可读存储介质720中存放的第一计算机指令,以实现本申请实施例提供的编码方法中的相应步骤;换言之,计算机可读存储介质720中的第一计算机指令由处理器710加载并执行相应步骤,为避免重复,此处不再赘述。
在一种实现方式中,该电子设备700可以是本申请实施例涉及的解码器或解码框架;该计算机可读存储介质720中存储有第二计算机指令;由处理器710加载并执行计算机可读存储介质720中存放的第二计算机指令,以实现本申请实施例提供的解码方法中的相应步骤;换言之,计算机可读存储介质720中的第二计算机指令由处理器710加载并执行相应步骤,为避免重复,此处不再赘述。
根据本申请的另一方面,本申请实施例还提供了一种编解码系统,包括上文涉及的编码器和解码器。
根据本申请的另一方面,本申请实施例还提供了一种计算机可读存储介质(Memory),计算机可读存储介质是电子设备700中的记忆设备,用于存放程序和数据。例如,计算机可读存储介质720。可以理解的是,此处的计算机可读存储介质720既可以包括电子设备700中的内置存储介质,当然也可以包括电子设备700所支持的扩展存储介质。计算机可读存储介质提供存储空间,该存储空间存储了电子设备700的操作系统。并且,在该存储空间中还存放了适于被处理器710加载并执行的一条或多条的计算机指令,这些计算机指令可以是一个或多个的计算机程序721(包括程序代码)。
根据本申请的另一方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。例如,计算机程序721。此时,数据处理设备700可以是计算机,处理器710从计算机可读存储介质720读取该计算机指令,处理器710执行该计算机指令,使得该计算机执行上述各种可选方式中提供的编码方法或解码方法。
换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地运行本申请实施例的流程或实现本申请实施例的功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质进行传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元以及流程步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
最后需要说明的是,以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (44)

  1. 一种解码方法,其特征在于,所述方法适用于解码器,所述方法包括:
    基于点云的码流获取待解码值;
    采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值;所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一个熵解码算法为单个熵解码算法;
    其中,所述采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值,包括:
    若满足预设条件,则采用解码参数为第一数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值;否则,采用所述解码参数为第二数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值;
    其中,所述第一数值不等于第二数值。
  3. 根据权利要求2所述的方法,其特征在于,所述第一数值或所述第二数值为G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。
  4. 根据权利要求2所述的方法,其特征在于,所述第一数值和/或所述第二数值为缺省值;或者,所述第一数值和/或所述第二数值为解码所述码流获取的数值。
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述第一数值和所述第二数值的差值的绝对值小于或等于预设的上限阈值,或者,所述第一数值和所述第二数值的差值的绝对值位于预设的数值范围内。
  6. 根据权利要求1所述的方法,其特征在于,所述至少一个熵解码算法为单个熵解码算法;
    其中,所述采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值,包括:
    采用解码参数为目标数值的所述单个熵解码算法对所述待解码值进行解码,得到所述目标解码值。
  7. 根据权利要求6所述的方法,其特征在于,所述目标数值为G、缺省值或解码所述码流获取的数值;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。
  8. 根据权利要求2至7中任一项所述的方法,其特征在于,所述单个熵解码算法为指数哥伦布解码算法时,所述解码参数为所述指数哥伦布解码算法的阶数。
  9. 根据权利要求1所述的方法,其特征在于,所述至少一个熵解码算法为多个熵解码算法;
    其中,所述采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值,包括:
    若满足预设条件,则采用所述多个熵解码算法中的第一熵解码算法对所述待解码值进行解码,得到所述目标解码值;否则,采用所述多个熵解码算法中的第二熵解码算法对所述待解码值进行解码,得到所述目标解码值。
  10. 根据权利要求9所述的方法,其特征在于,所述第一熵解码算法或所述第二熵解码算法为指数哥伦布解码算法时,所述指数哥伦布解码算法的阶数等于G;其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值。
  11. 根据权利要求2至5、9至10中的任一项所述的方法,其特征在于,所述预设条件包括以下中的至少一项:
    G≤T;
    G=T;
    G≥T;
    其中,G为预设值,或G为根据所述点云的属性信息和/或所述解码器采用的量化变量确定的数值,T为预设阈值。
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,所述至少一个熵解码算法中的熵解码算法为缺省熵解码算法。
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述至少一个熵解码算法中的熵解码算法的解码性能高于参考熵解码算法的解码性能。
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述方法还包括:
    基于所述码流获取所述待解码值的N个标志位;
    其中,所述N个标志位中的第i个标志位的取值为第三数值时,用于指示所述目标解码值为不等于i-1的数值或用于指示所述目标解码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值为第四数值时,用于指示所述目标解码值为等于i-1的数值或用于指示所述目标解码值为不大于i-1的数值;N为大于0的整数;
    基于所述N个标志位,确定是否采用所述至少一个熵解码算法对所述待解码值进行解码。
  15. 根据权利要求14所述的方法,其特征在于,所述基于所述N个标志位,确定是否采用所述至少一个熵解码算法对所述待解码值进行解码,包括:
    若所述N个标志位的取值均为所述第三数值,则确定采用所述至少一个熵解码算法对所述待解码值进行解码。
  16. 根据权利要求14或15所述的方法,其特征在于,所述采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值,包括:
    采用所述至少一个熵解码算法对所述待解码值进行解码,得到第五数值;
    对所述第五数值进行左移运算,得到第六数值;
    基于所述第六数值和N,确定所述目标解码值。
  17. 根据权利要求16所述的方法,其特征在于,所述采用所述至少一个熵解码算法对所述待解码值进行解码,得到第五数值之前,所述方法还包括:
    基于所述码流获取第一标志位;所述第一标志位用于指示所述目标解码值的奇偶性;
    其中,所述基于所述第六数值和N,确定所述目标解码值,包括:
    将所述第六数值、N和所述第一标志位的取值的和,确定为所述目标解码值。
  18. 一种编码方法,其特征在于,所述方法适用于编码器,所述方法包括:
    基于零游程值确定待编码值;
    采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码。
  19. 根据权利要求18所述的方法,其特征在于,所述至少一个熵编码算法为单个熵编码算法;
    其中,所述采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码,包括:
    若满足预设条件,则采用编码参数为第一数值的所述单个熵编码算法对所述待编码值进行编码;否则,采用所述编码参数为第二数值的所述单个熵编码算法对所述待编码值进行编码;
    其中,所述第一数值不等于第二数值。
  20. 根据权利要求19所述的方法,其特征在于,所述第一数值或所述第二数值为G;其中,G为预设值,或G为根据点云的属性信息和/或所述编码器采用的量化变量确定的数值。
  21. 根据权利要求19所述的方法,其特征在于,所述第一数值和/或所述第二数值为缺省值。
  22. 根据权利要求19至21中任一项所述的方法,其特征在于,所述方法还包括:
    对所述第一数值和/或所述第二数值进行编码。
  23. 根据权利要求19至22中任一项所述的方法,其特征在于,所述第一数值和所述第二数值的差值的绝对值小于或等于预设的上限阈值,或者,所述第一数值和所述第二数值的差值的绝对值位于预设的数值范围内。
  24. 根据权利要求18所述的方法,其特征在于,所述至少一个熵编码算法为单个熵编码算法;
    其中,所述采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码,包括:
    采用编码参数为目标数值的所述单个熵编码算法对所述待编码值进行编码。
  25. 根据权利要求24所述的方法,其特征在于,所述目标数值为G或所述目标数值为缺省值;其中,G为预设值,或G为根据点云的属性信息和/或所述编码器采用的量化变量确定的数值。
  26. 根据权利要求24或25所述的方法,其特征在于,所述方法还包括:
    对所述目标数值进行编码。
  27. 根据权利要求24至26中任一项所述的方法,其特征在于,所述单个熵编码算法为指数哥伦布编码算法时,所述编码参数为所述指数哥伦布编码算法的阶数。
  28. 根据权利要求18所述的方法,其特征在于,所述至少一个熵编码算法为多个熵编码算法;
    其中,所述采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码,包括:
    若满足预设条件,则采用所述熵编码算法中的第一熵编码算法对所述待编码值进行编码;否则,采用所述熵编码算法中的第二熵编码算法对所述待编码值进行编码。
  29. 根据权利要求28所述的方法,其特征在于,所述第一熵编码算法或所述第二熵编码算法为指数哥伦布编码算法时,所述指数哥伦布编码算法的阶数等于G;其中,G为预设值,或G为根据点云的属性信息和/或所述编码器采用的量化变量确定的数值。
  30. 根据权利要求19至23、28至29中的任一项所述的方法,其特征在于,所述预设条件包括以 下中的至少一项:
    G≤T;
    G=T;
    G≥T;
    其中,G为预设值,或G为根据点云的属性信息和/或所述编码器采用的量化变量确定的数值,T为预设阈值。
  31. 根据权利要求18至30中任一项所述的方法,其特征在于,所述至少一个熵编码算法中的熵编码算法为缺省熵编码算法。
  32. 根据权利要求18至31中任一项所述的方法,其特征在于,所述至少一个熵编码算法中的熵编码算法的编码性能高于参考熵编码算法的编码性能。
  33. 根据权利要求18至32中任一项所述的方法,其特征在于,所述方法还包括:
    确定N个标志位;
    其中,所述N个标志位中的第i个标志位的取值为第三数值时,用于指示所述待编码值为不等于i-1的数值或用于指示所述待编码值为大于i-1的数值,所述N个标志位中的第i个标志位的取值为第四数值时,用于指示所述待编码值为等于i-1的数值或用于指示所述待编码值为不大于i-1的数值;N为大于0的整数;
    基于所述N个标志位,确定是否采用所述至少一个熵编码算法对所述待编码值进行编码。
  34. 根据权利要求33所述的方法,其特征在于,所述基于所述N个标志位,确定是否采用所述至少一个熵编码算法对所述待编码值进行编码,包括:
    若所述N个标志位的取值均为所述第三数值,则确定采用所述至少一个熵编码算法对所述待编码值进行编码;
    其中,所述采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码,包括:
    对所述N个标志位进行编码并采用所述至少一个熵编码算法对所述待编码值进行编码。
  35. 根据权利要求33或34所述的方法,其特征在于,所述采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码,包括:
    利用所述待编码值减去N,得到第七数值;
    对所述第七数值进行右移运算,得到第八数值;
    利用所述至少一个熵编码算法对所述第八数值进行编码。
  36. 根据权利要求18至35中任一项所述的方法,其特征在于,所述采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码,包括:
    对第一标志位进行编码并采用所述至少一个熵编码算法对所述待编码值进行编码;所述第一标志位用于指示所述待编码值的奇偶性。
  37. 根据权利要求18至36中任一项所述的方法,其特征在于,所述基于零游程值确定待编码值,包括:
    将所述零游程值确定为所述待编码值;或
    将所述零游程值的商确定为所述待编码值,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
  38. 一种解码器,其特征在于,包括:
    获取单元,用于基于点云的码流获取待解码值;
    解码单元,用于采用所述解码器维持的至少一个熵解码算法对所述待解码值进行解码,得到目标解码值;所述目标解码值为零游程值或所述零游程值的商;其中,所述零游程值的商根据所述零游程值与预设数值之间的比值确定。
  39. 一种编码器,其特征在于,包括:
    获取单元,用于基于零游程值确定待编码值;
    编码单元,用于采用所述编码器维持的至少一个熵编码算法对所述待编码值进行编码。
  40. 一种解码器,其特征在于,包括:
    处理器,适于执行计算机程序;
    计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至17中任一项所述的方法。
  41. 一种编码器,其特征在于,包括:
    处理器,适于执行计算机程序;
    计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被所述处理 器执行时,实现如权利要求18至37中任一项所述的方法。
  42. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至17中任一项所述的方法或如权利要求18至37中任一项所述的方法。
  43. 一种计算机程序产品,包括计算机程序/指令,其特征在于,所述计算机程序/指令被处理器执行时实现如权利要求1至17中任一项所述的方法或如权利要求18至37中任一项所述的方法。
  44. 一种码流,其特征在于,所述码流如权利要求1至17中任一项所述的方法解码的码流,或所述码流如权利要求18至37中任一项所述的方法生成的码流。
PCT/CN2022/099635 2022-06-17 2022-06-17 解码方法、编码方法、解码器以及编码器 WO2023240660A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/099635 WO2023240660A1 (zh) 2022-06-17 2022-06-17 解码方法、编码方法、解码器以及编码器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/099635 WO2023240660A1 (zh) 2022-06-17 2022-06-17 解码方法、编码方法、解码器以及编码器

Publications (1)

Publication Number Publication Date
WO2023240660A1 true WO2023240660A1 (zh) 2023-12-21

Family

ID=89192973

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/099635 WO2023240660A1 (zh) 2022-06-17 2022-06-17 解码方法、编码方法、解码器以及编码器

Country Status (1)

Country Link
WO (1) WO2023240660A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170347100A1 (en) * 2016-05-28 2017-11-30 Microsoft Technology Licensing, Llc Region-adaptive hierarchical transform and entropy coding for point cloud compression, and corresponding decompression
WO2021045603A1 (ko) * 2019-09-06 2021-03-11 엘지전자 주식회사 포인트 클라우드 데이터 송신 장치, 포인트 클라우드 데이터 송신 방법, 포인트 클라우드 데이터 수신 장치 및 포인트 클라우드 데이터 수신 방법
CN112565734A (zh) * 2020-12-03 2021-03-26 西安电子科技大学 基于混合编码的点云属性编解码方法及装置
CN113228109A (zh) * 2018-12-26 2021-08-06 松下电器(美国)知识产权公司 三维数据编码方法、三维数据解码方法、三维数据编码装置、以及三维数据解码装置
CN113905242A (zh) * 2021-09-17 2022-01-07 中山大学 一种点云颜色属性自适应压缩行程编码方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170347100A1 (en) * 2016-05-28 2017-11-30 Microsoft Technology Licensing, Llc Region-adaptive hierarchical transform and entropy coding for point cloud compression, and corresponding decompression
CN113228109A (zh) * 2018-12-26 2021-08-06 松下电器(美国)知识产权公司 三维数据编码方法、三维数据解码方法、三维数据编码装置、以及三维数据解码装置
WO2021045603A1 (ko) * 2019-09-06 2021-03-11 엘지전자 주식회사 포인트 클라우드 데이터 송신 장치, 포인트 클라우드 데이터 송신 방법, 포인트 클라우드 데이터 수신 장치 및 포인트 클라우드 데이터 수신 방법
CN112565734A (zh) * 2020-12-03 2021-03-26 西安电子科技大学 基于混合编码的点云属性编解码方法及装置
CN113905242A (zh) * 2021-09-17 2022-01-07 中山大学 一种点云颜色属性自适应压缩行程编码方法

Similar Documents

Publication Publication Date Title
WO2022133753A1 (zh) 点云编解码方法与系统、及点云编码器与点云解码器
CN114598883A (zh) 点云属性的预测方法、编码器、解码器及存储介质
WO2023240660A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2023015530A1 (zh) 点云编解码方法、编码器、解码器及计算机可读存储介质
CN115086660B (zh) 基于点云属性预测的解码、编码方法、解码器及编码器
WO2023097694A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2023240662A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2023197337A1 (zh) 索引确定方法、装置、解码器以及编码器
WO2023197338A1 (zh) 索引确定方法、装置、解码器以及编码器
WO2023159428A1 (zh) 编码方法、编码器以及存储介质
WO2024103304A1 (zh) 点云编解码方法、编码器、解码器、码流及存储介质
WO2023023918A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2022257155A1 (zh) 解码方法、编码方法、解码器、编码器以及编解码设备
WO2023240455A1 (zh) 点云编码方法、编码装置、编码设备以及存储介质
WO2024077548A1 (zh) 点云解码方法、点云编码方法、解码器和编码器
WO2022217472A1 (zh) 点云编解码方法、编码器、解码器及计算机可读存储介质
WO2024007144A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023173237A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024119420A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023173238A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
US20230051431A1 (en) Method and apparatus for selecting neighbor point in point cloud, encoder, and decoder
WO2022133752A1 (zh) 点云的编码方法、解码方法、编码器以及解码器
WO2024119419A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024060161A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2024065272A1 (zh) 点云编解码方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22946341

Country of ref document: EP

Kind code of ref document: A1