WO2023123284A1 - Decoding method, encoding method, decoder, encoder, and storage medium - Google Patents

Decoding method, encoding method, decoder, encoder, and storage medium Download PDF

Info

Publication number
WO2023123284A1
WO2023123284A1 PCT/CN2021/143372 CN2021143372W WO2023123284A1 WO 2023123284 A1 WO2023123284 A1 WO 2023123284A1 CN 2021143372 W CN2021143372 W CN 2021143372W WO 2023123284 A1 WO2023123284 A1 WO 2023123284A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
attribute
color component
prediction
component
Prior art date
Application number
PCT/CN2021/143372
Other languages
French (fr)
Chinese (zh)
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/CN2021/143372 priority Critical patent/WO2023123284A1/en
Publication of WO2023123284A1 publication Critical patent/WO2023123284A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding

Definitions

  • the embodiment of the present application relates to a video encoding technology, and relates to but not limited to a decoding method, an encoding method, a decoder, an encoder, and a storage medium.
  • attribute information coding is mainly aimed at the coding of color information (that is, color components), so as to transform color information from the spatial domain to the frequency domain, and convert it into Luminance-Chrominance (YUV) that is more in line with the visual characteristics of the human eye. color space, and then perform attribute encoding on the preprocessed attribute information to obtain a quantized residual value, and input the quantized residual value into the attribute entropy encoder to form a binary attribute code stream.
  • color information that is, color components
  • YUV Luminance-Chrominance
  • the point cloud compression reference platform (Point Cloud Reference Model, PCRM) conducts secondary prediction of attribute residual values based on cross-component attribute residuals, and further eliminates the correlation between the three color components. redundancy.
  • PCRM Point Cloud Reference Model
  • the secondary prediction algorithm of the residual value of the attribute uses the R component to predict the G component, and uses the sum of the R component and the G component to predict the B component.
  • this prediction method is not accurate.
  • Embodiments of the present application provide a decoding method, an encoding method, a decoder, an encoder, and a storage medium, which can improve the accuracy of encoding and decoding during attribute encoding.
  • the embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
  • the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component.
  • the embodiment of the present application also provides an encoding method, which is applied to an encoder, and the method includes:
  • the color component of the current point is predicted twice to obtain the attribute residual value of the color component.
  • the embodiment of the present application provides a decoder, including:
  • the parsing part is configured to parse the code stream and determine the attribute residual value of the color component corresponding to the current point;
  • the first acquisition part is configured to acquire the attribute prediction value of the color component corresponding to the current point
  • the first determining part is configured to determine a prediction mode of the color component of the current point; wherein the prediction mode is determined based on the degree of difference between the color components;
  • the decoding part is configured to decode and reconstruct the color component of the current point based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the color component Property reconstruction value.
  • an encoder including:
  • the second acquisition part is configured to acquire the attribute prediction value of the color component corresponding to the current point in the point cloud;
  • the second determination part is configured to determine a standard value of the color component corresponding to the current point based on the attribute prediction value; determine at least two color components corresponding to the current point, and at least the standard value two degrees of difference; based on the at least two degrees of difference, determining a prediction mode of the color component;
  • the prediction part is configured to perform secondary prediction on the color component of the current point based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the attribute residual value of the color component.
  • the embodiment of the present application also provides a decoder, including:
  • the first memory stores a computer program that can run on the first processor, and the first processor implements the decoding method of the decoder when executing the program.
  • the embodiment of the present application also provides an encoder, including:
  • the second memory stores a computer program that can run on the second processor, and the second processor executes the program and the encoding method of the encoder.
  • the embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by the first processor, the decoding method of the claim decoder is realized; or, the computer program is executed by the second processor When executed, the encoding method of the claim encoder is realized.
  • the embodiment of the present application provides a decoding method, an encoding method, a decoder, an encoder, and a storage medium.
  • determine the attribute residual value of the color component corresponding to the current point obtain the attribute of the color component corresponding to the current point Prediction value; determine the prediction mode of the color component of the current point; where the prediction mode is determined based on the degree of difference between the color components; based on the prediction mode, attribute residual value, attribute prediction value and initial cross-component attribute residual prediction Value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component. Since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the decoding and reconstruction of the color component of the current point is performed according to the prediction mode, the accuracy of the attribute reconstruction value of the obtained color component higher.
  • Figure 1A is an exemplary three-dimensional point cloud image provided by the embodiment of the present application.
  • FIG. 1B is a partially enlarged view of an exemplary three-dimensional point cloud image provided by an embodiment of the present application
  • Figure 2A- Figure 2F is an exemplary point cloud image at different angles provided by the embodiment of the present application.
  • Fig. 2G is an exemplary illustration of the data storage format corresponding to Fig. 2A-Fig. 2F provided by the embodiment of the present application;
  • FIG. 3 is a schematic diagram of the composition and structure of an exemplary video codec network architecture provided by an embodiment of the present application
  • FIG. 4 is a structural diagram of an exemplary video coding system provided by an embodiment of the present application.
  • FIG. 5 is a structural diagram of an exemplary video decoding system provided by an embodiment of the present application.
  • Fig. 6A is an exemplary bounding box illustration provided by the embodiment of the present application.
  • 6B-6G are exemplary schematic diagrams of iterative octree division of bounding boxes provided by the embodiment of the present application.
  • FIG. 7A is a schematic diagram 1 of an exemplary encoding sequence of Morton codes in two-dimensional space provided by the embodiment of the present application;
  • FIG. 7B is a second schematic diagram of the coding sequence of an exemplary Morton code in a two-dimensional space provided by the embodiment of the present application.
  • FIG. 7C is a schematic diagram 3 of an exemplary Morton code encoding sequence in two-dimensional space provided by the embodiment of the present application.
  • FIG. 8 is a schematic diagram of an exemplary Morton code encoding sequence in three-dimensional space provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of wavelengths of exemplary different color components provided by the embodiment of the present application.
  • FIG. 10 is a flow chart of a decoding method further provided in the embodiment of the present application.
  • FIG. 11 is a flow chart of an encoding method further provided in the embodiment of the present application.
  • FIG. 12 is a first schematic structural diagram of a decoder provided by an embodiment of the present application.
  • FIG. 13 is a second schematic structural diagram of a decoder provided in an embodiment of the present application.
  • FIG. 14 is a first schematic structural diagram of an encoder provided by an embodiment of the present application.
  • FIG. 15 is a second structural schematic diagram of an encoder provided by an embodiment of the present application.
  • point cloud compression Point Cloud Compression, PCC
  • Geometry-based Point Cloud Compression G-PCC
  • video-based point cloud compression Video Point Cloud Compression, V-PCC
  • level of detail Level of Detail, LOD
  • area adaptive analysis Region Adaptive Hierarchal Transform RAHT
  • slice bounding box
  • octree triangle soup, trisoup, block, vertex , Root Node (RootNode)
  • MPEG Moving Picture Experts Group
  • ISO International Standardization Organization
  • ISO International Electrotechnical Commission
  • audio and video coding standard AVS.
  • Point Cloud is a three-dimensional representation of the surface of an object.
  • the point cloud (data) on the surface of an object can be collected through acquisition devices such as photoelectric radar, lidar, laser scanner, and multi-view camera.
  • a point cloud is a set of discrete point sets randomly distributed in space that express the spatial structure and surface properties of a 3D object or scene.
  • Figure 1A shows a 3D point cloud image
  • Figure 1B shows a partial enlarged view of a 3D point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
  • the two-dimensional image has information expression at each pixel, and the distribution is regular, so there is no need to additionally record its position information; however, the distribution of points in the point cloud in three-dimensional space is random and irregular, so it is necessary to record each
  • the position of the point in space can completely express a point cloud.
  • each position in the acquisition process has corresponding attribute information, usually RGB color value, and the color value reflects the color of the object; for point cloud, the attribute information corresponding to each point is in addition to color information. , and the more common one is the reflectance value, which reflects the surface material of the object. Therefore, the points in the point cloud can include point location information and point attribute information.
  • the position information of the point may be three-dimensional coordinate information (x, y, z) of the point.
  • the location information of a point may also be referred to as geometric information of a point.
  • the point attribute information may include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r) and the like.
  • color information may be information on any color space.
  • color information may be RGB information. Wherein, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B).
  • the color information may be luminance chrominance (YCbCr, YUV) information. Among them, Y represents brightness (Luma), Cb(U) represents blue color difference, and Cr(V) represents red color difference.
  • the points in the point cloud can include the three-dimensional coordinate information of the point and the reflectance value of the point.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the three-dimensional color information of the point.
  • the point cloud is obtained by combining the principles of laser measurement and photogrammetry.
  • the points in the point cloud can include the three-dimensional coordinate information of the point, the reflectance value of the point and the three-dimensional color information of the point.
  • Figure 2A- Figure 2G shows a point cloud image and its corresponding data storage format, wherein Figure 2A- Figure 2F provides six viewing angles of the point cloud image;
  • Figure 2G consists of the file header information part and data
  • the header information includes the data format, data representation type, total point cloud points, and the content represented by the point cloud.
  • the point cloud is in ".ply" format, represented by ASCII code, the total number of points is 207242, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information RGB (Red, Green, Blue).
  • Point clouds can be divided into the following ways:
  • Static point cloud that is, the object is stationary, and the device that acquires the point cloud is also stationary;
  • Dynamic point cloud the object is moving, but the device for obtaining the point cloud is still;
  • Dynamically obtain point cloud The device for obtaining point cloud is in motion.
  • point cloud For example, according to the purpose of point cloud, it is divided into two categories:
  • Category 1 Machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and emergency rescue robots;
  • Category 2 Human eyes perceive point clouds, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
  • Point cloud can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and because point cloud is obtained by directly sampling real objects, it can provide a strong sense of reality under the premise of ensuring accuracy, so it is widely used.
  • the collection of point clouds mainly has the following methods: 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 The point cloud of tens of millions of points can be obtained per second.
  • These technologies reduce the cost and time period of point cloud data acquisition, and improve the accuracy of the data.
  • the transformation of point cloud data acquisition methods has made it possible to acquire a large amount of point cloud data. With the growth of application requirements, the processing of massive 3D point cloud data encounters the bottleneck of storage space and transmission bandwidth limitations.
  • the number of points in each frame of point cloud is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar)
  • the data volume of 10s is about 1280 ⁇ 720 ⁇ 12bit ⁇ 24fps ⁇ 10s ⁇ 0.33GB
  • point cloud compression has become a key issue to promote the development of the point cloud industry.
  • point cloud is a collection of massive points
  • storing point cloud will not only consume a lot of memory, but also is not conducive to transmission, and there is not such a large bandwidth to support the direct transmission of point cloud at the network layer without compression, so , need to compress the point cloud.
  • the point cloud coding framework that can compress the point cloud can be the G-PCC codec framework or the V-PCC codec framework provided by MPEG, or the AVS-PCC codec framework provided by AVS.
  • the G-PCC codec framework can be used to compress the first type of static point cloud and the third type of dynamically acquired point cloud
  • the V-PCC codec framework can be used to compress the second type of dynamic point cloud.
  • the G-PCC codec framework is also called point cloud codec TMC13
  • the V-PCC codec framework is also called point cloud codec TMC2.
  • the embodiment of the present application provides a network architecture of a video encoding and decoding system including a decoding method and an encoding method.
  • FIG. It includes one or more electronic devices 13 to 1N and a communication network 01 , where the electronic devices 13 to 1N can perform video interaction through the communication network 01 .
  • the electronic device may be various types of devices with video codec functions during implementation, for example, the electronic device may include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, TV sets, sensing devices, servers, etc., are not limited in this embodiment of the application.
  • the decoder or encoder in the embodiment of the present application may be the above-mentioned electronic device.
  • the electronic device in the embodiment of the present application has a video encoding and decoding function, and generally includes a video encoder (ie, an encoder) and a video decoder (ie, a decoder).
  • a video encoder ie, an encoder
  • a video decoder ie, a decoder
  • the codec framework is described in the AVS-PCC codec framework.
  • Point cloud compression generally uses point cloud geometric information and attribute information to compress separately. Compression of cloud attributes; at the decoding end, the geometric information of the point cloud is first decoded in the geometric decoder, and then the decoded geometric information is input into the attribute decoder as additional information to assist in the compression of the point cloud attributes.
  • the entire codec consists of preprocessing/postprocessing, geometric encoding/decoding, and attribute encoding/decoding.
  • the present application provides a video encoding system, as shown in FIG. 4 , the framework of the point cloud compression reference platform PCRM of AVS point cloud.
  • the video encoding system 11 includes a geometric encoder: a coordinate translation unit 111, a coordinate quantization unit 112, and an octave Tree construction unit 113 , geometric entropy encoder 114 , geometric reconstruction unit 115 .
  • Attribute encoder attribute recoloring unit 116 , color space transformation unit 117 , first attribute prediction unit 118 , quantization unit 119 and attribute entropy encoder 1110 .
  • the original geometric information is firstly preprocessed, the geometric origin is normalized to the minimum value position in the point cloud space by the coordinate translation unit 111, and the geometric information is converted from the floating point by the coordinate quantization unit 112 Points are converted into plastics, which is convenient for subsequent regularization processing; then the regularized geometric information is geometrically coded, and the point cloud space is recursively divided by the octree structure through the octree construction unit 113, and each time the current node is divided into Eight sub-blocks of the same size, and judge the occupancy code word of each sub-block.
  • the sub-block When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty, and the occupancy code of all blocks is recorded in the last layer of recursive division.
  • word information, and carry out geometric encoding the geometric information expressed by the octree structure is input into the geometric entropy encoder 114 on the one hand to form a geometric code stream; on the other hand, the geometric reconstruction unit 115 in the encoder performs geometric reconstruction processing.
  • the geometric information of is fed into the attribute encoder as additional information.
  • the original attribute information is firstly preprocessed. Since the geometric information has changed after the geometric encoding, the attribute recoloring unit 116 is used to reassign the attribute value for each point after the geometric encoding to realize the attribute Recolor.
  • the attribute information to be processed is color information
  • the original color information needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye through the color space transformation unit 117;
  • Unit 118 performs attribute encoding or prediction on the preprocessed attribute information.
  • the attribute prediction first needs to reorder the point cloud, and the reordering method is Morton code. Therefore, the traversal order of attribute encoding or attribute prediction is Morton order.
  • the attribute prediction method in PCRM is a single-point prediction based on Morton order, that is, according to the Morton order, one point is traced forward from the current point to be encoded (current point), and the neighbor point found is the prediction reference point of the current point to be encoded. Then the attribute reconstruction value of the predicted reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute value of the current point to be encoded and the attribute prediction value; finally, the residual is quantized by the quantization unit 119, and the quantized residual The difference is input to the attribute entropy encoder 1110 to form an attribute code stream.
  • the present application provides a video decoding system, as shown in Figure 5, the framework of the point cloud compression reference platform PCRM of AVS point cloud, the video decoding system 12 includes a geometric decoder: a geometric entropy decoder 121, an octree reconstruction unit 122 .
  • the coordinate inverse quantization unit 123 and the coordinate inverse translation unit 124 .
  • Attribute decoder attribute entropy decoder 125 , inverse quantization unit 126 , second attribute prediction unit 127 and color space inverse transform unit 128 .
  • the geometry and attributes are also decoded separately.
  • the geometric decoding part first, the geometric code stream is entropy decoded by the geometric entropy decoder 121 to obtain the geometric information of each node, and then the octree structure is constructed by the octree reconstruction unit 122 in the same manner as the geometric encoding, Combining the decoded geometry to reconstruct the geometric information expressed through the octree structure after the coordinate transformation, on the one hand, the information is subjected to coordinate inverse quantization by the coordinate inverse quantization unit 123 and detranslated by the coordinate inverse translation unit 124 to obtain the decoded geometric information. On the other hand, it is input into the attribute decoder as additional information.
  • the Morton sequence is constructed in the same way as the encoding end, and the attribute code stream is first entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information; then the inverse quantization is performed by the inverse quantization unit 126, Obtain the point cloud residual value; similarly, in the same manner as the attribute encoding, obtain the attribute prediction value of the point to be decoded by the second attribute prediction unit 127, and then add the attribute prediction value and the attribute residual value to restore The YUV attribute value of the current point to be decoded is obtained; finally, the decoded attribute information is obtained through the color space inverse transformation of the color space inverse transformation unit 128.
  • the recursive octree structure is used to express the point in the point cloud as the center of the cube in a regular way, as shown in Figure 6A.
  • the boundary values of the point cloud in the x, y, and z directions are formula (1) - formula (6):
  • x min min(x 0 ,x 1 ,...,x K-1 ) (1)
  • x man max(x 0 ,x 1 ,...,x K-1 ) (4)
  • the origin (x origin , y origin , z origin ) of the bounding box can be calculated as formula (7) - formula (9):
  • the bounding box is first divided into octrees, and each time eight sub-blocks are obtained, and then the non-empty blocks (blocks containing points) in the sub-blocks are divided again
  • the octree division of so recursively divided until a certain depth, the non-empty sub-block of the final size is called voxel, each voxel contains one or more points, and the geometric positions of these points are normalized to the center point of the voxel , the attribute value of the center point is the average value of the attribute values of all points in the voxel, and finally the image shown in Figure 6G is obtained.
  • regularizing the point cloud into blocks in space is beneficial to the description of the relationship between points in the point cloud, and then can express a specific encoding sequence, and encode each voxel in a certain order, that is, the encoded voxel represents The points (or "nodes") of , a commonly used coding order is the cross-separated Morton order.
  • a commonly used coding order is the cross-separated Morton order.
  • the encoding sequence of the Morton code in the two-dimensional space in Fig. 7A-Fig. 7C is used, taking a block of size 8*8 as an example, where the order of the arrows represents the encoding order of the points under the Morton order. As shown in FIG.
  • FIG. 7A the "z"-shaped Morton coding order of 2*2 pixels in the block is shown.
  • Figure 7B shows the "z”-shaped Morton coding sequence between four 2*2 blocks
  • Figure 7C shows the "z”-shaped Morton coding sequence between four 4*4 blocks, which form the entire 8*8 block Morton coding sequence.
  • the Morton coding sequence extended to the three-dimensional space is shown in Figure 8, which shows 16 nodes, and the Morton coding sequence between each "z” and “z” inside each "z” is First encode along the x-axis, then along the y-axis, and finally along the z-axis.
  • the attribute residual quadratic prediction algorithm currently used by PCRM uses the R component to predict the G component, and uses the sum of the R component and the G component to predict the B component, which can effectively eliminate the correlation between the three components. Thereby improving the coding efficiency.
  • the wavelength distribution range of red light is 620-750nm
  • the wavelength distribution range of green light is 495-570nm
  • the wavelength distribution range of blue light is 450-475nm, as shown in Figure 9, according to the From the point of view of the coincidence degree, it is obvious that it is not very reasonable to use the R component to predict the other two components, and the prediction is not accurate and fixed.
  • An embodiment of the present application provides a decoding method, which is applied to a video decoding device, that is, a decoder.
  • the function realized by this method can be realized by calling the program code by the first processor in the video decoding device.
  • the program code can be stored in the computer storage medium.
  • the video decoding device includes at least the first processor and the first memory medium. Wherein, the current decoding point and the current encoding point are both represented by the current point below.
  • FIG. 10 is a schematic diagram of an implementation flow of a decoding method according to an embodiment of the present application. The method includes:
  • the decoder can analyze the attribute residual value of the color component corresponding to the current point from the code stream.
  • the attribute residual value analyzed in the code stream is a quantized residual value.
  • the color component at the current point may include: a first color component, a second color component, and a third color component.
  • the first color component, the second color component and the third color component may be three RGB components respectively.
  • the points in the point cloud all have attribute information of RGB three components.
  • the decoder can parse out the attribute residual values corresponding to each color component of the current point.
  • the decoder needs to perform decoding processing on each color component of the current point.
  • the encoding can be based on the single-point prediction of the Morton order, that is, one point is traced forward from the current point according to the Morton order, the found point is the prediction reference point of the current point, and then the prediction reference point
  • the attribute reconstruction value of is used as the attribute prediction value.
  • the decoder predicts the attribute of the current point, it can obtain the attribute reconstruction value of the prediction reference point of the current point, that is, obtain the attribute prediction value of the color component corresponding to the current point.
  • the decoder can perform secondary attribute prediction to eliminate redundancy after decoding the attribute residual value. Therefore, in the process of secondary attribute prediction, the decoder can determine the prediction mode of the color component of the current point during the secondary attribute prediction, and then perform secondary attribute prediction according to the prediction mode, and combine the attribute residual value and attribute prediction value and the initial cross-component attribute residual prediction value, decode and reconstruct the color component of the current point, and obtain the attribute reconstruction value of the color component.
  • the prediction mode represents the encoding and decoding sequence of the color components or represents the prediction form of the color components (for example, which color component is encoded and decoded first). Wherein, the prediction mode is determined based on the degree of difference between the color components.
  • the prediction mode includes: the first color component to be predicted; the first color component to be predicted is the first coded color among the first color component, the second color component and the third color component portion.
  • the decoder can adaptively decide how to decode and reconstruct the color component by first encoding the first color component to be predicted. Considering the adaptive prediction form of the color component, the secondary attribute prediction can be improved. the accuracy.
  • S1031 and S1032 may be used to determine the prediction mode, and S1033-1035 may also be used to implement, which is not limited in this embodiment of the present application.
  • the prediction mode flag is transmitted in the code stream, so that when decoding the current point, the decoder can simultaneously parse out the current point from the code stream
  • the prediction mode flag of the color component when performing secondary attribute prediction wherein the prediction mode flag indicates which color component is coded first. Therefore, the decoder can determine the prediction mode of the color component at the current point according to the prediction mode flag bit.
  • the prediction mode flag can indicate which color component is coded first.
  • the prediction mode flag can be represented in digital form. For example, 0 can be used to represent the first color component, 1 can be used to represent the second color component, and 2 can be used to represent the third color component. This embodiment of the present application does not limit it.
  • the prediction mode flag is determined based on the degree of difference between color components during encoding.
  • the decoder can determine the prediction mode through the indication of the prediction mode flag, without performing calculation of the prediction mode, which can save decoding time and improve decoding efficiency.
  • the decoder can also determine the prediction mode in a way that does not require the prediction mode flag bit.
  • the decoder can determine a standard value for the color component according to the attribute prediction value corresponding to the current point, and then compare the attribute prediction value of each color component of the current point with the standard value to determine at least two color components. degree of difference, and then determine the prediction mode based on at least two degrees of difference.
  • the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component.
  • the decoder determines the standard value of the color component corresponding to the current point based on the attribute prediction value, including at least one of the following:
  • the median value of the first attribute predicted value, the second attribute predicted value and the third attribute predicted value is determined as a standard value.
  • the standard value can also be obtained according to other mathematical processing means of the predicted value of the first attribute, the predicted value of the second attribute and the predicted value of the third attribute, which is not limited in this embodiment of the present application.
  • the decoder after the decoder determines the standard value, it can compare the attribute prediction value of each color component of the current point with the standard value to obtain three color difference degrees, or it can compare the attribute prediction value of each color component in the current point The attribute prediction values of any two color components are compared with the standard values respectively, and two difference degrees corresponding to any two color components are obtained.
  • the decoder may determine the minimum degree of difference among at least two degrees of difference; and determine the color component corresponding to the minimum degree of difference as the prediction mode.
  • the decoder determines a sorting result of at least two different degrees based on the at least two different degrees; and determines a prediction mode according to the sorting result.
  • the prediction mode indicates that the first predicted color component to be predicted is firstly decoded in the second attribute prediction of the current point, and then the second attribute prediction is performed on other color components.
  • the decoder determines the sorting results of the at least two difference degrees; according to the sorting results, the prediction mode corresponding to the color component with the smallest difference can be determined. Moreover, when the secondary attribute prediction of the color components of the current point is performed, the decoding order of the color components can be determined from the order of the difference degrees from small to large according to the sorting results.
  • the decoder calculates the difference between the R component and the G component and the standard value (that is, the difference diff R and diff G ), and compares the two differences, and if diff R ⁇ diff G , then determine that the R component is the prediction mode for secondary prediction of attribute residuals, otherwise use the G component as the prediction mode for secondary prediction of attribute residuals.
  • the decoder calculates the differences (diff R , diff G, and diff B ) between the R component, the G component, and the B component and the standard value, and compares them. If diff R in diff R , diff G , and diff B If it is the smallest, determine the R component as the prediction mode for secondary prediction of the attribute residual; if the diff G is the smallest, use the G component as the prediction mode for the secondary prediction of the attribute residual; if the diff B is the smallest, use the B component as the prediction mode Quadratic prediction of attribute residuals.
  • the decoder determines the prediction mode of the current point, it first decodes the first color component to be predicted, and then decodes the other color components (the second color component to be predicted) based on the first color component to be predicted. component and the third color component to be predicted) for decoding and reconstruction (that is, secondary attribute prediction), or based on the first color component to be predicted, the second color component to be predicted is decoded and reconstructed, and the second color component to be predicted is used The component decodes and reconstructs the third color component to be predicted.
  • the second to-be-predicted color component and the third to-be-predicted color component are color components other than the first to-be-predicted color component among the first, second, and third color components.
  • the implementation of S104 may include:
  • the prediction mode based on the attribute residual value of the first color component to be predicted, determine the reconstruction value of the first attribute residual of the first color component to be predicted; wherein, the first color component to be predicted is the prediction mode The color component of the representation.
  • the decoder may dequantize the attribute residual value of the first to-be-predicted color component according to the prediction mode, and determine the first reconstructed attribute value of the first to-be-predicted color component. Since each point can have three color components, when performing secondary attribute prediction on the current point, each color component needs to be processed to complete the decoding and reconstruction of the current point.
  • the attribute reconstruction value includes: the first attribute reconstruction value corresponding to the first to-be-predicted color component, the second attribute reconstruction value corresponding to the second to-be-predicted color component, and the third to-be-predicted color component The third attribute reconstruction value corresponding to the predicted color component.
  • the decoder since the first color component to be predicted is the color component corresponding to the prediction mode, the decoder first decodes and reconstructs the first color component to be predicted, and then based on the first color component to be predicted component continues to decode other color components.
  • the decoder can add the initial cross-component attribute residual prediction value, the attribute prediction value corresponding to the first to-be-predicted color component, and the first attribute residual reconstruction value to obtain the first to-be-predicted color component A property reconstruction value.
  • the second cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual Multiplier or divisor of the difference reconstruction value.
  • the third cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual Multiplier or divisor of the difference reconstruction value.
  • the initial cross-component attribute residual prediction value may be 0, which is not limited in this embodiment of the present application.
  • the decoder uses the cross-component attribute residual prediction value to perform secondary attribute prediction, but the cross-component attribute residual prediction values corresponding to different color components of a point are related, but may not be the same .
  • the first color component to be predicted uses the initial cross-component attribute residual prediction value to perform secondary attribute prediction
  • the second color component to be predicted uses the second cross-component attribute residual prediction value to perform
  • the third color component to be predicted uses the third cross-component attribute residual prediction value for secondary attribute prediction.
  • the decoder decodes and reconstructs other color components based on the second cross-component attribute residual prediction value, and the realization of obtaining the second attribute reconstruction value and the third attribute reconstruction value may include:
  • decode and reconstruct the second color component to be predicted to obtain the second attribute reconstruction value; based on the second attribute residual reconstruction value, determine the third cross-component attribute residual difference prediction value; based on the third cross-component attribute residual prediction value, decode and reconstruct the third to-be-predicted color component to obtain the third attribute reconstruction value.
  • the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or is the second attribute The multiplier or divisor of the residual reconstruction value.
  • the first color component to be predicted is the G component
  • the second color component to be predicted is the R component
  • the third color component to be predicted is the B component. Then, when the decoder performs secondary attribute prediction on the G component, it uses the initial cross-component attribute residual prediction value to obtain the first attribute reconstruction value of the G component.
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the second cross-component attribute residual value difference prediction value
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the third cross-component attribute residual prediction value
  • the first attribute residual prediction value of the R component can also be used
  • the reconstruction value of the residual of the two attributes is updated, and the predicted value of the second cross-component attribute residual is updated to obtain the third predicted value of the cross-component attribute residual.
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value
  • the second cross-component attribute residual prediction value can be the first attribute residual reconstruction value + Obtain the second cross-component attribute residual prediction value for the initial cross-component attribute residual prediction value; or, use twice the first attribute residual reconstruction value as the second cross-component attribute residual prediction value.
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value, and the third cross-component attribute residual prediction value can be obtained, which can be the first attribute residual reconstruction value + the initial
  • the cross-component attribute residual predictors yield the third cross-component attribute residual predictors; alternatively, half the reconstructed values of the first attribute residuals are used as the third cross-component attribute residual predictors.
  • the adaptive selection of the prediction mode can be determined based on the prediction mode flag bit of the color component, when the decoding and reconstruction of the color component at the current point is performed according to the prediction mode, the properties of the obtained color component The accuracy of the reconstructed values is high.
  • the mean mean of the color three components of the attribute prediction value of the current point that is, the standard value (also can be the median, maximum value, minimum value, etc.);
  • the second cross-component attribute residual prediction value or the third cross-component attribute residual prediction value is set as a multiple or divisor of the attribute residual reconstruction value of the secondary prediction component. For example, when performing secondary prediction of attribute residuals on the R component, set the cross-component attribute residual prediction value to the attribute residual reconstruction value of the G component divided by 2; The predicted value of the component attribute residual is set as the reconstructed value of the attribute residual of the G component divided by 4.
  • the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the decoding and reconstruction of the color component of the current point is performed according to the prediction mode, the properties of the obtained color components The accuracy of the reconstructed values is high.
  • An embodiment of the present application provides an encoding method, which is applied to a video encoding device, that is, an encoder.
  • the function realized by this method can be realized by calling the program code by the second processor in the video encoding device, and of course the program code can be stored in the computer storage medium.
  • the video encoding device includes at least the second processor and the second storage medium.
  • Fig. 11 is a schematic diagram of an implementation process of encoding according to an embodiment of the present application. The method includes:
  • S203 Determine at least two degrees of difference between at least two color components corresponding to the current point and a standard value.
  • an encoding method is proposed.
  • the encoder can obtain the attribute of the color component corresponding to the current point in the point cloud after the attribute prediction is performed by the first attribute unit. Predicted value, in order to eliminate redundancy at this time, you can continue to perform secondary attribute prediction on the color component of the current point.
  • the encoder can first determine a standard value for the color component according to the attribute prediction value of each color component, and then determine the difference between at least two color components of the current point and the standard value, that is, at least Two degrees of difference, and then determine the prediction mode based on at least two degrees of difference.
  • the standard value can be directly obtained from the attribute prediction value of the color component, or it can be determined based on the attribute prediction value of at least two color components combined with the attribute information of the color component to obtain the initial attribute residual reconstruction value.
  • This application implements Examples are not limited.
  • At least two degrees of difference can be obtained by directly comparing attribute prediction values of at least two color components.
  • the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component.
  • the encoder determines the standard value of the color component corresponding to the current point based on the attribute prediction value, including at least one of the following:
  • the median value of the first attribute predicted value, the second attribute predicted value and the third attribute predicted value is determined as a standard value.
  • the standard value can also be obtained according to other mathematical processing means of the predicted value of the first attribute, the predicted value of the second attribute and the predicted value of the third attribute, which is not limited in this embodiment of the present application.
  • the encoder after the encoder determines the standard value, it can compare the attribute prediction value of each color component of the current point with the standard value to obtain three color difference degrees, or it can use the The attribute prediction values of any two color components are compared with the standard values respectively to obtain two degrees of difference corresponding to any two color components, which is not limited in this embodiment of the present application.
  • the encoder determines the initial attribute residual reconstruction value obtained according to attribute prediction values of at least two color components combined with attribute information of the color components.
  • the encoder determines the standard value of the color component corresponding to the current point based on the attribute prediction value as follows:
  • the encoder determines the initial residual value corresponding to the current point based on the predicted attribute value and the attribute information of the current point; quantizes and dequantizes the initial residual value to obtain the reconstruction value of the initial attribute residual.
  • the encoder determines the initial attribute residual reconstruction value of each color component corresponding to the current point, and based on the initial attribute residual of each color component Reconstruct the value to determine the standard value of the color component corresponding to the current point.
  • the initial attribute residual reconstruction value includes: the first initial attribute residual reconstruction value of the first color component, the second initial attribute residual reconstruction value of the second color component, and the third color component The residual reconstruction value of the third genus initial attribute;
  • the encoder determines the standard value of the color component corresponding to the current point based on the initial attribute residual reconstruction value, including at least one of the following:
  • the encoder can compare the initial attribute residual reconstruction value of each color component of the current point with the standard value to obtain three color difference degrees, or the current The initial attribute residual reconstruction values of any two color components in the point are compared with the standard values to obtain two degrees of difference corresponding to any two color components, which is not limited in this embodiment of the present application.
  • the standard value can also be obtained according to other mathematical processing methods of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value, which is not limited in this embodiment of the present application.
  • the encoder may determine the minimum degree of difference among at least two degrees of difference; and determine the color component corresponding to the minimum degree of difference as the prediction mode.
  • the encoder determines a sorting result of the at least two difference degrees based on the at least two difference degrees; and determines a prediction mode according to the sorting result.
  • the prediction mode indicates that the first predicted color component to be predicted is firstly decoded in the second attribute prediction of the current point, and then the second attribute prediction is performed on other color components.
  • the prediction mode represents the encoding and decoding sequence of the color components or represents the prediction form of the color components (for example, which color component is encoded and decoded first).
  • the prediction mode includes: the first color component to be predicted; the first color component to be predicted is the first coded color among the first color component, the second color component and the third color component portion.
  • the encoder determines the sorting results of the at least two difference degrees; according to the sorting results, the prediction mode corresponding to the color component with the smallest difference can be determined. Moreover, when the secondary attribute prediction of the color component of the current point is performed, the coding sequence of the color components can be determined from the order of the degree of difference from small to large according to the sorting result.
  • the encoder calculates the difference between the R component and the G component and the standard value (ie, the difference diff R and diff G ), and compares the two differences, and if diff R ⁇ diff G , then determine that the R component is the prediction mode for secondary prediction of attribute residuals, otherwise use the G component as the prediction mode for secondary prediction of attribute residuals.
  • the standard value ie, the difference diff R and diff G
  • the encoder calculates the differences (diff R , diff G and diff B ) between the R component, the G component, and the B component and the standard value, and compares them. If diff R among diff R , diff G and diff B If it is the smallest, determine the R component as the prediction mode for secondary prediction of the attribute residual; if the diff G is the smallest, use the G component as the prediction mode for the secondary prediction of the attribute residual; if the diff B is the smallest, use the B component as the prediction mode Quadratic prediction of attribute residuals.
  • the encoder when the encoder determines the prediction mode of the color component based on at least two differences, it can generate a prediction mode flag and write it into the code stream; the prediction mode flag represents the prediction mode.
  • the encoder does not need to generate the prediction mode flag, and directly performs the same determination process of the prediction mode on the decoder side. .
  • the encoder determines the prediction mode of the color component of the current point during the secondary attribute prediction, and then performs secondary attribute prediction according to the prediction mode, and combines the predicted value of the attribute and the initial cross-component attribute residual prediction value, perform secondary prediction on the color component of the current point, and obtain the attribute residual value of the color component.
  • the encoder can perform secondary attribute prediction according to the prediction mode, and combine the attribute information of each color component, the attribute prediction value and the initial cross-component attribute residual prediction value to carry out the color component of the current point Quadratic prediction to obtain the attribute residual value of the color component.
  • the encoder determines the prediction mode of the current point, it first performs second prediction on the first color component to be predicted, and then performs second prediction on the other color components (the second color component to be predicted) based on the first color component to be predicted. predicted color component and the third color component to be predicted) for secondary prediction, or secondly predict the second color component to be predicted based on the first color component to be predicted, and use the second color component to be predicted to predict the second color component Three to-be-predicted color components perform secondary prediction.
  • the second to-be-predicted color component and the third to-be-predicted color component are color components other than the first to-be-predicted color component among the first, second, and third color components.
  • the encoder combines the first attribute information of the first color component to be predicted with the attribute prediction value of the first color component to be predicted and the initial cross-component attribute residual prediction value Quantize after subtraction in turn to achieve secondary prediction, and obtain the attribute residual value of the first color component to be predicted; after inverse quantization of the attribute residual value of the first color component to be predicted, the first color to be predicted is obtained
  • the first attribute residual reconstruction value of the component based on the first attribute residual reconstruction value, the second cross-component attribute residual prediction value is determined; based on the second cross-component attribute residual prediction value, the other color components are
  • the second prediction is to obtain the attribute residual value of the second to-be-predicted color component and the attribute residual value of the third to-be-predicted color component; wherein, the second to-be-predicted color component and the third to-be-predicted color component are the Other color components except the first to-be-predicted color component among the first color component, the second color component
  • the encoder can use the first attribute information of the first color component to be predicted according to the prediction mode, subtract the attribute prediction value of the first color component to be predicted, and then subtract the initial cross-component attribute
  • the residual prediction value is quantized to obtain the attribute residual value of the first color component to be predicted. Since each point can have three color components, when performing secondary attribute prediction on the current point, each color component needs to be processed to complete the coding part of the current point's secondary attribute prediction.
  • the encoder performs secondary prediction on other color components based on the second cross-component attribute residual prediction value to obtain the attribute residual value of the second to-be-predicted color component and the third to-be-predicted color component.
  • the implementation of predicting the attribute residual value of the color component is:
  • the encoder performs secondary prediction on the second color component to be predicted based on the second cross-component attribute residual prediction value to obtain the attribute residual value of the second color component to be predicted; for the second color component to be predicted After the attribute residual value is dequantized, the second attribute residual reconstruction value of the second color component to be predicted is obtained; based on the second attribute residual reconstruction value, the third cross-component attribute residual prediction value is determined; based on The third cross-component attribute residual prediction value performs secondary prediction on the third to-be-predicted color component to obtain the attribute residual value of the third to-be-predicted color component.
  • the second cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual Multiplier or divisor of the difference reconstruction value.
  • the initial cross-component attribute residual prediction value may be 0, which is not limited in this embodiment of the present application.
  • the encoder uses the cross-component attribute residual prediction value to perform secondary attribute prediction, but the cross-component attribute residual prediction values corresponding to different color components of a point are related, but may not be the same .
  • the first color component to be predicted uses the initial cross-component attribute residual prediction value to perform secondary attribute prediction
  • the second color component to be predicted uses the second cross-component attribute residual prediction value to perform
  • the third color component to be predicted uses the third cross-component attribute residual prediction value for secondary attribute prediction.
  • the encoder After the encoder dequantizes the attribute residual value of the first color component to be predicted, and obtains the first attribute residual reconstruction value of the first color component to be predicted, the encoder Based on the first attribute residual reconstruction value, determine the second cross-component attribute residual prediction value and the third cross-component attribute residual prediction value; based on the second cross-component attribute residual prediction value, determine the second cross-component attribute residual prediction value The predicted color component is predicted twice to obtain the attribute residual value of the second color component to be predicted; based on the third cross-component attribute residual prediction value, the third color component to be predicted is predicted twice to obtain the third The attribute residual value of a color component to be predicted.
  • the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or is the second attribute The multiplier or divisor of the residual reconstruction value.
  • the first color component to be predicted is the G component
  • the second color component to be predicted is the R component
  • the third color component to be predicted is the B component. Then, when the decoder performs secondary attribute prediction on the G component, it uses the initial cross-component attribute residual prediction value to obtain the first attribute reconstruction value of the G component.
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the second cross-component attribute residual value difference prediction value
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the third cross-component attribute residual prediction value
  • the first attribute residual prediction value of the R component can also be used
  • the reconstruction value of the residual of the two attributes is updated, and the predicted value of the second cross-component attribute residual is updated to obtain the third predicted value of the cross-component attribute residual.
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value
  • the second cross-component attribute residual prediction value can be the first attribute residual reconstruction value + Obtain the second cross-component attribute residual prediction value for the initial cross-component attribute residual prediction value; or, use twice the first attribute residual reconstruction value as the second cross-component attribute residual prediction value.
  • the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value, and the third cross-component attribute residual prediction value can be obtained, which can be the first attribute residual reconstruction value + the initial
  • the cross-component attribute residual predictors yield the third cross-component attribute residual predictors; alternatively, half the reconstructed values of the first attribute residuals are used as the third cross-component attribute residual predictors.
  • the encoder when the encoder obtains the attribute residual value of each color component, it writes the attribute residual value of the color component into the code stream.
  • the attribute residual value of the color component includes: the attribute residual value of the first color component to be predicted, the attribute residual value of the second color component to be predicted, and the third color component to be predicted Attribute residual value for the component.
  • the attribute residual value of the first color component to be predicted, the attribute residual value of the second color component to be predicted, and the attribute residual value of the third color component to be predicted are quantized attribute residual values.
  • the mean value mean of the initial attribute residual reconstruction value of the three color components that is, the standard value (also can be the median value, maximum value, minimum value, etc.), which is not limited by the embodiment of the present application;
  • step d) Set the initial cross-component attribute residual prediction value residualPrevComponent to an initial value of 0, and according to the attribute residual secondary prediction mode determined in step c), if the attribute residual reconstruction value of the G component is used to perform attribute residual secondary Prediction, then first perform the following operations on the G component;
  • the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
  • the flag bit of the prediction mode can also be directly transmitted to the decoder, which improves the decoding efficiency of the decoder.
  • the embodiment of the present application is not limited;
  • step c) Set the initial cross-component attribute residual prediction value residualPrevComponent to an initial value of 0, and according to the attribute residual secondary prediction mode determined in step c), if the attribute residual reconstruction value of the G component is used to perform attribute residual secondary Prediction, then first perform the following operations on the G component;
  • the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
  • the embodiment of the present application provides a decoder 1, including:
  • the parsing part 10 is configured to parse the code stream, and determine the attribute residual value of the color component corresponding to the current point;
  • the first acquiring part 11 is configured to acquire the attribute prediction value of the color component corresponding to the current point
  • the first determining part 12 is configured to determine the prediction mode of the color component of the current point; wherein, the prediction mode is determined based on the degree of difference between the color components;
  • the decoding part 13 is configured to decode and reconstruct the color component of the current point based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the color component The property reconstruction value for .
  • the parsing part 10 is further configured to parse out the prediction mode flag when parsing the code stream;
  • the first determining part 12 is further configured to determine the prediction mode of the color component of the current point according to the prediction mode flag bit.
  • the first determining part 12 is further configured to determine the standard value of the color component corresponding to the current point based on the attribute prediction value; determine at least two color components corresponding to the current point A component, at least two degrees of difference from the standard value; based on the at least two degrees of difference, determine the prediction mode of the color component of the current point.
  • the first determination part 12 is further configured to determine the minimum difference degree among the at least two difference degrees; determine the color component corresponding to the minimum difference degree as the predicted model.
  • the first determining part 12 is further configured to determine a ranking result of the at least two degrees of difference; and determine the prediction mode according to the ranking result.
  • the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component;
  • the first determining part 12 is further configured as at least one of the following:
  • the prediction mode includes: a first color component to be predicted; the first color component to be predicted is the first color component among the first color component, the second color component and the third color component The color components of the codec.
  • the decoding part 13 is further configured to determine the first color component of the first color component to be predicted based on the attribute residual value of the first color component to be predicted according to the prediction mode.
  • attribute residual reconstruction value wherein, the first color component to be predicted is the color component characterized by the prediction mode; based on the attribute prediction value, the first attribute residual reconstruction value and the initial span
  • the component attribute residual prediction value decodes and reconstructs the color component of the current point to obtain the attribute reconstruction value of the color component.
  • the decoding part 13 is further configured to dequantize the attribute residual value of the first color component to be predicted according to the prediction mode, and determine the first The first attribute residual reconstruction value of the color component to be predicted.
  • the attribute reconstruction value includes: a first attribute reconstruction value, a second attribute reconstruction value and a third attribute reconstruction value;
  • the decoding part 13 is further configured to add the initial cross-component attribute residual prediction value to the attribute prediction value corresponding to the first color component to be predicted and the first attribute residual reconstruction value to obtain the said first attribute reconstruction value of the first color component to be predicted;
  • the second color component to be predicted and the third color component to be predicted are the first color component, the second color component and the third color component except the first color component to be predicted other color components.
  • the decoding part 13 is further configured to decode and reconstruct the second color component to be predicted based on the second cross-component attribute residual prediction value to obtain the second attribute reconstruction value;
  • the decoding part 13 is further configured to use the initial cross-component attribute residual prediction value, the attribute prediction value corresponding to the first color component to be predicted, and the first After adding the attribute residual reconstruction values to obtain the first attribute reconstruction value of the first to-be-predicted color component, determine the second cross-component attribute residual based on the first attribute residual reconstruction value The predicted value and the third cross-component attribute residual prediction value; based on the second cross-component attribute residual prediction value, the second color component to be predicted is decoded and reconstructed to obtain the second attribute reconstruction value; based on the The third cross-component attribute residual prediction value is described, and the third color component to be predicted is decoded and reconstructed to obtain the third attribute reconstruction value.
  • the second cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
  • the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or , the multiple or divisor of the reconstruction value for the second attribute residual.
  • the third cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
  • the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
  • the embodiment of this application also provides a decoder, including:
  • the first memory 14 stores a computer program that can run on the first processor 15, and the first processor 15 implements a decoding method corresponding to the decoder when executing the program.
  • the first processor 15 can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application specific integrated circuits (ASIC), single or multiple general integrated circuits, single or multiple a microprocessor, a single or multiple programmable logic devices, or a combination of the aforementioned circuits or devices, or other suitable circuits or devices, so that the first processor 15 can perform the decoding on the decoder side in the aforementioned embodiments corresponding steps of the method.
  • ASIC application specific integrated circuits
  • the embodiment of the present application provides an encoder 2, as shown in Figure 14, including:
  • the second acquiring part 20 is configured to acquire the attribute prediction value of the color component corresponding to the current point in the point cloud;
  • the second determining part 21 is configured to determine the standard value of the color component corresponding to the current point based on the attribute prediction value; determine the difference between the at least two color components corresponding to the current point and the standard value at least two degrees of difference; based on the at least two degrees of difference, determining a prediction mode of the color component;
  • the prediction part 22 is configured to perform secondary prediction on the color component of the current point based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value to obtain the attribute residual value of the color component.
  • the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component;
  • the second determining part 21 is further configured as at least one of the following:
  • the prediction part 22 is further configured to determine the initial attribute residual reconstruction value corresponding to the current point based on the attribute prediction value and the attribute information of the current point; based on the initial attribute residual The difference reconstruction value determines the standard value of the color component corresponding to the current point.
  • the prediction part 22 is further configured to determine an initial residual value corresponding to the current point based on the predicted attribute value and the attribute information of the current point; Quantization and inverse quantization to obtain the residual reconstruction value of the initial attribute.
  • the initial attribute residual reconstruction value includes: the first initial attribute residual reconstruction value of the first color component, the second initial attribute residual reconstruction value of the second color component, and the third color The residual reconstruction value of the third attribute of the component's initial attribute;
  • the second determining part 21 is further configured as at least one of the following:
  • the encoder 2 further includes: a writing part 23;
  • the prediction part 22 is further configured to generate a prediction mode flag; the prediction mode flag represents the prediction mode;
  • the writing part 23 is further configured to write the prediction mode flag bit into the code stream.
  • the second determining part 21 is further configured to determine the minimum difference degree among the at least two difference degrees; determine the color component corresponding to the minimum difference degree as the predicted model.
  • the second determining part 21 is further configured to determine a ranking result of the at least two degrees of difference; and determine the prediction mode according to the ranking result.
  • the prediction part 22 is further configured to predict the first property information of the first color component to be predicted and the property prediction of the first color component to be predicted according to the prediction mode Value and the initial cross-component attribute residual prediction value are sequentially subtracted and then quantized to realize secondary prediction, and obtain the attribute residual value of the first color component to be predicted;
  • the prediction mode includes: the first color component to be predicted ;
  • the first color component to be predicted is the first coded color component among the first color component, the second color component and the third color component;
  • the first attribute residual reconstruction value of the first color component to be predicted is obtained; based on the first attribute residual reconstruction value, determine the second cross-component attribute residual prediction value; based on the second cross-component attribute residual prediction value, perform secondary prediction on other color components, and obtain the second attribute residual value of the color component to be predicted and the attribute residual value of the third color component to be predicted; the second color component to be predicted and the third color component to be predicted are the first color component, the second color component and the third color component Other color components in excluding the first color component to be predicted.
  • the prediction part 22 is further configured to perform secondary prediction on the second color component to be predicted based on the second cross-component attribute residual prediction value to obtain the second The attribute residual value of the color component to be predicted;
  • the second attribute residual reconstruction value of the second color component to be predicted is obtained;
  • a second prediction is performed on the third to-be-predicted color component to obtain an attribute residual value of the third to-be-predicted color component.
  • the prediction part 22 is further configured to obtain the first color to be predicted after dequantizing the attribute residual value of the first color component to be predicted.
  • the first attribute residual reconstruction value of the component based on the first attribute residual reconstruction value, the second cross-component attribute residual prediction value and the third cross-component attribute residual prediction value are determined; based on the The second cross-component attribute residual prediction value performs secondary prediction on the second to-be-predicted color component to obtain the attribute residual value of the second to-be-predicted color component; based on the third cross-component attribute residual prediction value, perform secondary prediction on the third color component to be predicted, and obtain the attribute residual value of the third color component to be predicted.
  • the second cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
  • the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or , the multiple or divisor of the reconstruction value for the second attribute residual.
  • the third cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
  • the encoder 2 further includes: a writing part 23;
  • the writing part 23 is further configured to write the property residual value of the color component into the code stream.
  • the attribute residual value of the color component includes: the attribute residual value of the first color component to be predicted, the attribute residual value of the second color component to be predicted, and the Describe the attribute residual value of the third color component to be predicted.
  • the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
  • an encoder including:
  • the second memory 25 stores a computer program that can run on the second processor 24, and the second processor 24 executes the encoding method corresponding to the encoder when executing the program.
  • the embodiment of the present application provides a storage medium on which a computer program is stored.
  • the decoding method corresponding to the claim decoder is realized; or, the computer program is processed by the second processor.
  • the encoder is executed, the encoding method corresponding to the encoder of the claim is realized.
  • Each component in the embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or It is said that the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: magnetic random access memory (FRAM, ferromagnetic random access memory), read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable Programmable Read-Only Memory (EPROM, Erasable Programmable Read-Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Flash Memory (Flash Memory), Magnetic Surface Memory, Optical Disk , or compact disc read-only memory (CD-ROM, Compact Disc Read-Only Memory) and other media that can store program codes, the embodiments of the present disclosure are not limited.
  • FRAM magnetic random access memory
  • ROM read-only memory
  • PROM Read Only Memory
  • PROM programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • Flash Memory Flash Memory
  • Magnetic Surface Memory Optical
  • the embodiment of the present application provides a decoding method, an encoding method, a decoder, an encoder, and a storage medium.
  • determine the attribute residual value of the color component corresponding to the current point obtain the attribute of the color component corresponding to the current point Prediction value; determine the prediction mode of the color component of the current point; where the prediction mode is determined based on the degree of difference between the color components; based on the prediction mode, attribute residual value, attribute prediction value and initial cross-component attribute residual prediction Value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component. Since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the decoding and reconstruction of the color component of the current point is performed according to the prediction mode, the accuracy of the attribute reconstruction value of the obtained color component higher.

Abstract

An embodiment of the application provides a decoding method, an encoding method, a decoder, an encoder, and a storage medium. By means of parsing a stream of data, determine an attribute residual error value of a color component corresponding to a current point; acquire an attribute prediction value of a color component corresponding to a current point; determine a prediction model of a color component of a current point; wherein, the prediction model is determined on the basis of a degree of difference between color components; decoding and reconstructing the color component of the current point on the basis of the prediction model, the attribute residual error value, the attribute prediction value and the initial cross-component attribute residual error prediction value, obtaining an attribute reconstruction value of the color component.

Description

一种解码方法、编码方法、解码器、编码器及存储介质Decoding method, encoding method, decoder, encoder and storage medium 技术领域technical field
本申请实施例涉及视频编码技术,涉及但不限于一种解码方法、编码方法、解码器、编码器及存储介质。The embodiment of the present application relates to a video encoding technology, and relates to but not limited to a decoding method, an encoding method, a decoder, an encoder, and a storage medium.
背景技术Background technique
在基于音视频编码标准提供的点云压缩(Audio Video Standard-Point Cloud Compression,AVSAVS-PCC)编解码框架中,点云的几何信息和每个点云所对应的属性信息是分开进行编码的。几何编码完成后,对几何信息进行重建,而属性信息的编码将依赖于重建的几何信息。其中,属性信息编码主要针对颜色信息(即颜色分量)的编码,以将颜色信息从空间域变换到频域,将其转变成更符合人眼视觉特性的亮度色度(Luminance-Chrominance,YUV)色彩空间,然后对预处理后属性信息进行属性编码,得到量化的残差值,将量化的残差值输入到属性熵编码器中,形成二进制的属性码流。In the Audio Video Standard-Point Cloud Compression (AVSAVS-PCC) encoding and decoding framework provided by the audio and video encoding standard, the geometric information of the point cloud and the attribute information corresponding to each point cloud are encoded separately. After the geometric encoding is completed, the geometric information is reconstructed, and the encoding of the attribute information will depend on the reconstructed geometric information. Among them, attribute information coding is mainly aimed at the coding of color information (that is, color components), so as to transform color information from the spatial domain to the frequency domain, and convert it into Luminance-Chrominance (YUV) that is more in line with the visual characteristics of the human eye. color space, and then perform attribute encoding on the preprocessed attribute information to obtain a quantized residual value, and input the quantized residual value into the attribute entropy encoder to form a binary attribute code stream.
目前,点云压缩参考平台(Point Cloud Reference Model,PCRM)在属性编码过程中,对属性的残差值进行基于跨分量的属性残差二次预测,利用颜色三分量之间的相关性进一步消除冗余。其中,属性的残差值的二次预测算法,利用R分量预测G分量,利用R分量和G分量之和预测B分量。然而,由于颜色三分量之间的波长并不相同,此种预测方式并不准确。At present, during the attribute encoding process, the point cloud compression reference platform (Point Cloud Reference Model, PCRM) conducts secondary prediction of attribute residual values based on cross-component attribute residuals, and further eliminates the correlation between the three color components. redundancy. Among them, the secondary prediction algorithm of the residual value of the attribute uses the R component to predict the G component, and uses the sum of the R component and the G component to predict the B component. However, due to the different wavelengths among the three color components, this prediction method is not accurate.
发明内容Contents of the invention
本申请实施例提供了一种解码方法、编码方法、解码器、编码器及存储介质,能够提高属性编码时的编解码的准确性。Embodiments of the present application provide a decoding method, an encoding method, a decoder, an encoder, and a storage medium, which can improve the accuracy of encoding and decoding during attribute encoding.
第一方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:In the first aspect, the embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
解析码流,确定当前点对应的颜色分量的属性残差值;Analyze the code stream to determine the attribute residual value of the color component corresponding to the current point;
获取所述当前点对应的颜色分量的属性预测值;Acquiring the attribute prediction value of the color component corresponding to the current point;
确定当前点的颜色分量的预测模式;其中,所述预测模式是基于颜色分量之间的差异度来确定的;Determine the prediction mode of the color component of the current point; wherein, the prediction mode is determined based on the degree of difference between the color components;
基于所述预测模式、所述属性残差值、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。Based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component.
第二方面,本申请实施例还提供了一种编码方法,应用于编码器,所述方法包括:In the second aspect, the embodiment of the present application also provides an encoding method, which is applied to an encoder, and the method includes:
获取点云中的当前点对应的颜色分量的属性预测值;Get the attribute prediction value of the color component corresponding to the current point in the point cloud;
基于所述属性预测值,确定所述当前点对应的颜色分量的标准值;Based on the attribute prediction value, determine a standard value of the color component corresponding to the current point;
确定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;determining at least two degrees of difference between at least two color components corresponding to the current point and the standard value;
基于所述至少两个差异度,确定颜色分量的预测模式;determining a prediction mode for the color component based on the at least two degrees of difference;
基于所述预测模式、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。Based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, the color component of the current point is predicted twice to obtain the attribute residual value of the color component.
第三方面,本申请实施例提供了一种解码器,包括:In a third aspect, the embodiment of the present application provides a decoder, including:
解析部分,被配置为解析码流,确定当前点对应的颜色分量的属性残差值;The parsing part is configured to parse the code stream and determine the attribute residual value of the color component corresponding to the current point;
第一获取部分,被配置为获取所述当前点对应的颜色分量的属性预测值;The first acquisition part is configured to acquire the attribute prediction value of the color component corresponding to the current point;
第一确定部分,被配置为确定当前点的颜色分量的预测模式;其中,所述预测模式是基于颜色分量之间的差异度来确定的;The first determining part is configured to determine a prediction mode of the color component of the current point; wherein the prediction mode is determined based on the degree of difference between the color components;
解码部分,被配置为基于所述预测模式、所述属性残差值、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。The decoding part is configured to decode and reconstruct the color component of the current point based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the color component Property reconstruction value.
第四方面,本申请实施例提供了一种编码器,包括:In a fourth aspect, the embodiment of the present application provides an encoder, including:
第二获取部分,被配置为获取点云中的当前点对应的颜色分量的属性预测值;The second acquisition part is configured to acquire the attribute prediction value of the color component corresponding to the current point in the point cloud;
第二确定部分,被配置为基于所述属性预测值,确定所述当前点对应的颜色分量的标准值;确 定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;基于所述至少两个差异度,确定颜色分量的预测模式;The second determination part is configured to determine a standard value of the color component corresponding to the current point based on the attribute prediction value; determine at least two color components corresponding to the current point, and at least the standard value two degrees of difference; based on the at least two degrees of difference, determining a prediction mode of the color component;
预测部分,被配置为基于所述预测模式、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。The prediction part is configured to perform secondary prediction on the color component of the current point based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the attribute residual value of the color component.
第五方面,本申请实施例还提供了一种解码器,包括:In the fifth aspect, the embodiment of the present application also provides a decoder, including:
第一存储器和第一处理器;a first memory and a first processor;
所述第一存储器存储有可在第一处理器上运行的计算机程序,所述第一处理器执行所述程序时实现解码器的所述解码方法。The first memory stores a computer program that can run on the first processor, and the first processor implements the decoding method of the decoder when executing the program.
第六方面,本申请实施例还提供了一种编码器,包括:In a sixth aspect, the embodiment of the present application also provides an encoder, including:
第二存储器和第二处理器;a second memory and a second processor;
所述第二存储器存储有可在第二处理器上运行的计算机程序,所述第二处理器执行所述程序时编码器的所述编码方法。The second memory stores a computer program that can run on the second processor, and the second processor executes the program and the encoding method of the encoder.
本申请实施例提供了一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现权利要求解码器的所述解码方法;或者,该计算机程序被第二处理器执行时,实现权利要求编码器的所述编码方法。The embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by the first processor, the decoding method of the claim decoder is realized; or, the computer program is executed by the second processor When executed, the encoding method of the claim encoder is realized.
本申请实施例提供了一种解码方法、编码方法、解码器、编码器及存储介质,通过解析码流,确定当前点对应的颜色分量的属性残差值;获取当前点对应的颜色分量的属性预测值;确定当前点的颜色分量的预测模式;其中,预测模式是基于颜色分量之间的差异度来确定的;基于预测模式、属性残差值、属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的解码重建时,得到的颜色分量的属性重建值的准确度较高。The embodiment of the present application provides a decoding method, an encoding method, a decoder, an encoder, and a storage medium. By analyzing the code stream, determine the attribute residual value of the color component corresponding to the current point; obtain the attribute of the color component corresponding to the current point Prediction value; determine the prediction mode of the color component of the current point; where the prediction mode is determined based on the degree of difference between the color components; based on the prediction mode, attribute residual value, attribute prediction value and initial cross-component attribute residual prediction Value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component. Since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the decoding and reconstruction of the color component of the current point is performed according to the prediction mode, the accuracy of the attribute reconstruction value of the obtained color component higher.
附图说明Description of drawings
图1A为本申请实施例提供的示例性的三维点云图像;Figure 1A is an exemplary three-dimensional point cloud image provided by the embodiment of the present application;
图1B为本申请实施例提供的示例性的三维点云图像的局部放大图;FIG. 1B is a partially enlarged view of an exemplary three-dimensional point cloud image provided by an embodiment of the present application;
图2A-图2F为本申请实施例提供的示例性的不同角度的一幅点云图像;Figure 2A-Figure 2F is an exemplary point cloud image at different angles provided by the embodiment of the present application;
图2G为本申请实施例提供的示例性的对应图2A-图2F的数据存储格式图示;Fig. 2G is an exemplary illustration of the data storage format corresponding to Fig. 2A-Fig. 2F provided by the embodiment of the present application;
图3为本申请实施例提供的示例性的视频编解码的网络架构的组成结构示意图;FIG. 3 is a schematic diagram of the composition and structure of an exemplary video codec network architecture provided by an embodiment of the present application;
图4为本申请实施例提供的示例性的视频编码系统结构图;FIG. 4 is a structural diagram of an exemplary video coding system provided by an embodiment of the present application;
图5为本申请实施例提供的示例性的视频解码系统结构图;FIG. 5 is a structural diagram of an exemplary video decoding system provided by an embodiment of the present application;
图6A为本申请实施例提供的示例性的包围盒图示;Fig. 6A is an exemplary bounding box illustration provided by the embodiment of the present application;
图6B-图6G为本申请实施例提供的示例性的对包围盒进行迭代八叉树划分的示意图;6B-6G are exemplary schematic diagrams of iterative octree division of bounding boxes provided by the embodiment of the present application;
图7A为本申请实施例提供的示例性的莫顿码在二维空间中的编码顺序的示意图一;FIG. 7A is a schematic diagram 1 of an exemplary encoding sequence of Morton codes in two-dimensional space provided by the embodiment of the present application;
图7B为本申请实施例提供的示例性的莫顿码在二维空间中的编码顺序的示意图二;FIG. 7B is a second schematic diagram of the coding sequence of an exemplary Morton code in a two-dimensional space provided by the embodiment of the present application;
图7C为本申请实施例提供的示例性的莫顿码在二维空间中的编码顺序的示意图三;FIG. 7C is a schematic diagram 3 of an exemplary Morton code encoding sequence in two-dimensional space provided by the embodiment of the present application;
图8为本申请实施例提供的示例性的莫顿码在三维空间中的编码顺序的示意图;FIG. 8 is a schematic diagram of an exemplary Morton code encoding sequence in three-dimensional space provided by an embodiment of the present application;
图9为本申请实施例提供的示例性的不同颜色分量的波长示意图;FIG. 9 is a schematic diagram of wavelengths of exemplary different color components provided by the embodiment of the present application;
图10为本申请实施例还提供的一种解码方法的流程图;FIG. 10 is a flow chart of a decoding method further provided in the embodiment of the present application;
图11为本申请实施例还提供的一种编码方法的流程图;FIG. 11 is a flow chart of an encoding method further provided in the embodiment of the present application;
图12为本申请实施例提供的一种解码器的结构示意图一;FIG. 12 is a first schematic structural diagram of a decoder provided by an embodiment of the present application;
图13为本申请实施例提供的一种解码器的结构示意图二;FIG. 13 is a second schematic structural diagram of a decoder provided in an embodiment of the present application;
图14为本申请实施例提供的一种编码器的结构示意图一;FIG. 14 is a first schematic structural diagram of an encoder provided by an embodiment of the present application;
图15为本申请实施例提供的一种编码器的结构示意图二。FIG. 15 is a second structural schematic diagram of an encoder provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the related application, not to limit the application. It should also be noted that, for the convenience of description, only the parts related to the relevant application are shown in the drawings.
对本申请实施例进行进一步详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释:点云压缩(Point Cloud Compression,PCC),基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC),基于视频的点云压缩(Video Point Cloud Compression,V-PCC),细节层次(Level of Detail,LOD),区域自适应分层变换(Region Adaptive Hierarchal Transform,RAHT),片(slice),包围盒(bounding box),八叉树(octree),三角面片集(triangle soup,trisoup),块(block),交点(vertex),根节点(RootNode),动态图像专家组(Moving Picture Experts Group,MPEG),国际标准化组织(International Standardization Organization,ISO),国际电工委员会(International Electrotechnical Commission,IEC),音视频编码标准(AVS)。Before the embodiment of the present application is described in further detail, the terms and terms involved in the embodiments of the present application are described, and the terms and terms involved in the embodiments of the present application are applicable to the following explanations: point cloud compression (Point Cloud Compression, PCC), Geometry-based Point Cloud Compression (G-PCC), video-based point cloud compression (Video Point Cloud Compression, V-PCC), level of detail (Level of Detail, LOD), area adaptive analysis Region Adaptive Hierarchal Transform (RAHT), slice, bounding box, octree, triangle soup, trisoup, block, vertex , Root Node (RootNode), Moving Picture Experts Group (MPEG), International Standardization Organization (International Standardization Organization, ISO), International Electrotechnical Commission (International Electrotechnical Commission, IEC), audio and video coding standard (AVS).
点云(Point Cloud)是物体表面的三维表现形式,通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云(数据)。Point Cloud (Point Cloud) is a three-dimensional representation of the surface of an object. The point cloud (data) on the surface of an object can be collected through acquisition devices such as photoelectric radar, lidar, laser scanner, and multi-view camera.
点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集,图1A展示了三维点云图像和图1B展示了三维点云图像的局部放大图,可以看到点云表面是由分布稠密的点所组成的。A point cloud is a set of discrete point sets randomly distributed in space that express the spatial structure and surface properties of a 3D object or scene. Figure 1A shows a 3D point cloud image and Figure 1B shows a partial enlarged view of a 3D point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色信息以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。因此,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息(x,y,z)。点的位置信息也可称为点的几何信息。例如,点的属性信息可包括颜色信息(三维颜色信息)和/或反射率(一维反射率信息r)等等。例如,颜色信息可以是任意一种色彩空间上的信息。例如,颜色信息可以是RGB信息。其中,R表示红色(Red,R),G表示绿色(Green,G),B表示蓝色(Blue,B)。再如,颜色信息可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色色差。The two-dimensional image has information expression at each pixel, and the distribution is regular, so there is no need to additionally record its position information; however, the distribution of points in the point cloud in three-dimensional space is random and irregular, so it is necessary to record each The position of the point in space can completely express a point cloud. Similar to two-dimensional images, each position in the acquisition process has corresponding attribute information, usually RGB color value, and the color value reflects the color of the object; for point cloud, the attribute information corresponding to each point is in addition to color information. , and the more common one is the reflectance value, which reflects the surface material of the object. Therefore, the points in the point cloud can include point location information and point attribute information. For example, the position information of the point may be three-dimensional coordinate information (x, y, z) of the point. The location information of a point may also be referred to as geometric information of a point. For example, the point attribute information may include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r) and the like. For example, color information may be information on any color space. For example, color information may be RGB information. Wherein, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B). For another example, the color information may be luminance chrominance (YCbCr, YUV) information. Among them, Y represents brightness (Luma), Cb(U) represents blue color difference, and Cr(V) represents red color difference.
根据激光测量原理得到的点云,点云中的点可以包括点的三维坐标信息和点的反射率值。再如,根据摄影测量原理得到的点云,点云中的点可以可包括点的三维坐标信息和点的三维颜色信息。再如,结合激光测量和摄影测量原理得到点云,点云中的点可以可包括点的三维坐标信息、点的反射率值和点的三维颜色信息。According to the point cloud obtained by the principle of laser measurement, the points in the point cloud can include the three-dimensional coordinate information of the point and the reflectance value of the point. For another example, according to the point cloud obtained according to the principle of photogrammetry, the points in the point cloud may include the three-dimensional coordinate information of the point and the three-dimensional color information of the point. For another example, the point cloud is obtained by combining the principles of laser measurement and photogrammetry. The points in the point cloud can include the three-dimensional coordinate information of the point, the reflectance value of the point and the three-dimensional color information of the point.
如图2A-图2G所示为一幅点云图像及其对应的数据存储格式,其中,图2A-图2F分别提供了点云图像的六个观看角度;图2G由文件头信息部分和数据部分组成,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容。例如,点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维坐标信息(x,y,z)和三维颜色信息RGB(Red,Green,Blue)。Figure 2A-Figure 2G shows a point cloud image and its corresponding data storage format, wherein Figure 2A-Figure 2F provides six viewing angles of the point cloud image; Figure 2G consists of the file header information part and data The header information includes the data format, data representation type, total point cloud points, and the content represented by the point cloud. For example, the point cloud is in ".ply" format, represented by ASCII code, the total number of points is 207242, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information RGB (Red, Green, Blue).
点云可以按获取的途径分为:Point clouds can be divided into the following ways:
静态点云:即物体是静止的,获取点云的设备也是静止的;Static point cloud: that is, the object is stationary, and the device that acquires the point cloud is also stationary;
动态点云:物体是运动的,但获取点云的设备是静止的;Dynamic point cloud: the object is moving, but the device for obtaining the point cloud is still;
动态获取点云:获取点云的设备是运动的。Dynamically obtain point cloud: The device for obtaining point cloud is in motion.
例如,按点云的用途分为两大类:For example, according to the purpose of point cloud, it is divided into two categories:
类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;Category 1: Machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and emergency rescue robots;
类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。Category 2: Human eyes perceive point clouds, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。Point cloud can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and because point cloud is obtained by directly sampling real objects, it can provide a strong sense of reality under the premise of ensuring accuracy, so it is widely used. Including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, 3D immersive telepresence, 3D reconstruction of biological tissues and organs, etc.
点云的采集主要有以下途径:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间 和传输带宽限制的瓶颈。The collection of point clouds mainly has the following methods: 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 The point cloud of tens of millions of points can be obtained per second. These technologies reduce the cost and time period of point cloud data acquisition, and improve the accuracy of the data. The transformation of point cloud data acquisition methods has made it possible to acquire a large amount of point cloud data. With the growth of application requirements, the processing of massive 3D point cloud data encounters the bottleneck of storage space and transmission bandwidth limitations.
示例性的,以帧率为30帧每秒(fps)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,其中,1Byte为8bit,而YUV采样格式为4:2:0,帧率为24fps的1280×720二维视频,其10s的数据量约为1280×720×12bit×24fps×10s≈0.33GB,10s的两视角三维视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。Exemplarily, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, the number of points in each frame of point cloud is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar), Then the data volume of 10s point cloud video is about 0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB, in which, 1Byte is 8bit, and the YUV sampling format is 4:2:0, and the frame rate is For 1280×720 2D video at 24fps, the data volume of 10s is about 1280×720×12bit×24fps×10s≈0.33GB, and the data volume of 10s two-view 3D video is about 0.33×2=0.66GB. It can be seen that the data volume of point cloud video far exceeds the data volume of 2D video and 3D video of the same duration. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue to promote the development of the point cloud industry.
也就是说,由于点云是海量点的集合,存储点云不仅会消耗大量的内存,而且不利于传输,也没有这么大的带宽可以支持将点云不经过压缩直接在网络层进行传输,因此,需要对点云进行压缩。That is to say, because point cloud is a collection of massive points, storing point cloud will not only consume a lot of memory, but also is not conducive to transmission, and there is not such a large bandwidth to support the direct transmission of point cloud at the network layer without compression, so , need to compress the point cloud.
目前,可对点云进行压缩的点云编码框架可以是MPEG提供的G-PCC编解码框架或V-PCC编解码框架,也可以是AVS提供的AVS-PCC编解码框架。G-PCC编解码框架可用于针对第一类静态点云和第三类动态获取点云进行压缩,V-PCC编解码框架可用于针对第二类动态点云进行压缩。G-PCC编解码框架也称为点云编解码器TMC13,V-PCC编解码框架也称为点云编解码器TMC2。Currently, the point cloud coding framework that can compress the point cloud can be the G-PCC codec framework or the V-PCC codec framework provided by MPEG, or the AVS-PCC codec framework provided by AVS. The G-PCC codec framework can be used to compress the first type of static point cloud and the third type of dynamically acquired point cloud, and the V-PCC codec framework can be used to compress the second type of dynamic point cloud. The G-PCC codec framework is also called point cloud codec TMC13, and the V-PCC codec framework is also called point cloud codec TMC2.
本申请实施例提供了一种包含解码方法和编码方法的视频编解码系统的网络架构,图3为本申请实施例视频编解码的网络架构的组成结构示意图,如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有视频编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。The embodiment of the present application provides a network architecture of a video encoding and decoding system including a decoding method and an encoding method. FIG. It includes one or more electronic devices 13 to 1N and a communication network 01 , where the electronic devices 13 to 1N can perform video interaction through the communication network 01 . The electronic device may be various types of devices with video codec functions during implementation, for example, the electronic device may include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, TV sets, sensing devices, servers, etc., are not limited in this embodiment of the application. Wherein, the decoder or encoder in the embodiment of the present application may be the above-mentioned electronic device.
其中,本申请实施例中的电子设备具有视频编解码功能,一般包括视频编码器(即编码器)和视频解码器(即解码器)。Wherein, the electronic device in the embodiment of the present application has a video encoding and decoding function, and generally includes a video encoder (ie, an encoder) and a video decoder (ie, a decoder).
在本申请实施例中,在AVS-PCC编码器框架中进行编解码框架的说明。In the embodiment of the present application, the codec framework is described in the AVS-PCC codec framework.
点云压缩一般采用点云几何信息和属性信息分别压缩的方式,在编码端,首先在几何编码器中编码点云几何信息,然后将重建几何信息作为附加信息输入到属性编码器中,辅助点云属性的压缩;在解码端,首先在几何解码器中解码点云几何信息,然后将解码后的几何信息作为附加信息输入到属性解码器中,辅助点云属性的压缩。整个编解码器由预处理/后处理、几何编码/解码、属性编码/解码几部分组成。Point cloud compression generally uses point cloud geometric information and attribute information to compress separately. Compression of cloud attributes; at the decoding end, the geometric information of the point cloud is first decoded in the geometric decoder, and then the decoded geometric information is input into the attribute decoder as additional information to assist in the compression of the point cloud attributes. The entire codec consists of preprocessing/postprocessing, geometric encoding/decoding, and attribute encoding/decoding.
本申请提供一种视频编码系统,如图4所示为AVS点云的点云压缩参考平台PCRM的框架,该视频编码系统11包括几何编码器:坐标平移单元111、坐标量化单元112、八叉树构建单元113、几何熵编码器114、几何重建单元115。属性编码器:属性重上色单元116、颜色空间变换单元117、第一属性预测单元118、量化单元119和属性熵编码器1110。The present application provides a video encoding system, as shown in FIG. 4 , the framework of the point cloud compression reference platform PCRM of AVS point cloud. The video encoding system 11 includes a geometric encoder: a coordinate translation unit 111, a coordinate quantization unit 112, and an octave Tree construction unit 113 , geometric entropy encoder 114 , geometric reconstruction unit 115 . Attribute encoder: attribute recoloring unit 116 , color space transformation unit 117 , first attribute prediction unit 118 , quantization unit 119 and attribute entropy encoder 1110 .
对于PCRM,在编码端的几何编码部分,首先对原始几何信息进行预处理,通过坐标平移单元111将几何原点归一化到点云空间中的最小值位置,通过坐标量化单元112将几何信息从浮点数转化为整形,便于后续的规则化处理;然后对规则化的几何信息进行几何编码,通过八叉树构建单元113采用八叉树结构对点云空间进行递归划分,每次将当前节点划分成八个相同大小的子块,并判断每个子块的占有码字情况,当子块内不包含点时记为空,否则记为非空,在递归划分的最后一层记录所有块的占有码字信息,并进行几何编码;通过八叉树结构表达的几何信息一方面输入到几何熵编码器114中形成几何码流,一方面在编码器内的几何重建单元115进行几何重建处理,重建后的几何信息作为附加信息输入到属性编码器中。For PCRM, in the geometric coding part of the encoding end, the original geometric information is firstly preprocessed, the geometric origin is normalized to the minimum value position in the point cloud space by the coordinate translation unit 111, and the geometric information is converted from the floating point by the coordinate quantization unit 112 Points are converted into plastics, which is convenient for subsequent regularization processing; then the regularized geometric information is geometrically coded, and the point cloud space is recursively divided by the octree structure through the octree construction unit 113, and each time the current node is divided into Eight sub-blocks of the same size, and judge the occupancy code word of each sub-block. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty, and the occupancy code of all blocks is recorded in the last layer of recursive division. word information, and carry out geometric encoding; the geometric information expressed by the octree structure is input into the geometric entropy encoder 114 on the one hand to form a geometric code stream; on the other hand, the geometric reconstruction unit 115 in the encoder performs geometric reconstruction processing. The geometric information of is fed into the attribute encoder as additional information.
在属性编码部分,首先对原始的属性信息进行预处理,由于几何信息在几何编码之后有所异动,因此,通过属性重上色单元116为几何编码后的每一个点重新分配属性值,实现属性重上色。此外,如果处理的属性信息为颜色信息,还需要将原始的颜色信息通过颜色空间变换单元117进行颜色空间变换,将其转变成更符合人眼视觉特性的YUV色彩空间;然后通过第一属性预测单元118对预处理后属性信息进行属性编码或预测,属性预测首先需要将点云进行重排序,重排序的方式是莫顿码,因此,属性编码或属性预测的遍历顺序为莫顿顺序。PCRM中的属性预测方法为基于莫顿顺序的单点预测,即按照莫顿顺序从当前待编码点(当前点)向前回溯一个点,找到的邻居点为当前待编码点的预测参考点,然后将预测参考点的属性重建值作为属性预测值,属性残差值为当前待编码点的属性值与属性预测值之间的差值;最后通过量化单元119对残差进行量化,将量化残差输入到属性熵编码器1110中形成属性码流。In the attribute encoding part, the original attribute information is firstly preprocessed. Since the geometric information has changed after the geometric encoding, the attribute recoloring unit 116 is used to reassign the attribute value for each point after the geometric encoding to realize the attribute Recolor. In addition, if the attribute information to be processed is color information, the original color information needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye through the color space transformation unit 117; Unit 118 performs attribute encoding or prediction on the preprocessed attribute information. The attribute prediction first needs to reorder the point cloud, and the reordering method is Morton code. Therefore, the traversal order of attribute encoding or attribute prediction is Morton order. The attribute prediction method in PCRM is a single-point prediction based on Morton order, that is, according to the Morton order, one point is traced forward from the current point to be encoded (current point), and the neighbor point found is the prediction reference point of the current point to be encoded. Then the attribute reconstruction value of the predicted reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute value of the current point to be encoded and the attribute prediction value; finally, the residual is quantized by the quantization unit 119, and the quantized residual The difference is input to the attribute entropy encoder 1110 to form an attribute code stream.
本申请提供一种视频解码系统,如图5所示为AVS点云的点云压缩参考平台PCRM的框架,该视频解码系统12包括几何解编码器:几何熵解码器121、八叉树重建单元122、坐标反量化单元123、坐标反平移单元124。属性解码器:属性熵解码器125、反量化单元126、第二属性预测单元127和颜色空间反变换单元128。The present application provides a video decoding system, as shown in Figure 5, the framework of the point cloud compression reference platform PCRM of AVS point cloud, the video decoding system 12 includes a geometric decoder: a geometric entropy decoder 121, an octree reconstruction unit 122 . The coordinate inverse quantization unit 123 , and the coordinate inverse translation unit 124 . Attribute decoder: attribute entropy decoder 125 , inverse quantization unit 126 , second attribute prediction unit 127 and color space inverse transform unit 128 .
在解码端,同样采用几何和属性分别解码的方式。在几何解码部分,首先对通过几何熵解码器121对几何码流进行熵解码,得到每个节点的几何信息,然后按照和几何编码相同的方式通过八叉树重建单元122构建八叉树结构,结合解码几何重建出坐标变换后的、通过八叉树结构表达的几何信息,一方面将该信息通过坐标反量化单元123进行坐标反量化和通过坐标反平移单元124反平移,得到解码几何信息。另一方面作为附加信息输入到属性解码器中。在属性解码部分,按照与编码端相同的方式构建莫顿顺序,先通过属性熵解码器125对属性码流进行熵解码,得到量化后的残差信息;然后通过反量化单元126进行反量化,得到点云残差值;类似的,按照与属性编码相同的方式,通过第二属性预测单元127获得当前待解码点的属性预测值,然后将属性预测值与属性残差值相加,可以恢复出当前待解码点的YUV属性值;最后,经过颜色空间反变换单元128的颜色空间反变换得到解码的属性信息。At the decoding end, the geometry and attributes are also decoded separately. In the geometric decoding part, first, the geometric code stream is entropy decoded by the geometric entropy decoder 121 to obtain the geometric information of each node, and then the octree structure is constructed by the octree reconstruction unit 122 in the same manner as the geometric encoding, Combining the decoded geometry to reconstruct the geometric information expressed through the octree structure after the coordinate transformation, on the one hand, the information is subjected to coordinate inverse quantization by the coordinate inverse quantization unit 123 and detranslated by the coordinate inverse translation unit 124 to obtain the decoded geometric information. On the other hand, it is input into the attribute decoder as additional information. In the attribute decoding part, the Morton sequence is constructed in the same way as the encoding end, and the attribute code stream is first entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information; then the inverse quantization is performed by the inverse quantization unit 126, Obtain the point cloud residual value; similarly, in the same manner as the attribute encoding, obtain the attribute prediction value of the point to be decoded by the second attribute prediction unit 127, and then add the attribute prediction value and the attribute residual value to restore The YUV attribute value of the current point to be decoded is obtained; finally, the decoded attribute information is obtained through the color space inverse transformation of the color space inverse transformation unit 128.
下面介绍点云的八叉树的规则化处理。The regularization processing of the octree of the point cloud is introduced below.
由于点云在空间中无规则分布的特性,给编码过程带来挑战,因此采用递归八叉树的结构,将点云中的点规则化地表达成立方体的中心,如图6A所示,首先将整幅点云放置在一个正方体包围盒内,点云中点的坐标表示为(x k,y k,z k),k=0,…,K-1,其中K是点云的总点数,点云在x、y、z方向上的边界值分别为公式(1)-公式(6): Due to the irregular distribution of the point cloud in space, it brings challenges to the encoding process. Therefore, the recursive octree structure is used to express the point in the point cloud as the center of the cube in a regular way, as shown in Figure 6A. First, the The entire point cloud is placed in a cube bounding box, and the coordinates of the points in the point cloud are expressed as (x k , y k , z k ), k=0,...,K-1, where K is the total number of points in the point cloud, The boundary values of the point cloud in the x, y, and z directions are formula (1) - formula (6):
x min=min(x 0,x 1,…,x K-1)               (1) x min =min(x 0 ,x 1 ,…,x K-1 ) (1)
y min=min(y 0,y 1,…,y K-1)               (2) y min =min(y 0 ,y 1 ,…,y K-1 ) (2)
z min=min(z 0,z 1,…,z K-1)                (3) z min =min(z 0 ,z 1 ,…,z K-1 ) (3)
x man=max(x 0,x 1,…,x K-1)               (4) x man =max(x 0 ,x 1 ,…,x K-1 ) (4)
y max=max(y 0,y 1,…,y K-1)               (5) y max =max(y 0 ,y 1 ,...,y K-1 ) (5)
z max=max(z 0,z 1,…,z K-1)                (6) z max =max(z 0 ,z 1 ,…,z K-1 ) (6)
其中,包围盒的原点(x origin,y origin,z origin)可以计算如公式(7)-公式(9): Among them, the origin (x origin , y origin , z origin ) of the bounding box can be calculated as formula (7) - formula (9):
x origin=int(floor(x min))                  (7) x origin = int(floor(x min )) (7)
y origin=int(floor(y min))                  (8) y origin = int(floor(y min )) (8)
z origin=int(floor(z min))                  (9) z origin = int(floor(z min )) (9)
其中,包围盒在x、y、z方向上的尺寸Bouding BoxSize x、Bouding BoxSize y和Bouding BoxSize z可以计算如公式(10)-公式(12): Among them, the dimensions Bouding BoxSize x , Bouding BoxSize y and Bouding BoxSize z of the bounding box in the x, y, and z directions can be calculated as formula (10) - formula (12):
Bouding BoxSize x=int(x max-z xrigin+1    (10) Bouding BoxSize x = int(x max -z xrigin +1 (10)
Bouding BoxSize y=int(y max-y origin+1     (11) Bouding BoxSize y = int(y max -y origin +1 (11)
Bouding BoxSize z=int(z max-z origin+1      (12) Bouding BoxSize z = int(z max -z origin +1 (12)
在本申请实施例中,如图6B-6G所示,首先对包围盒进行八叉树划分,每次得到八个子块,然后对子块中的非空块(包含点的块)进行再一次的八叉树划分,如此递归划分直到某个深度,将最终大小的非空子块称作voxel,每个voxel中包含一个或多个点,将这些点的几何位置归一化为voxel的中心点,该中心点的属性值取voxel中所有点的属性值的平均值,最终得到图6G所示的图像。In the embodiment of the present application, as shown in Figures 6B-6G, the bounding box is first divided into octrees, and each time eight sub-blocks are obtained, and then the non-empty blocks (blocks containing points) in the sub-blocks are divided again The octree division of , so recursively divided until a certain depth, the non-empty sub-block of the final size is called voxel, each voxel contains one or more points, and the geometric positions of these points are normalized to the center point of the voxel , the attribute value of the center point is the average value of the attribute values of all points in the voxel, and finally the image shown in Figure 6G is obtained.
需要说明的是,将点云规则化为空间中的块,有利于点云中点与点的关系描述,进而能够表达特定的编码顺序,按照一定的顺序编码每一个voxel,即编码voxel所代表的点(或称“节点”),一种常用的编码顺序为交叉分离式的莫顿顺序。示例性的,采用图7A-图7C莫顿码在二维空间中的编码顺序,以8*8大小的块为例,其中箭头的顺序表示莫顿顺序下点的编码顺序。如图7A所示为块中2*2个像素的“z”字形莫顿编码顺序。图7B为4个2*2块之间的“z”字形莫顿编码顺序,图7C为4个4*4块之间的“z”字形莫顿编码顺序,组成为整个8*8块的莫顿编码顺序。扩展到三维空间中的莫顿编码顺序如图8所示,图中展示了16个节点,每个“z”字内部,每个“z”与“z”之间的莫顿编码顺序都是先沿x轴方向编码,再沿y轴,最后沿z轴。It should be noted that regularizing the point cloud into blocks in space is beneficial to the description of the relationship between points in the point cloud, and then can express a specific encoding sequence, and encode each voxel in a certain order, that is, the encoded voxel represents The points (or "nodes") of , a commonly used coding order is the cross-separated Morton order. Exemplarily, the encoding sequence of the Morton code in the two-dimensional space in Fig. 7A-Fig. 7C is used, taking a block of size 8*8 as an example, where the order of the arrows represents the encoding order of the points under the Morton order. As shown in FIG. 7A, the "z"-shaped Morton coding order of 2*2 pixels in the block is shown. Figure 7B shows the "z"-shaped Morton coding sequence between four 2*2 blocks, and Figure 7C shows the "z"-shaped Morton coding sequence between four 4*4 blocks, which form the entire 8*8 block Morton coding sequence. The Morton coding sequence extended to the three-dimensional space is shown in Figure 8, which shows 16 nodes, and the Morton coding sequence between each "z" and "z" inside each "z" is First encode along the x-axis, then along the y-axis, and finally along the z-axis.
在本申请实施例中,目前PCRM所采用的属性残差二次预测算法,利用R分量预测G分量,利 用R分量和G分量之和预测B分量,可以有效消除三分量之间的相关性,从而提升编码效率。然而在自然界中,红光的波长分布范围为620–750nm,绿光的波长分布范围为495–570nm,蓝光的波长分布范围为450–475nm,如图9所示,根据各颜色分量之间的重合程度来看,显然使用R分量来预测其它两个分量并不是十分合理,预测并不准确且固定。In the embodiment of this application, the attribute residual quadratic prediction algorithm currently used by PCRM uses the R component to predict the G component, and uses the sum of the R component and the G component to predict the B component, which can effectively eliminate the correlation between the three components. Thereby improving the coding efficiency. However, in nature, the wavelength distribution range of red light is 620-750nm, the wavelength distribution range of green light is 495-570nm, and the wavelength distribution range of blue light is 450-475nm, as shown in Figure 9, according to the From the point of view of the coincidence degree, it is obvious that it is not very reasonable to use the R component to predict the other two components, and the prediction is not accurate and fixed.
基于此,在进行编码方法时对当前点实行对属性残差进行二次预测,主要作用于视频编码系统11的量化单元119和属性熵编码器1110;在进行解码方法时对当前点实行对属性残差进行二次预测,主要作用于视频解码系统12的第二属性预测单元127和颜色空间反变换单元128之间。Based on this, when performing the encoding method, perform secondary prediction on the attribute residual for the current point, which mainly acts on the quantization unit 119 and the attribute entropy encoder 1110 of the video encoding system 11; The residual performs secondary prediction, which is mainly used between the second attribute prediction unit 127 and the color space inverse transformation unit 128 of the video decoding system 12 .
本申请实施例提供一种解码方法,该方法应用于视频解码设备,即解码器。该方法所实现的功能可以通过视频解码设备中的第一处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该视频解码设备至少包括第一处理器和第一存储介质。其中,当前解码点和当前编码点下述均用当前点来表示。An embodiment of the present application provides a decoding method, which is applied to a video decoding device, that is, a decoder. The function realized by this method can be realized by calling the program code by the first processor in the video decoding device. Of course, the program code can be stored in the computer storage medium. It can be seen that the video decoding device includes at least the first processor and the first memory medium. Wherein, the current decoding point and the current encoding point are both represented by the current point below.
图10为本申请实施例一种解码方法的实现流程示意图,该方法包括:FIG. 10 is a schematic diagram of an implementation flow of a decoding method according to an embodiment of the present application. The method includes:
S101、解析码流,确定当前点对应的颜色分量的属性残差值。S101. Analyze the code stream, and determine the attribute residual value of the color component corresponding to the current point.
S102、获取当前点对应的颜色分量的属性预测值。S102. Obtain an attribute prediction value of the color component corresponding to the current point.
在本申请实施例中,解码器在获取到了码流后,可以从码流的解析出当前点对应的颜色分量的属性残差值。其中,码流中解析出的属性残差值为量化过的残差值。In the embodiment of the present application, after obtaining the code stream, the decoder can analyze the attribute residual value of the color component corresponding to the current point from the code stream. Wherein, the attribute residual value analyzed in the code stream is a quantized residual value.
需要说明的是,本申请实施例提供的一种解码方法针对颜色分量进行属性解码的过程中,当前点的颜色分量可以包括:第一颜色分量、第二颜色分量和第三颜色分量。第一颜色分量、第二颜色分量和第三颜色分量可以分别为RGB三分量。It should be noted that, in a decoding method provided by an embodiment of the present application, in the process of performing attribute decoding on color components, the color component at the current point may include: a first color component, a second color component, and a third color component. The first color component, the second color component and the third color component may be three RGB components respectively.
在本申请实施例中,点云中的点都具有RGB三分量的属性信息。解码器是可以解析出当前点的各个颜色分量各自对应的属性残差值的。In the embodiment of the present application, the points in the point cloud all have attribute information of RGB three components. The decoder can parse out the attribute residual values corresponding to each color component of the current point.
在本申请实施例中,解码器需要对当前点的各个颜色分量各自进行解码处理。In the embodiment of the present application, the decoder needs to perform decoding processing on each color component of the current point.
在本申请实施例中,由于编码时可以基于莫顿顺序的单点预测,即按照莫顿顺序从当前点向前回溯一个点,找到的点为当前点的预测参考点,然后将预测参考点的属性重建值作为属性预测值。在对当前点解码时,解码器在进行了当前点的属性预测之后,是可以获取当前点的预测参考点的属性重建值,即得到了当前点对应的颜色分量的属性预测值。In the embodiment of this application, since the encoding can be based on the single-point prediction of the Morton order, that is, one point is traced forward from the current point according to the Morton order, the found point is the prediction reference point of the current point, and then the prediction reference point The attribute reconstruction value of is used as the attribute prediction value. When decoding the current point, after the decoder predicts the attribute of the current point, it can obtain the attribute reconstruction value of the prediction reference point of the current point, that is, obtain the attribute prediction value of the color component corresponding to the current point.
S103、确定当前点的颜色分量的预测模式,其中,预测模式是基于颜色分量之间的差异度来确定的。S103. Determine a prediction mode of the color component of the current point, wherein the prediction mode is determined based on the degree of difference between the color components.
S104、基于预测模式、属性残差值、属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。S104. Based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component.
解码器在解码的过程中,解码出属性残差值后,可以进行二次属性预测来消除冗余。于是,在二次属性预测的过程中,解码器可以确定出二次属性预测时的当前点的颜色分量的预测模式,然后依据预测模式进行二次属性预测,并结合属性残差值、属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。During the decoding process, the decoder can perform secondary attribute prediction to eliminate redundancy after decoding the attribute residual value. Therefore, in the process of secondary attribute prediction, the decoder can determine the prediction mode of the color component of the current point during the secondary attribute prediction, and then perform secondary attribute prediction according to the prediction mode, and combine the attribute residual value and attribute prediction value and the initial cross-component attribute residual prediction value, decode and reconstruct the color component of the current point, and obtain the attribute reconstruction value of the color component.
在本申请的一些实施例中,预测模式表征颜色分量的编解码顺序或者表征颜色分量的预测形式(例如最先进行编解码的颜色分量是哪个)。其中,预测模式是基于颜色分量之间的差异度来确定的。In some embodiments of the present application, the prediction mode represents the encoding and decoding sequence of the color components or represents the prediction form of the color components (for example, which color component is encoded and decoded first). Wherein, the prediction mode is determined based on the degree of difference between the color components.
在本申请的一些实施例中,预测模式包括:第一个待预测颜色分量;第一个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中最先编解码的颜色分量。In some embodiments of the present application, the prediction mode includes: the first color component to be predicted; the first color component to be predicted is the first coded color among the first color component, the second color component and the third color component portion.
可以理解的是,解码器可以通过确定先编码第一个待预测颜色分量,来自适应的决定如何进行颜色分量的解码重建,考虑到了颜色分量的自适应性的预测形式,可以提高二次属性预测的准确度。It is understandable that the decoder can adaptively decide how to decode and reconstruct the color component by first encoding the first color component to be predicted. Considering the adaptive prediction form of the color component, the secondary attribute prediction can be improved. the accuracy.
在本申请的一些实施例中,可采用S1031和S1032确定预测模式,也可以采用S1033-1035来实现,本申请实施例不作限制。In some embodiments of the present application, S1031 and S1032 may be used to determine the prediction mode, and S1033-1035 may also be used to implement, which is not limited in this embodiment of the present application.
S1031、在解析码流时,解析出预测模式标志位。S1031. When parsing the code stream, parse out the prediction mode flag bit.
S1032、根据预测模式标志位,确定当前点的颜色分量的预测模式。S1032. Determine the prediction mode of the color component of the current point according to the prediction mode flag bit.
解码在解码码流时,由于编码时已经确认了预测模式是什么,因此码流中传输有预测模式标志位,这样,在解码当前点时,解码器是可以从码流中同时解析出当前点在进行二次属性预测的时候的颜色分量的预测模式标志位的,其中,预测模式标志位就表征是哪个颜色分量最先被编解码的。因此,解码器是可以根据预测模式标志位,确定出当前点的颜色分量的预测模式的。When decoding the code stream, since the prediction mode has been confirmed during encoding, the prediction mode flag is transmitted in the code stream, so that when decoding the current point, the decoder can simultaneously parse out the current point from the code stream The prediction mode flag of the color component when performing secondary attribute prediction, wherein the prediction mode flag indicates which color component is coded first. Therefore, the decoder can determine the prediction mode of the color component at the current point according to the prediction mode flag bit.
需要说明的是,预测模式标志位可以表征哪个颜色分量最先被编码。示例性的,预测模式标志位可以采用数字形式体现,例如,可以采用0表示第一颜色分量、1表征第二颜色分量以及2表示第三颜色分量等,本申请实施例不作限制。预测模式标志位是在编码时,基于颜色分量之间的差异 度来确定的。It should be noted that the prediction mode flag can indicate which color component is coded first. Exemplarily, the prediction mode flag can be represented in digital form. For example, 0 can be used to represent the first color component, 1 can be used to represent the second color component, and 2 can be used to represent the third color component. This embodiment of the present application does not limit it. The prediction mode flag is determined based on the degree of difference between color components during encoding.
可以理解的是,解码器可以通过预测模式标志位的指示,确定预测模式,不用进行预测模式的计算,可以节省解码时间,提高解码效率。It can be understood that the decoder can determine the prediction mode through the indication of the prediction mode flag, without performing calculation of the prediction mode, which can save decoding time and improve decoding efficiency.
S1033、基于属性预测值,确定当前点对应的颜色分量的标准值。S1033. Based on the attribute prediction value, determine a standard value of the color component corresponding to the current point.
S1034、确定当前点对应的至少两个颜色分量,与标准值之间的至少两个差异度。S1034. Determine at least two degrees of difference between at least two color components corresponding to the current point and a standard value.
S1035、基于至少两个差异度,确定当前点的颜色分量的预测模式。S1035. Based on at least two difference degrees, determine a prediction mode of the color component of the current point.
解码器还可以通过不需要预测模式标志位的方式来确定出预测模式。解码器可以根据当前点对应的属性预测值,确定出针对颜色分量的一个标准值,然后再将当前点的各个颜色分量的属性预测值与该标准值进行比较,确定出至少两个颜色分量的差异度,再基于至少两个差异度来进行预测模式的确定。The decoder can also determine the prediction mode in a way that does not require the prediction mode flag bit. The decoder can determine a standard value for the color component according to the attribute prediction value corresponding to the current point, and then compare the attribute prediction value of each color component of the current point with the standard value to determine at least two color components. degree of difference, and then determine the prediction mode based on at least two degrees of difference.
在本申请实施例中,属性预测值包括:第一颜色分量的第一属性预测值、第二颜色分量的第二属性预测值和第三颜色分量的第三属性预测值。In the embodiment of the present application, the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component.
那么,解码器基于属性预测值,确定当前点对应的颜色分量的标准值,包括以下至少一种:Then, the decoder determines the standard value of the color component corresponding to the current point based on the attribute prediction value, including at least one of the following:
对第一属性预测值、第二属性预测值和第三属性预测值进行平均,确定标准值;averaging the first attribute predicted value, the second attribute predicted value and the third attribute predicted value to determine a standard value;
确定第一属性预测值、第二属性预测值和第三属性预测值中的最大值为标准值;Determining the maximum value among the first attribute predicted value, the second attribute predicted value and the third attribute predicted value as the standard value;
确定第一属性预测值、第二属性预测值和第三属性预测值中的最小值为标准值;Determining that the minimum value among the first attribute predicted value, the second attribute predicted value and the third attribute predicted value is a standard value;
确定第一属性预测值、第二属性预测值和第三属性预测值的中值为标准值。The median value of the first attribute predicted value, the second attribute predicted value and the third attribute predicted value is determined as a standard value.
需要说明的是,标准值还可以根据第一属性预测值、第二属性预测值和第三属性预测值的其他数学处理手段得到,本申请实施例不作限制。It should be noted that the standard value can also be obtained according to other mathematical processing means of the predicted value of the first attribute, the predicted value of the second attribute and the predicted value of the third attribute, which is not limited in this embodiment of the present application.
在本申请实施例中,解码器在确定出标准值之后,可以将当前点的每个颜色分量的属性预测值分别与标准值进行比较,得到三个颜色差异度,也可以将当前点中的任意两个颜色分量的属性预测值分别与标准值进行比较,得到任意两个颜色分量对应的两个差异度。In the embodiment of this application, after the decoder determines the standard value, it can compare the attribute prediction value of each color component of the current point with the standard value to obtain three color difference degrees, or it can compare the attribute prediction value of each color component in the current point The attribute prediction values of any two color components are compared with the standard values respectively, and two difference degrees corresponding to any two color components are obtained.
在本申请的一些实施例中,解码器可以确定至少两个差异度中的最小差异度;将最小差异度对应的颜色分量确定为预测模式。或者,解码器基于至少两个差异度,确定至少两个差异度的排序结果;按照排序结果,确定预测模式。In some embodiments of the present application, the decoder may determine the minimum degree of difference among at least two degrees of difference; and determine the color component corresponding to the minimum degree of difference as the prediction mode. Alternatively, the decoder determines a sorting result of at least two different degrees based on the at least two different degrees; and determines a prediction mode according to the sorting result.
需要说明的是,预测模式指示对当前点的二次属性预测时最先预测的第一个待预测颜色分量先进行解码,然后再对其他颜色分量进行二次属性预测。It should be noted that the prediction mode indicates that the first predicted color component to be predicted is firstly decoded in the second attribute prediction of the current point, and then the second attribute prediction is performed on other color components.
需要说明的是,解码器基于至少两个差异度,确定至少两个差异度的排序结果;可以按照排序结果,确定出差异最小的颜色分量对应的预测模式。而且在进行当前点的颜色分量的二次属性预测时,可以按照排序结果,由差异度的由小到大的顺序确定颜色分量的解码顺序。It should be noted that, based on the at least two difference degrees, the decoder determines the sorting results of the at least two difference degrees; according to the sorting results, the prediction mode corresponding to the color component with the smallest difference can be determined. Moreover, when the secondary attribute prediction of the color components of the current point is performed, the decoding order of the color components can be determined from the order of the difference degrees from small to large according to the sorting results.
示例性的,解码器分别计算R分量和G分量与标准值的差值(即差异度diff R和diff G),并比较两个差值,如果diff R<diff G,则确定R分量为预测模式进行属性残差二次预测,否则使用G分量为预测模式进行属性残差二次预测。 Exemplarily, the decoder calculates the difference between the R component and the G component and the standard value (that is, the difference diff R and diff G ), and compares the two differences, and if diff R <diff G , then determine that the R component is the prediction mode for secondary prediction of attribute residuals, otherwise use the G component as the prediction mode for secondary prediction of attribute residuals.
示例性的,解码器计算R分量、G分量、B分量分别与标准值值的差值(diff R、diff G和diff B),并进行比较,如果diff R、diff G和diff B中diff R最小,则确定R分量为预测模式进行属性残差二次预测;如果diff G最小,则使用G分量为预测模式进行属性残差二次预测;如果diff B最小,则使用B分量为预测模式进行属性残差二次预测。 Exemplarily, the decoder calculates the differences (diff R , diff G, and diff B ) between the R component, the G component, and the B component and the standard value, and compares them. If diff R in diff R , diff G , and diff B If it is the smallest, determine the R component as the prediction mode for secondary prediction of the attribute residual; if the diff G is the smallest, use the G component as the prediction mode for the secondary prediction of the attribute residual; if the diff B is the smallest, use the B component as the prediction mode Quadratic prediction of attribute residuals.
需要说明的是,解码器在确定了当前点的预测模式后,先对第一个待预测颜色分量进行解码,然后再基于第一个待预测颜色分量对其他颜色分量(第二个待预测颜色分量和第三个待预测颜色分量)进行解码重建(即二次属性预测),或者再基于第一个待预测颜色分量对第二个待预测颜色分量进行解码重建,采用第二个待预测颜色分量对第三个待预测颜色分量进行解码重建。其中,第二个待预测颜色分量和第三个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中的除第一个待预测颜色分量外的其他颜色分量。It should be noted that after the decoder determines the prediction mode of the current point, it first decodes the first color component to be predicted, and then decodes the other color components (the second color component to be predicted) based on the first color component to be predicted. component and the third color component to be predicted) for decoding and reconstruction (that is, secondary attribute prediction), or based on the first color component to be predicted, the second color component to be predicted is decoded and reconstructed, and the second color component to be predicted is used The component decodes and reconstructs the third color component to be predicted. Wherein, the second to-be-predicted color component and the third to-be-predicted color component are color components other than the first to-be-predicted color component among the first, second, and third color components.
在本申请的一些实施例中,S104的实现可以包括:In some embodiments of the present application, the implementation of S104 may include:
S1041、按照预测模式,基于第一个待预测颜色分量的属性残差值,确定第一个待预测颜色分量的第一个属性残差重建值;其中,第一个待预测颜色分量为预测模式表征的颜色分量。S1041. According to the prediction mode, based on the attribute residual value of the first color component to be predicted, determine the reconstruction value of the first attribute residual of the first color component to be predicted; wherein, the first color component to be predicted is the prediction mode The color component of the representation.
S1042、基于属性预测值、第一个属性残差重建值和初始跨分量属性残差预测值对当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。S1042. Based on the attribute prediction value, the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component.
在本申请实施例中,解码器可以按照预测模式,对第一个待预测颜色分量的属性残差值进行反量化,确定第一个待预测颜色分量的第一个属性残差重建值。由于每个点可以具有三个颜色分量,因此,在对当前点进行二次属性预测时,需要对每个颜色分量都进行处理,进而完成当前点的解码 重建。In this embodiment of the present application, the decoder may dequantize the attribute residual value of the first to-be-predicted color component according to the prediction mode, and determine the first reconstructed attribute value of the first to-be-predicted color component. Since each point can have three color components, when performing secondary attribute prediction on the current point, each color component needs to be processed to complete the decoding and reconstruction of the current point.
在本申请的一些实施例中,属性重建值包括:第一个待预测颜色分量对应的第一个属性重建值、第二个待预测颜色分量对应的第二个属性重建值和第三个待预测颜色分量对应的第三个属性重建值。In some embodiments of the present application, the attribute reconstruction value includes: the first attribute reconstruction value corresponding to the first to-be-predicted color component, the second attribute reconstruction value corresponding to the second to-be-predicted color component, and the third to-be-predicted color component The third attribute reconstruction value corresponding to the predicted color component.
在本申请的一些实施例中,由于第一个待预测颜色分量为预测模式对应的颜色分量,因此,解码器先对第一个待预测颜色分量进行解码重建,再基于第一个待预测颜色分量继续对其他颜色分量继续进行解码。这里,解码器可以将初始跨分量属性残差预测值,与第一个待预测颜色分量对应的属性预测值和第一个属性残差重建值相加,得到第一个待预测颜色分量的第一个属性重建值。In some embodiments of the present application, since the first color component to be predicted is the color component corresponding to the prediction mode, the decoder first decodes and reconstructs the first color component to be predicted, and then based on the first color component to be predicted component continues to decode other color components. Here, the decoder can add the initial cross-component attribute residual prediction value, the attribute prediction value corresponding to the first to-be-predicted color component, and the first attribute residual reconstruction value to obtain the first to-be-predicted color component A property reconstruction value.
基于第一个属性残差重建值,确定第二个跨分量属性残差预测值;基于第二个跨分量属性残差预测值,对第二个待预测颜色分量和第三个待预测颜色分量进行解码重建,得到第二个属性重建值和第三个属性重建值。或者,基于第一个属性残差重建值,确定第二个跨分量属性残差预测值和第三个跨分量属性残差预测值;基于第二个跨分量属性残差预测值,对第二个待预测颜色分量进行解码重建,得到第二个属性重建值;基于第三个跨分量属性残差预测值,对第三个待预测颜色分量进行解码重建,得到第三个属性重建值。Determine the second cross-component attribute residual prediction value based on the first attribute residual reconstruction value; based on the second cross-component attribute residual prediction value, the second to-be-predicted color component and the third to-be-predicted color component Perform decoding and reconstruction to obtain the second attribute reconstruction value and the third attribute reconstruction value. Or, based on the reconstruction value of the first attribute residual, the second cross-component attribute residual prediction value and the third cross-component attribute residual prediction value are determined; based on the second cross-component attribute residual prediction value, the second Decode and reconstruct the color components to be predicted to obtain the second attribute reconstruction value; based on the third cross-component attribute residual prediction value, decode and reconstruct the third color component to be predicted to obtain the third attribute reconstruction value.
在本申请的一些实施例中,第二个跨分量属性残差预测值,为第一个属性残差重建值和初始跨分量属性残差预测值发之和,或者,为第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the second cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual Multiplier or divisor of the difference reconstruction value.
在本申请的一些实施例中,第三个跨分量属性残差预测值,为第一个属性残差重建值和初始跨分量属性残差预测值发之和,或者,为第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual Multiplier or divisor of the difference reconstruction value.
需要说明的是,针对点云中的各个点,初始跨分量属性残差预测值可以为0,本申请实施例不作限制。在本申请实施例中,解码器是采用跨分量属性残差预测值来进行二次属性预测的,但是一个点的不同颜色分量对应的跨分量属性残差预测值具有关联性,但可以不相同。It should be noted that, for each point in the point cloud, the initial cross-component attribute residual prediction value may be 0, which is not limited in this embodiment of the present application. In the embodiment of this application, the decoder uses the cross-component attribute residual prediction value to perform secondary attribute prediction, but the cross-component attribute residual prediction values corresponding to different color components of a point are related, but may not be the same .
在本申请实施例中,第一个待预测颜色分量采用初始跨分量属性残差预测值来进行二次属性预测,第二个待预测颜色分量采用第二个跨分量属性残差预测值来进行二次属性预测,第三个待预测颜色分量采用第三个跨分量属性残差预测值来进行二次属性预测。In this embodiment of the application, the first color component to be predicted uses the initial cross-component attribute residual prediction value to perform secondary attribute prediction, and the second color component to be predicted uses the second cross-component attribute residual prediction value to perform For secondary attribute prediction, the third color component to be predicted uses the third cross-component attribute residual prediction value for secondary attribute prediction.
在本申请的一些实施例中,解码器基于第二个跨分量属性残差预测值,对其他颜色分量进行解码重建,得到第二个属性重建值和第三个属性重建值的实现可以包括:In some embodiments of the present application, the decoder decodes and reconstructs other color components based on the second cross-component attribute residual prediction value, and the realization of obtaining the second attribute reconstruction value and the third attribute reconstruction value may include:
基于第二个跨分量属性残差预测值,对第二个待预测颜色分量进行解码重建,得到第二个属性重建值;基于第二个属性残差重建值,确定第三个跨分量属性残差预测值;基于第三个跨分量属性残差预测值,对第三个待预测颜色分量进行解码重建,得到第三个属性重建值。Based on the second cross-component attribute residual prediction value, decode and reconstruct the second color component to be predicted to obtain the second attribute reconstruction value; based on the second attribute residual reconstruction value, determine the third cross-component attribute residual difference prediction value; based on the third cross-component attribute residual prediction value, decode and reconstruct the third to-be-predicted color component to obtain the third attribute reconstruction value.
在本申请的一些实施例中,第三个跨分量属性残差预测值,为第二个属性残差重建值和第二个跨分量属性残差预测值之和,或者,为第二个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or is the second attribute The multiplier or divisor of the residual reconstruction value.
示例性的,假设第一个待预测颜色分量为G分量,第二个待预测颜色分量为R分量,第三个待预测颜色分量为B分量。那么解码器在对G分量进行二次属性预测时,采用初始跨分量属性残差预测值实现,得到G分量的第一个属性重建值。这时,解码器在进行其他分量的二次属性预测时,可以采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第二个跨分量属性残差预测值,以及仍然采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第三个跨分量属性残差预测值,还可以采用R分量的第二个属性残差重建值,更新第二个跨分量属性残差预测值,得到第三个跨分量属性残差预测值。Exemplarily, it is assumed that the first color component to be predicted is the G component, the second color component to be predicted is the R component, and the third color component to be predicted is the B component. Then, when the decoder performs secondary attribute prediction on the G component, it uses the initial cross-component attribute residual prediction value to obtain the first attribute reconstruction value of the G component. At this time, when the decoder performs secondary attribute prediction of other components, the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the second cross-component attribute residual value difference prediction value, and the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the third cross-component attribute residual prediction value, and the first attribute residual prediction value of the R component can also be used The reconstruction value of the residual of the two attributes is updated, and the predicted value of the second cross-component attribute residual is updated to obtain the third predicted value of the cross-component attribute residual.
示例性的,采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第二个跨分量属性残差预测值可以是第一个属性残差重建值+对初始跨分量属性残差预测值得到第二个跨分量属性残差预测值;或者,将第一个属性残差重建值的2倍作为第二个跨分量属性残差预测值。Exemplarily, the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value, and the second cross-component attribute residual prediction value can be the first attribute residual reconstruction value + Obtain the second cross-component attribute residual prediction value for the initial cross-component attribute residual prediction value; or, use twice the first attribute residual reconstruction value as the second cross-component attribute residual prediction value.
采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第三个跨分量属性残差预测值,可以是第一个属性残差重建值+对初始跨分量属性残差预测值得到第三个跨分量属性残差预测值;或者,将第一个属性残差重建值的一半作为第三个跨分量属性残差预测值。The first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value, and the third cross-component attribute residual prediction value can be obtained, which can be the first attribute residual reconstruction value + the initial The cross-component attribute residual predictors yield the third cross-component attribute residual predictors; alternatively, half the reconstructed values of the first attribute residuals are used as the third cross-component attribute residual predictors.
采用R分量的第二个属性残差重建值+第二个跨分量属性残差预测值,得到第三个跨分量属性残差预测值;或者,R分量的第二个属性残差重建值的3倍作为第三个跨分量属性残差预测值。Use the second attribute residual reconstruction value of the R component + the second cross-component attribute residual prediction value to obtain the third cross-component attribute residual prediction value; or, the second attribute residual reconstruction value of the R component 3 times as the third cross-component attribute residual predictor.
下面以两个例子来说明解码器的解码方法。Two examples are used below to illustrate the decoding method of the decoder.
示例性的,在解码器侧的一种需要编码二次预测模式标志位的具体实现如下:Exemplarily, a specific implementation on the decoder side that needs to encode the secondary prediction mode flag is as follows:
a)、将初始跨分量属性残差预测值residualPrevComponent设初值为0,然后从码流中解码得到属性残差二次属性预测的预测模式标志位,如果是预测模式标志位指示使用G分量的属性残差重建值进行属性残差二次预测,则首先对G分量继续进行下述操作;a) Set the initial cross-component attribute residual prediction value residualPrevComponent to an initial value of 0, and then decode from the code stream to obtain the prediction mode flag bit of the attribute residual secondary attribute prediction, if the prediction mode flag bit indicates the use of the G component To carry out the second prediction of the attribute residual by reconstructing the value of the attribute residual, first continue to perform the following operations on the G component;
b)、从码流中解码获取G分量的量化后的属性残差值,对其进行反量化获得G分量的属性残差重建值recResidual[i](i=R或G或B);b) Decoding and obtaining the quantized attribute residual value of the G component from the code stream, performing inverse quantization on it to obtain the reconstructed value recResidual[i] (i=R or G or B) of the attribute residual of the G component;
c)、与通过最近邻居查找获得G分量的属性预测值predictor[i],并和G分量的属性残差重建值recResidual[i]、初始跨分量属性残差预测值相加计算属性重建值reconValue[i]:c) Calculate the attribute reconstruction value reconValue by adding the attribute prediction value predictor[i] of the G component obtained through the nearest neighbor search, and the attribute residual reconstruction value recResidual[i] of the G component, and the initial cross-component attribute residual prediction value [i]:
reconValue[i]=recResidual[i]+predictor[i]+residualPrevComponentreconValue[i]=recResidual[i]+predictor[i]+residualPrevComponent
d)、将第二个跨分量属性残差预测值设定为G分量的属性残差重建值+0;d), set the second cross-component attribute residual prediction value as the attribute residual reconstruction value of the G component + 0;
利用G分量的重建残差值更新跨分量属性残差预测值,用于下一个分量的二次属性预测时使用。Use the reconstructed residual value of the G component to update the cross-component attribute residual prediction value, which is used for the secondary attribute prediction of the next component.
residualPrevComponent+=recResidual[i];residualPrevComponent + = recResidual[i];
e)、对下一颜色分量(第二个待预测颜色分量)执行b)、c)、d)操作,直至R、G、B三分量均处理完成时为止。e) Perform operations b), c) and d) on the next color component (the second color component to be predicted), until the processing of all three components of R, G and B is completed.
可以理解的是,由于可以基于颜色分量的预测模式标志位来确定预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的解码重建时,得到的颜色分量的属性重建值的准确度较高。It can be understood that since the adaptive selection of the prediction mode can be determined based on the prediction mode flag bit of the color component, when the decoding and reconstruction of the color component at the current point is performed according to the prediction mode, the properties of the obtained color component The accuracy of the reconstructed values is high.
在解码器侧的一种不需要编码二次预测模式标志位的具体实现如下:A specific implementation on the decoder side that does not need to encode the secondary prediction mode flag is as follows:
a)、首先计算当前点的属性预测值的颜色三分量的平均值mean,即标准值(也可以是中值、最大值、最小值、等等);a), first calculate the mean mean of the color three components of the attribute prediction value of the current point, that is, the standard value (also can be the median, maximum value, minimum value, etc.);
b)、分别计算R分量和G分量与平均值的差值,并比较两个差值(也可以分别计算R分量、G分量、B分量与平均值的差值,并进行比较),如果diff R<diff G,则使用R分量的属性残差重建值进行属性残差二次属性预测,否则使用G分量的属性残差重建值进行属性残差二属性预测。如果是使用G分量的属性残差重建值进行属性残差二次属性预测,则首先对G分量进行下述操作; b), respectively calculate the difference between the R component and G component and the average value, and compare the two differences (you can also calculate the difference between the R component, G component, B component and the average value, and compare), if diff R <diff G , then use the attribute residual reconstruction value of the R component for attribute residual secondary attribute prediction, otherwise use the attribute residual reconstruction value of the G component for attribute residual secondary attribute prediction. If the attribute residual reconstruction value of the G component is used to predict the secondary attribute of the attribute residual, the following operations are first performed on the G component;
c)、从码流中解码获取G分量的量化后的属性残差值,对其进行反量化获得G分量的属性残差重建值recResidual[i](i=R或G或B);c) Decoding and obtaining the quantized attribute residual value of the G component from the code stream, and dequantizing it to obtain the attribute residual reconstruction value recResidual[i] (i=R or G or B) of the G component;
d)、与通过最近邻居查找获得的G分量的属性预测值predictor[i],并和G分量的属性残差重建值recResidual[i]、初始跨分量属性残差预测值相加计算属性重建值reconValue[i]:d) Calculate the attribute reconstruction value by adding the attribute prediction value predictor[i] of the G component obtained through the nearest neighbor search, and the attribute residual reconstruction value recResidual[i] of the G component, and the initial cross-component attribute residual prediction value reconValue[i]:
reconValue[i]=recResidual[i]+predictor[i]+residualPrevComponentreconValue[i]=recResidual[i]+predictor[i]+residualPrevComponent
e)、将第二个跨分量属性残差预测值设定为G分量的属性残差重建值+0;e), setting the second cross-component attribute residual prediction value as the attribute residual reconstruction value of the G component + 0;
利用G分量的重建残差值更新跨分量属性残差预测值,用于下一个颜色分量的二次属性预测时使用。Use the reconstructed residual value of the G component to update the cross-component attribute residual prediction value, which is used for the secondary attribute prediction of the next color component.
residualPrevComponent+=recResidual[i];residualPrevComponent + = recResidual[i];
f)、对下一颜色分量(第二个待预测颜色分量)执行c)、d)、e)操作,直至R、G、B三分量均处理完成时为止。f) Perform operations c), d) and e) on the next color component (the second color component to be predicted) until the processing of the three components of R, G and B is completed.
在本申请的一些实施例中,将第二个跨分量属性残差预测值或第三个跨分量属性残差预测值设定为二次预测分量的属性残差重建值的倍数或除数。比如,对R分量做属性残差二次预测时,将跨分量属性残差预测值设定为G分量的属性残差重建值除2;对B分量做属性残差二次预测时,将跨分量属性残差预测值设定为G分量的属性残差重建值除4。In some embodiments of the present application, the second cross-component attribute residual prediction value or the third cross-component attribute residual prediction value is set as a multiple or divisor of the attribute residual reconstruction value of the secondary prediction component. For example, when performing secondary prediction of attribute residuals on the R component, set the cross-component attribute residual prediction value to the attribute residual reconstruction value of the G component divided by 2; The predicted value of the component attribute residual is set as the reconstructed value of the attribute residual of the G component divided by 4.
可以理解的是,由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的解码重建时,得到的颜色分量的属性重建值的准确度较高。It can be understood that since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the decoding and reconstruction of the color component of the current point is performed according to the prediction mode, the properties of the obtained color components The accuracy of the reconstructed values is high.
本申请实施例提供一种编码方法,该方法应用于视频编码设备,即编码器。该方法所实现的功能可以通过视频编码设备中的第二处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该视频编码设备至少包括第二处理器和第二存储介质。An embodiment of the present application provides an encoding method, which is applied to a video encoding device, that is, an encoder. The function realized by this method can be realized by calling the program code by the second processor in the video encoding device, and of course the program code can be stored in the computer storage medium. It can be seen that the video encoding device includes at least the second processor and the second storage medium.
图11为本申请实施例一种编码的实现流程示意图,该方法包括:Fig. 11 is a schematic diagram of an implementation process of encoding according to an embodiment of the present application. The method includes:
S201、获取点云中的当前点对应的颜色分量的属性预测值。S201. Obtain an attribute prediction value of a color component corresponding to a current point in a point cloud.
S202、基于属性预测值,确定当前点对应的颜色分量的标准值。S202. Based on the attribute prediction value, determine a standard value of the color component corresponding to the current point.
S203、确定当前点对应的至少两个颜色分量,与标准值之间的至少两个差异度。S203. Determine at least two degrees of difference between at least two color components corresponding to the current point and a standard value.
S204、基于至少两个差异度,确定颜色分量的预测模式。S204. Determine a prediction mode of the color component based on at least two difference degrees.
在本申请实施例中,提出了一种编码方法,编码器在进行属性编码的过程中,在第一属性单元进行完属性预测后,可以获取到点云中的当前点对应的颜色分量的属性预测值,此时为了消除冗余, 可以继续对当前点的颜色分量进行二次属性预测。In the embodiment of this application, an encoding method is proposed. In the process of attribute encoding, the encoder can obtain the attribute of the color component corresponding to the current point in the point cloud after the attribute prediction is performed by the first attribute unit. Predicted value, in order to eliminate redundancy at this time, you can continue to perform secondary attribute prediction on the color component of the current point.
在本申请实施例中,编码器可以根据各个颜色分量的属性预测值,先确定一个针对颜色分量的标准值,然后确定当前点的至少两个颜色分量,与标准值之间的差异,即至少两个差异度,再基于至少两个差异度来进行预测模式的确定。In the embodiment of the present application, the encoder can first determine a standard value for the color component according to the attribute prediction value of each color component, and then determine the difference between at least two color components of the current point and the standard value, that is, at least Two degrees of difference, and then determine the prediction mode based on at least two degrees of difference.
需要说明的是,标准值可以直接由颜色分量的属性预测值得到,也可以根据至少两个颜色分量的属性预测值结合颜色分量的属性信息,得到的初始属性残差重建值确定,本申请实施例不作限制。It should be noted that the standard value can be directly obtained from the attribute prediction value of the color component, or it can be determined based on the attribute prediction value of at least two color components combined with the attribute information of the color component to obtain the initial attribute residual reconstruction value. This application implements Examples are not limited.
在本申请的一些实施例中,至少两个差异度可以直接通过至少两个颜色分量的属性预测值来比较得到。In some embodiments of the present application, at least two degrees of difference can be obtained by directly comparing attribute prediction values of at least two color components.
其中,属性预测值包括:第一颜色分量的第一属性预测值、第二颜色分量的第二属性预测值和第三颜色分量的第三属性预测值。Wherein, the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component.
那么,编码码器基于属性预测值,确定当前点对应的颜色分量的标准值,包括以下至少一种:Then, the encoder determines the standard value of the color component corresponding to the current point based on the attribute prediction value, including at least one of the following:
对第一属性预测值、第二属性预测值和第三属性预测值进行平均,确定标准值;averaging the first attribute predicted value, the second attribute predicted value and the third attribute predicted value to determine a standard value;
确定第一属性预测值、第二属性预测值和第三属性预测值中的最大值为标准值;Determining the maximum value among the first attribute predicted value, the second attribute predicted value and the third attribute predicted value as the standard value;
确定第一属性预测值、第二属性预测值和第三属性预测值中的最小值为标准值;Determining that the minimum value among the first attribute predicted value, the second attribute predicted value and the third attribute predicted value is a standard value;
确定第一属性预测值、第二属性预测值和第三属性预测值的中值为标准值。The median value of the first attribute predicted value, the second attribute predicted value and the third attribute predicted value is determined as a standard value.
需要说明的是,标准值还可以根据第一属性预测值、第二属性预测值和第三属性预测值的其他数学处理手段得到,本申请实施例不作限制。It should be noted that the standard value can also be obtained according to other mathematical processing means of the predicted value of the first attribute, the predicted value of the second attribute and the predicted value of the third attribute, which is not limited in this embodiment of the present application.
在本申请实施例中,编码器在确定出标准值之后,可以将当前点的每个颜色分量的属性预测值分别与标准值进行比较,得到三个颜色差异度,也可以将当前点中的任意两个颜色分量的属性预测值分别与标准值进行比较,得到任意两个颜色分量对应的两个差异度,本申请实施例不作限制。In the embodiment of this application, after the encoder determines the standard value, it can compare the attribute prediction value of each color component of the current point with the standard value to obtain three color difference degrees, or it can use the The attribute prediction values of any two color components are compared with the standard values respectively to obtain two degrees of difference corresponding to any two color components, which is not limited in this embodiment of the present application.
在本申请的一些实施例中,编码器根据至少两个颜色分量的属性预测值结合颜色分量的属性信息,得到的初始属性残差重建值确定。In some embodiments of the present application, the encoder determines the initial attribute residual reconstruction value obtained according to attribute prediction values of at least two color components combined with attribute information of the color components.
在本申请的一些实施例中,编码器基于属性预测值,确定当前点对应的颜色分量的标准值的实现为:In some embodiments of the present application, the encoder determines the standard value of the color component corresponding to the current point based on the attribute prediction value as follows:
基于属性预测值和当前点的属性信息,确定当前点对应的初始属性残差重建值;基于初始属性残差重建值,确定当前点对应的颜色分量的标准值。Based on the attribute prediction value and the attribute information of the current point, determine the initial attribute residual reconstruction value corresponding to the current point; based on the initial attribute residual reconstruction value, determine the standard value of the color component corresponding to the current point.
在本申请实施例中,编码器基于属性预测值和当前点的属性信息,确定当前点对应的初始残差值;对初始残差值进行量化和反量化,得到初始属性残差重建值。In the embodiment of the present application, the encoder determines the initial residual value corresponding to the current point based on the predicted attribute value and the attribute information of the current point; quantizes and dequantizes the initial residual value to obtain the reconstruction value of the initial attribute residual.
需要说明的是,编码器根据各个颜色分量的属性预测值和当前点的颜色分量的属性信息,确定当前点对应的各个颜色分量的初始属性残差重建值,基于各个颜色分量的初始属性残差重建值,确定当前点对应的颜色分量的标准值。It should be noted that, according to the attribute prediction value of each color component and the attribute information of the color component of the current point, the encoder determines the initial attribute residual reconstruction value of each color component corresponding to the current point, and based on the initial attribute residual of each color component Reconstruct the value to determine the standard value of the color component corresponding to the current point.
在本申请的一些实施例中,初始属性残差重建值包括:第一颜色分量的第一初始属性残差重建值、第二颜色分量的第二初始属性残差重建值和第三颜色分量的第三属初始属性残差重建值;In some embodiments of the present application, the initial attribute residual reconstruction value includes: the first initial attribute residual reconstruction value of the first color component, the second initial attribute residual reconstruction value of the second color component, and the third color component The residual reconstruction value of the third genus initial attribute;
编码器基于初始属性残差重建值,确定当前点对应的颜色分量的标准值,包括以下至少一种:The encoder determines the standard value of the color component corresponding to the current point based on the initial attribute residual reconstruction value, including at least one of the following:
对第一初始属性残差重建值、第二初始属性残差重建值和第三初始属性残差重建值进行平均,确定标准值;averaging the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value and the third initial attribute residual reconstruction value to determine a standard value;
确定第一初始属性残差重建值、第二初始属性残差重建值和第三初始属性残差重建值值中的最大值为标准值;Determine the maximum value among the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value and the third initial attribute residual reconstruction value as the standard value;
确定第一初始属性残差重建值、第二初始属性残差重建值和第三初始属性残差重建值中的最小值为标准值;Determine the minimum value among the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value and the third initial attribute residual reconstruction value as a standard value;
确定第一初始属性残差重建值、第二初始属性残差重建值和第三初始属性残差重建值的中值为标准值。Determine the standard value as the median of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value and the third initial attribute residual reconstruction value.
在本申请实施例中,编码器在确定出标准值之后,可以将当前点的每个颜色分量的初始属性残差重建值分别与标准值进行比较,得到三个颜色差异度,也可以将当前点中的任意两个颜色分量的初始属性残差重建值分别与标准值进行比较,得到任意两个颜色分量对应的两个差异度,本申请实施例不作限制。In the embodiment of this application, after determining the standard value, the encoder can compare the initial attribute residual reconstruction value of each color component of the current point with the standard value to obtain three color difference degrees, or the current The initial attribute residual reconstruction values of any two color components in the point are compared with the standard values to obtain two degrees of difference corresponding to any two color components, which is not limited in this embodiment of the present application.
需要说明的是,标准值还可以根据第一初始属性残差重建值、第二初始属性残差重建值和第三初始属性残差重建值的其他数学处理手段得到,本申请实施例不作限制。It should be noted that the standard value can also be obtained according to other mathematical processing methods of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value, which is not limited in this embodiment of the present application.
在本申请的一些实施例中,编码器可以确定至少两个差异度中的最小差异度;将最小差异度对应的颜色分量确定为预测模式。或者,编码器基于至少两个差异度,确定至少两个差异度的排序结果;按照排序结果,确定预测模式。In some embodiments of the present application, the encoder may determine the minimum degree of difference among at least two degrees of difference; and determine the color component corresponding to the minimum degree of difference as the prediction mode. Alternatively, the encoder determines a sorting result of the at least two difference degrees based on the at least two difference degrees; and determines a prediction mode according to the sorting result.
需要说明的是,预测模式指示对当前点的二次属性预测时最先预测的第一个待预测颜色分量先进行解码,然后再对其他颜色分量进行二次属性预测。It should be noted that the prediction mode indicates that the first predicted color component to be predicted is firstly decoded in the second attribute prediction of the current point, and then the second attribute prediction is performed on other color components.
在本申请的一些实施例中,预测模式表征颜色分量的编解码顺序或者表征颜色分量的预测形式(例如最先进行编解码的颜色分量是哪个)。In some embodiments of the present application, the prediction mode represents the encoding and decoding sequence of the color components or represents the prediction form of the color components (for example, which color component is encoded and decoded first).
在本申请的一些实施例中,预测模式包括:第一个待预测颜色分量;第一个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中最先编解码的颜色分量。In some embodiments of the present application, the prediction mode includes: the first color component to be predicted; the first color component to be predicted is the first coded color among the first color component, the second color component and the third color component portion.
需要说明的是,编码器基于至少两个差异度,确定至少两个差异度的排序结果;可以按照排序结果,确定出差异最小的颜色分量对应的预测模式。而且在进行当前点的颜色分量的二次属性预测时,可以按照排序结果,由差异度的由小到大的顺序确定颜色分量的编码顺序。It should be noted that, based on the at least two difference degrees, the encoder determines the sorting results of the at least two difference degrees; according to the sorting results, the prediction mode corresponding to the color component with the smallest difference can be determined. Moreover, when the secondary attribute prediction of the color component of the current point is performed, the coding sequence of the color components can be determined from the order of the degree of difference from small to large according to the sorting result.
示例性的,编码器分别计算R分量和G分量与标准值的差值(即差异度diff R和diff G),并比较两个差值,如果diff R<diff G,则确定R分量为预测模式进行属性残差二次预测,否则使用G分量为预测模式进行属性残差二次预测。 Exemplarily, the encoder calculates the difference between the R component and the G component and the standard value (ie, the difference diff R and diff G ), and compares the two differences, and if diff R <diff G , then determine that the R component is the prediction mode for secondary prediction of attribute residuals, otherwise use the G component as the prediction mode for secondary prediction of attribute residuals.
示例性的,编码器计算R分量、G分量、B分量分别与标准值值的差值(diff R、diff G和diff B),并进行比较,如果diff R、diff G和diff B中diff R最小,则确定R分量为预测模式进行属性残差二次预测;如果diff G最小,则使用G分量为预测模式进行属性残差二次预测;如果diff B最小,则使用B分量为预测模式进行属性残差二次预测。 Exemplarily, the encoder calculates the differences (diff R , diff G and diff B ) between the R component, the G component, and the B component and the standard value, and compares them. If diff R among diff R , diff G and diff B If it is the smallest, determine the R component as the prediction mode for secondary prediction of the attribute residual; if the diff G is the smallest, use the G component as the prediction mode for the secondary prediction of the attribute residual; if the diff B is the smallest, use the B component as the prediction mode Quadratic prediction of attribute residuals.
在本申请的一些实施例中,编码器在基于至少两个差异度,确定颜色分量的预测模式时,就可以生成预测模式标志位,写入码流;该预测模式标志位表征预测模式。In some embodiments of the present application, when the encoder determines the prediction mode of the color component based on at least two differences, it can generate a prediction mode flag and write it into the code stream; the prediction mode flag represents the prediction mode.
需要说明的是,编码器在直接通过属性预测值确定的标准值,确定预测模式的过程中,也可以不用生成预测模式标志位,直接在解码器端直接进行同样的预测模式的确定过程即可。It should be noted that, in the process of determining the prediction mode directly through the standard value determined by the attribute prediction value, the encoder does not need to generate the prediction mode flag, and directly performs the same determination process of the prediction mode on the decoder side. .
S205、基于预测模式、属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。S205. Based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, perform secondary prediction on the color component of the current point to obtain the attribute residual value of the color component.
在本申请实施例中,在二次属性预测的过程中,编码器确定出二次属性预测时的当前点的颜色分量的预测模式,然后依据预测模式进行二次属性预测,并结合属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。In the embodiment of this application, in the process of secondary attribute prediction, the encoder determines the prediction mode of the color component of the current point during the secondary attribute prediction, and then performs secondary attribute prediction according to the prediction mode, and combines the predicted value of the attribute and the initial cross-component attribute residual prediction value, perform secondary prediction on the color component of the current point, and obtain the attribute residual value of the color component.
在本申请的一些实施例中,编码器可以依据预测模式进行二次属性预测,并结合各个颜色分量的属性信息、属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。In some embodiments of the present application, the encoder can perform secondary attribute prediction according to the prediction mode, and combine the attribute information of each color component, the attribute prediction value and the initial cross-component attribute residual prediction value to carry out the color component of the current point Quadratic prediction to obtain the attribute residual value of the color component.
需要说明的是,编码器在确定了当前点的预测模式后,先对第一个待预测颜色分量进行二次预测,然后再基于第一个待预测颜色分量对其他颜色分量(第二个待预测颜色分量和第三个待预测颜色分量)进行二次预测,或者再基于第一个待预测颜色分量对第二个待预测颜色分量进行二次预测,采用第二个待预测颜色分量对第三个待预测颜色分量进行二次预测。其中,第二个待预测颜色分量和第三个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中的除第一个待预测颜色分量外的其他颜色分量。It should be noted that after the encoder determines the prediction mode of the current point, it first performs second prediction on the first color component to be predicted, and then performs second prediction on the other color components (the second color component to be predicted) based on the first color component to be predicted. predicted color component and the third color component to be predicted) for secondary prediction, or secondly predict the second color component to be predicted based on the first color component to be predicted, and use the second color component to be predicted to predict the second color component Three to-be-predicted color components perform secondary prediction. Wherein, the second to-be-predicted color component and the third to-be-predicted color component are color components other than the first to-be-predicted color component among the first, second, and third color components.
在本申请的一些实施例中,编码器按照预测模式,将第一个待预测颜色分量的第一属性信息,与第一个待预测颜色分量的属性预测值和初始跨分量属性残差预测值依次相减后量化,实现二次预测,得到第一个待预测颜色分量的属性残差值;对第一个待预测颜色分量的属性残差值进行反量化后,得到第一个待预测颜色分量的第一个属性残差重建值;基于第一个属性残差重建值,确定第二个跨分量属性残差预测值;基于第二个跨分量属性残差预测值,对其他颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值;其中,第二个待预测颜色分量和第三个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中的除第一个待预测颜色分量外的其他颜色分量。In some embodiments of the present application, according to the prediction mode, the encoder combines the first attribute information of the first color component to be predicted with the attribute prediction value of the first color component to be predicted and the initial cross-component attribute residual prediction value Quantize after subtraction in turn to achieve secondary prediction, and obtain the attribute residual value of the first color component to be predicted; after inverse quantization of the attribute residual value of the first color component to be predicted, the first color to be predicted is obtained The first attribute residual reconstruction value of the component; based on the first attribute residual reconstruction value, the second cross-component attribute residual prediction value is determined; based on the second cross-component attribute residual prediction value, the other color components are The second prediction is to obtain the attribute residual value of the second to-be-predicted color component and the attribute residual value of the third to-be-predicted color component; wherein, the second to-be-predicted color component and the third to-be-predicted color component are the Other color components except the first to-be-predicted color component among the first color component, the second color component and the third color component.
在本申请实施例中,编码器可以按照预测模式,采用第一个待预测颜色分量的第一属性信息,减去与第一个待预测颜色分量的属性预测值,再减去初始跨分量属性残差预测值,再量化后得到第一个待预测颜色分量的属性残差值。由于每个点可以具有三个颜色分量,因此,在对当前点进行二次属性预测时,需要对每个颜色分量都进行处理,进而完成当前点的编码部分二次属性预测。In the embodiment of the present application, the encoder can use the first attribute information of the first color component to be predicted according to the prediction mode, subtract the attribute prediction value of the first color component to be predicted, and then subtract the initial cross-component attribute The residual prediction value is quantized to obtain the attribute residual value of the first color component to be predicted. Since each point can have three color components, when performing secondary attribute prediction on the current point, each color component needs to be processed to complete the coding part of the current point's secondary attribute prediction.
在本申请的一些实施例中,编码器基于第二个跨分量属性残差预测值,对其他颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值的实现为:In some embodiments of the present application, the encoder performs secondary prediction on other color components based on the second cross-component attribute residual prediction value to obtain the attribute residual value of the second to-be-predicted color component and the third to-be-predicted color component. The implementation of predicting the attribute residual value of the color component is:
编码器基于第二个跨分量属性残差预测值,对第二个待预测颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值;对第二个待预测颜色分量的属性残差值进行反量化后,得到第二个待预测颜色分量的第二个属性残差重建值;基于第二个属性残差重建值,确定第三个跨分量属性 残差预测值;基于第三个跨分量属性残差预测值,对第三个待预测颜色分量进行二次预测,得到第三个待预测颜色分量的属性残差值。The encoder performs secondary prediction on the second color component to be predicted based on the second cross-component attribute residual prediction value to obtain the attribute residual value of the second color component to be predicted; for the second color component to be predicted After the attribute residual value is dequantized, the second attribute residual reconstruction value of the second color component to be predicted is obtained; based on the second attribute residual reconstruction value, the third cross-component attribute residual prediction value is determined; based on The third cross-component attribute residual prediction value performs secondary prediction on the third to-be-predicted color component to obtain the attribute residual value of the third to-be-predicted color component.
在本申请的一些实施例中,第二个跨分量属性残差预测值,为第一个属性残差重建值和初始跨分量属性残差预测值发之和,或者,为第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the second cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual Multiplier or divisor of the difference reconstruction value.
需要说明的是,针对点云中的各个点,初始跨分量属性残差预测值可以为0,本申请实施例不作限制。在本申请实施例中,编码器是采用跨分量属性残差预测值来进行二次属性预测的,但是一个点的不同颜色分量对应的跨分量属性残差预测值具有关联性,但可以不相同。It should be noted that, for each point in the point cloud, the initial cross-component attribute residual prediction value may be 0, which is not limited in this embodiment of the present application. In the embodiment of this application, the encoder uses the cross-component attribute residual prediction value to perform secondary attribute prediction, but the cross-component attribute residual prediction values corresponding to different color components of a point are related, but may not be the same .
在本申请实施例中,第一个待预测颜色分量采用初始跨分量属性残差预测值来进行二次属性预测,第二个待预测颜色分量采用第二个跨分量属性残差预测值来进行二次属性预测,第三个待预测颜色分量采用第三个跨分量属性残差预测值来进行二次属性预测。In this embodiment of the application, the first color component to be predicted uses the initial cross-component attribute residual prediction value to perform secondary attribute prediction, and the second color component to be predicted uses the second cross-component attribute residual prediction value to perform For secondary attribute prediction, the third color component to be predicted uses the third cross-component attribute residual prediction value for secondary attribute prediction.
在本申请的一些实施例中,编码器对第一个待预测颜色分量的属性残差值进行反量化后,得到第一个待预测颜色分量的第一个属性残差重建值之后,编码器基于第一个属性残差重建值,确定第二个跨分量属性残差预测值和第三个跨分量属性残差预测值;基于第二个跨分量属性残差预测值,对第二个待预测颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值;基于第三个跨分量属性残差预测值,对第三个待预测颜色分量进行二次预测,得到第三个待预测颜色分量的属性残差值。In some embodiments of the present application, after the encoder dequantizes the attribute residual value of the first color component to be predicted, and obtains the first attribute residual reconstruction value of the first color component to be predicted, the encoder Based on the first attribute residual reconstruction value, determine the second cross-component attribute residual prediction value and the third cross-component attribute residual prediction value; based on the second cross-component attribute residual prediction value, determine the second cross-component attribute residual prediction value The predicted color component is predicted twice to obtain the attribute residual value of the second color component to be predicted; based on the third cross-component attribute residual prediction value, the third color component to be predicted is predicted twice to obtain the third The attribute residual value of a color component to be predicted.
在本申请的一些实施例中,第三个跨分量属性残差预测值,为第二个属性残差重建值和第二个跨分量属性残差预测值之和,或者,为第二个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or is the second attribute The multiplier or divisor of the residual reconstruction value.
示例性的,假设第一个待预测颜色分量为G分量,第二个待预测颜色分量为R分量,第三个待预测颜色分量为B分量。那么解码器在对G分量进行二次属性预测时,采用初始跨分量属性残差预测值实现,得到G分量的第一个属性重建值。这时,解码器在进行其他分量的二次属性预测时,可以采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第二个跨分量属性残差预测值,以及仍然采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第三个跨分量属性残差预测值,还可以采用R分量的第二个属性残差重建值,更新第二个跨分量属性残差预测值,得到第三个跨分量属性残差预测值。Exemplarily, it is assumed that the first color component to be predicted is the G component, the second color component to be predicted is the R component, and the third color component to be predicted is the B component. Then, when the decoder performs secondary attribute prediction on the G component, it uses the initial cross-component attribute residual prediction value to obtain the first attribute reconstruction value of the G component. At this time, when the decoder performs secondary attribute prediction of other components, the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the second cross-component attribute residual value difference prediction value, and the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value to obtain the third cross-component attribute residual prediction value, and the first attribute residual prediction value of the R component can also be used The reconstruction value of the residual of the two attributes is updated, and the predicted value of the second cross-component attribute residual is updated to obtain the third predicted value of the cross-component attribute residual.
示例性的,采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第二个跨分量属性残差预测值可以是第一个属性残差重建值+对初始跨分量属性残差预测值得到第二个跨分量属性残差预测值;或者,将第一个属性残差重建值的2倍作为第二个跨分量属性残差预测值。Exemplarily, the first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value, and the second cross-component attribute residual prediction value can be the first attribute residual reconstruction value + Obtain the second cross-component attribute residual prediction value for the initial cross-component attribute residual prediction value; or, use twice the first attribute residual reconstruction value as the second cross-component attribute residual prediction value.
采用G分量的第一个属性残差重建值可以对初始跨分量属性残差预测值进行更新,得到第三个跨分量属性残差预测值,可以是第一个属性残差重建值+对初始跨分量属性残差预测值得到第三个跨分量属性残差预测值;或者,将第一个属性残差重建值的一半作为第三个跨分量属性残差预测值。The first attribute residual reconstruction value of the G component can be used to update the initial cross-component attribute residual prediction value, and the third cross-component attribute residual prediction value can be obtained, which can be the first attribute residual reconstruction value + the initial The cross-component attribute residual predictors yield the third cross-component attribute residual predictors; alternatively, half the reconstructed values of the first attribute residuals are used as the third cross-component attribute residual predictors.
采用R分量的第二个属性残差重建值+第二个跨分量属性残差预测值,得到第三个跨分量属性残差预测值;或者,R分量的第二个属性残差重建值的3倍作为第三个跨分量属性残差预测值。Use the second attribute residual reconstruction value of the R component + the second cross-component attribute residual prediction value to obtain the third cross-component attribute residual prediction value; or, the second attribute residual reconstruction value of the R component 3 times as the third cross-component attribute residual predictor.
在本申请实施例中,编码器在得到各个颜色分量的属性残差值的时候,就将颜色分量的属性残差值写入码流。In the embodiment of the present application, when the encoder obtains the attribute residual value of each color component, it writes the attribute residual value of the color component into the code stream.
在本申请的一些实施例中,颜色分量的属性残差值包括:第一个待预测颜色分量的属性残差值、第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值。In some embodiments of the present application, the attribute residual value of the color component includes: the attribute residual value of the first color component to be predicted, the attribute residual value of the second color component to be predicted, and the third color component to be predicted Attribute residual value for the component.
其中,第一个待预测颜色分量的属性残差值、第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值均为量化后的属性残差值。Wherein, the attribute residual value of the first color component to be predicted, the attribute residual value of the second color component to be predicted, and the attribute residual value of the third color component to be predicted are quantized attribute residual values.
需要说明的是,编码器的描述与解码器的原理一致,实现相对应,此处不再赘述。It should be noted that the description of the encoder is consistent with the principle of the decoder, and the implementation is corresponding, which will not be repeated here.
下面以两个例子来说明解码器的解码方法。Two examples are used below to illustrate the decoding method of the decoder.
示例性的,在编码器侧的一种需要编码二次预测模式标志位的具体实现如下:Exemplarily, a specific implementation on the encoder side that needs to encode the secondary prediction mode flag is as follows:
a)、首先在不采用残差二次属性预测的前提下,计算出当前点的颜色三分量的初始属性残差重建值recResidual[i](i=R或G或B);a), first under the premise of not using residual secondary attribute prediction, calculate the initial attribute residual reconstruction value recResidual[i] (i=R or G or B) of the color three-component of the current point;
b)、计算出颜色三分量的初始属性残差重建值的平均值mean,即标准值(也可以是中值、最大值、最小值、等等),本申请实施例不作限制;b), calculate the mean value mean of the initial attribute residual reconstruction value of the three color components, that is, the standard value (also can be the median value, maximum value, minimum value, etc.), which is not limited by the embodiment of the present application;
c)、分别计算R分量和G分量与平均值的差值,即差异度,并比较两个差值(也可以分别计算R分量、G分量、B分量与平均值的差值,并进行比较),如果diff R<diff G,则使用R分量的属性残差重建值进行属性残差二次属性预测,否则使用G分量的属性残差重建值进行属性残差二次预测; c), respectively calculate the difference between the R component and the G component and the average value, that is, the degree of difference, and compare the two differences (you can also calculate the difference between the R component, the G component, the B component and the average value, and compare them ), if diff R <diff G , then use the attribute residual reconstruction value of the R component for the secondary attribute prediction of the attribute residual, otherwise use the attribute residual reconstruction value of the G component for the secondary prediction of the attribute residual;
d)、将初始跨分量属性残差预测值residualPrevComponent设初值为0,根据步骤c)所确定的属 性残差二次预测模式,若使用G分量的属性残差重建值进行属性残差二次预测,则首先对G分量进行下述操作;d) Set the initial cross-component attribute residual prediction value residualPrevComponent to an initial value of 0, and according to the attribute residual secondary prediction mode determined in step c), if the attribute residual reconstruction value of the G component is used to perform attribute residual secondary Prediction, then first perform the following operations on the G component;
e)、利用G分量的属性信息、通过最近邻居查找获得G分量的属性预测值和初始跨分量属性残差预测值计算G分量的残差值;e), using the attribute information of the G component, obtaining the attribute prediction value of the G component and the initial cross-component attribute residual prediction value through the nearest neighbor search to calculate the residual value of the G component;
f)、delta=currValue[i]-predictor[i]-residualPrevComponent(i=R或G或B);f), delta=currValue[i]-predictor[i]-residualPrevComponent(i=R or G or B);
g)、对残差值进行量化,得到G分量的属性残差值,再进行熵编码,写入码流,并根据G分量编码预测模式的标志位;g) Quantize the residual value to obtain the attribute residual value of the G component, then perform entropy encoding, write the code stream, and encode the flag bit of the prediction mode according to the G component;
h)、对量化后的G分量的属性残差值进行反量化,得到G分量的属性残差重建值recResidual[i];h) Dequantize the attribute residual value of the quantized G component to obtain the reconstructed value recResidual[i] of the attribute residual of the G component;
i)、将第二个跨分量属性残差预测值设定为G分量的属性残差重建值+0;i), setting the second cross-component attribute residual prediction value as the attribute residual reconstruction value of the G component + 0;
利用G分量的重建残差值更新跨分量属性残差预测值,用于下一个颜色分量的二次属性预测时使用。Use the reconstructed residual value of the G component to update the cross-component attribute residual prediction value, which is used for the secondary attribute prediction of the next color component.
residualPrevComponent+=recResidual[i];residualPrevComponent + = recResidual[i];
j)、对下一颜色分量(第二个待预测颜色分量)执行e)、f)、g)、h)操作,直至R、G、B三分量均处理完成时为止。j), perform operations e), f), g), and h) on the next color component (the second color component to be predicted), until the processing of the three components of R, G, and B is completed.
可以理解的是,由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的二次预测时,得到的颜色分量的属性重建值的准确度较高。除此之外,还可以直接将预测模式的标志位传输至解码器,提高了解码器的解码效率。It can be understood that since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high. In addition, the flag bit of the prediction mode can also be directly transmitted to the decoder, which improves the decoding efficiency of the decoder.
示例性的,在编码器侧的一种不需要编码二次预测模式标志位的具体实现如下:Exemplarily, a specific implementation on the encoder side that does not need to encode the secondary prediction mode flag is as follows:
a)、计算出颜色三分量的属性预测值的平均值mean,即标准值(也可以是中值、最大值、最小值、等等),本申请实施例不作限制;a), calculate the average value mean of the attribute prediction value of the three color components, that is, the standard value (also can be the median, maximum value, minimum value, etc.), the embodiment of the present application is not limited;
b)、分别计算R分量和G分量与平均值的差值,即差异度,并比较两个差值(也可以分别计算R分量、G分量、B分量与平均值的差值,并进行比较),如果diff R<diff G,则使用R分量的属性残差重建值进行属性残差二次属性预测,否则使用G分量的属性残差重建值进行属性残差二次预测; b), respectively calculate the difference between the R component and the G component and the average value, that is, the degree of difference, and compare the two differences (you can also calculate the difference between the R component, the G component, the B component and the average value, and compare them ), if diff R <diff G , then use the attribute residual reconstruction value of the R component for the secondary attribute prediction of the attribute residual, otherwise use the attribute residual reconstruction value of the G component for the secondary prediction of the attribute residual;
c)、将初始跨分量属性残差预测值residualPrevComponent设初值为0,根据步骤c)所确定的属性残差二次预测模式,若使用G分量的属性残差重建值进行属性残差二次预测,则首先对G分量进行下述操作;c) Set the initial cross-component attribute residual prediction value residualPrevComponent to an initial value of 0, and according to the attribute residual secondary prediction mode determined in step c), if the attribute residual reconstruction value of the G component is used to perform attribute residual secondary Prediction, then first perform the following operations on the G component;
d)、利用G分量的属性信息、通过最近邻居查找获得G分量的属性预测值和初始跨分量属性残差预测值计算G分量的残差值;d), using the attribute information of the G component, obtaining the attribute prediction value of the G component and the initial cross-component attribute residual prediction value through the nearest neighbor search to calculate the residual value of the G component;
delta=currValue[i]-predictor[i]-residualPrevComponent(i=R或G或B);delta=currValue[i]-predictor[i]-residualPrevComponent(i=R or G or B);
e)、对残差值进行量化,得到G分量的属性残差值,再进行熵编码,写入码流;e) Quantize the residual value to obtain the attribute residual value of the G component, then perform entropy encoding, and write it into the code stream;
f)、对量化后的G分量的属性残差值进行反量化,得到G分量的属性残差重建值recResidual[i];f) Dequantize the attribute residual value of the quantized G component to obtain the attribute residual reconstruction value recResidual[i] of the G component;
g)、将第二个跨分量属性残差预测值设定为G分量的属性残差重建值+0;g), setting the second cross-component attribute residual prediction value as the G component attribute residual reconstruction value+0;
利用G分量的重建残差值更新跨分量属性残差预测值,用于下一个颜色分量的二次属性预测时使用。Use the reconstructed residual value of the G component to update the cross-component attribute residual prediction value, which is used for the secondary attribute prediction of the next color component.
residualPrevComponent+=recResidual[i];residualPrevComponent + = recResidual[i];
h)、对下一颜色分量(第二个待预测颜色分量)执行e)、f)、g)、h)操作,直至R、G、B三分量均处理完成时为止。h), perform operations e), f), g), and h) on the next color component (the second color component to be predicted), until the processing of the three components of R, G, and B is completed.
可以理解的是,由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的二次预测时,得到的颜色分量的属性重建值的准确度较高。It can be understood that since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
基于前述实施例的实现基础,如图12所示,本申请实施例提供了一种解码器1,包括:Based on the implementation basis of the foregoing embodiments, as shown in FIG. 12 , the embodiment of the present application provides a decoder 1, including:
解析部分10,被配置为解析码流,确定当前点对应的颜色分量的属性残差值;The parsing part 10 is configured to parse the code stream, and determine the attribute residual value of the color component corresponding to the current point;
第一获取部分11,被配置为获取所述当前点对应的颜色分量的属性预测值;The first acquiring part 11 is configured to acquire the attribute prediction value of the color component corresponding to the current point;
第一确定部分12,被配置为确定当前点的颜色分量的预测模式;其中,所述预测模式是基于颜色分量之间的差异度来确定的;The first determining part 12 is configured to determine the prediction mode of the color component of the current point; wherein, the prediction mode is determined based on the degree of difference between the color components;
解码部分13,被配置为基于所述预测模式、所述属性残差值、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。The decoding part 13 is configured to decode and reconstruct the color component of the current point based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the color component The property reconstruction value for .
在本申请的一些实施例中,所述解析部分10,还被配置为在解析码流时,解析出预测模式标志位;In some embodiments of the present application, the parsing part 10 is further configured to parse out the prediction mode flag when parsing the code stream;
所述第一确定部分12,还被配置为根据所述预测模式标志位,确定所述当前点的颜色分量的所 述预测模式。The first determining part 12 is further configured to determine the prediction mode of the color component of the current point according to the prediction mode flag bit.
在本申请的一些实施例中,所述第一确定部分12,还被配置为基于属性预测值,确定所述当前点对应的颜色分量的标准值;确定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;基于所述至少两个差异度,确定所述当前点的颜色分量的所述预测模式。In some embodiments of the present application, the first determining part 12 is further configured to determine the standard value of the color component corresponding to the current point based on the attribute prediction value; determine at least two color components corresponding to the current point A component, at least two degrees of difference from the standard value; based on the at least two degrees of difference, determine the prediction mode of the color component of the current point.
在本申请的一些实施例中,所述第一确定部分12,还被配置为确定所述至少两个差异度中的最小差异度;将所述最小差异度对应的颜色分量确定为所述预测模式。In some embodiments of the present application, the first determination part 12 is further configured to determine the minimum difference degree among the at least two difference degrees; determine the color component corresponding to the minimum difference degree as the predicted model.
在本申请的一些实施例中,所述第一确定部分12,还被配置为确定所述至少两个差异度的排序结果;按照所述排序结果,确定所述预测模式。In some embodiments of the present application, the first determining part 12 is further configured to determine a ranking result of the at least two degrees of difference; and determine the prediction mode according to the ranking result.
在本申请的一些实施例中,所述属性预测值包括:第一颜色分量的第一属性预测值、第二颜色分量的第二属性预测值和第三颜色分量的第三属性预测值;In some embodiments of the present application, the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component;
所述第一确定部分12,还被配置为以下至少一种:The first determining part 12 is further configured as at least one of the following:
对所述第一属性预测值、所述第二属性预测值和所述第三属性预测值进行平均,确定所述标准值;averaging the first attribute predicted value, the second attribute predicted value and the third attribute predicted value to determine the standard value;
确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最大值为所述标准值;determining the maximum value of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value as the standard value;
确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最小值为所述标准值;determining that the minimum of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value is the standard value;
确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值的中值为所述标准值。Determining a median value of the first attribute prediction value, the second attribute prediction value, and the third attribute prediction value as the standard value.
在本申请的一些实施例中,所述预测模式包括:第一个待预测颜色分量;所述第一个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中最先编解码的颜色分量。In some embodiments of the present application, the prediction mode includes: a first color component to be predicted; the first color component to be predicted is the first color component among the first color component, the second color component and the third color component The color components of the codec.
在本申请的一些实施例中,所述解码部分13,还被配置为按照所述预测模式,基于第一个待预测颜色分量的属性残差值,确定第一个待预测颜色分量的第一个属性残差重建值;其中,所述第一个待预测颜色分量为所述预测模式表征的颜色分量;基于所述属性预测值、所述第一个属性残差重建值和所述初始跨分量属性残差预测值对所述当前点的颜色分量进行解码重建,得到颜色分量的所述属性重建值。In some embodiments of the present application, the decoding part 13 is further configured to determine the first color component of the first color component to be predicted based on the attribute residual value of the first color component to be predicted according to the prediction mode. attribute residual reconstruction value; wherein, the first color component to be predicted is the color component characterized by the prediction mode; based on the attribute prediction value, the first attribute residual reconstruction value and the initial span The component attribute residual prediction value decodes and reconstructs the color component of the current point to obtain the attribute reconstruction value of the color component.
在本申请的一些实施例中,所述解码部分13,还被配置为按照所述预测模式,对所述第一个待预测颜色分量的属性残差值进行反量化,确定所述第一个待预测颜色分量的所述第一个属性残差重建值。In some embodiments of the present application, the decoding part 13 is further configured to dequantize the attribute residual value of the first color component to be predicted according to the prediction mode, and determine the first The first attribute residual reconstruction value of the color component to be predicted.
在本申请的一些实施例中,所述属性重建值包括:第一个属性重建值、第二个属性重建值和第三个属性重建值;In some embodiments of the present application, the attribute reconstruction value includes: a first attribute reconstruction value, a second attribute reconstruction value and a third attribute reconstruction value;
所述解码部分13,还被配置为将所述初始跨分量属性残差预测值,与第一个待预测颜色分量对应的属性预测值和第一个属性残差重建值相加,得到所述第一个待预测颜色分量的所述第一个属性重建值;The decoding part 13 is further configured to add the initial cross-component attribute residual prediction value to the attribute prediction value corresponding to the first color component to be predicted and the first attribute residual reconstruction value to obtain the said first attribute reconstruction value of the first color component to be predicted;
基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值;determining a second cross-component attribute residual prediction value based on the first attribute residual reconstruction value;
基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量和第三个待预测颜色分量进行解码重建,得到所述第二个属性重建值和所述第三个属性重建值;所述第二个待预测颜色分量和所述第三个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中的除所述第一个待预测颜色分量外的其他颜色分量。Based on the second cross-component attribute residual prediction value, decode and reconstruct the second to-be-predicted color component and the third to-be-predicted color component to obtain the second attribute reconstruction value and the third attribute Reconstruction value; the second color component to be predicted and the third color component to be predicted are the first color component, the second color component and the third color component except the first color component to be predicted other color components.
在本申请的一些实施例中,所述解码部分13,还被配置为基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行解码重建,得到所述第二个属性重建值;In some embodiments of the present application, the decoding part 13 is further configured to decode and reconstruct the second color component to be predicted based on the second cross-component attribute residual prediction value to obtain the second attribute reconstruction value;
基于所述第二个属性残差重建值,确定第三个跨分量属性残差预测值;determining a third cross-component attribute residual prediction value based on the second attribute residual reconstruction value;
基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行解码重建,得到所述第三个属性重建值。Based on the third cross-component attribute residual prediction value, decode and reconstruct a third to-be-predicted color component to obtain the third attribute reconstruction value.
在本申请的一些实施例中,所述解码部分13,还被配置为所述将所述初始跨分量属性残差预测值,与第一个待预测颜色分量对应的属性预测值和第一个属性残差重建值相加,得到所述第一个待预测颜色分量的所述第一个属性重建值之后,基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值和第三个跨分量属性残差预测值;基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行解码重建,得到第二个属性重建值;基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行解码重建,得到第三个属性重建值。In some embodiments of the present application, the decoding part 13 is further configured to use the initial cross-component attribute residual prediction value, the attribute prediction value corresponding to the first color component to be predicted, and the first After adding the attribute residual reconstruction values to obtain the first attribute reconstruction value of the first to-be-predicted color component, determine the second cross-component attribute residual based on the first attribute residual reconstruction value The predicted value and the third cross-component attribute residual prediction value; based on the second cross-component attribute residual prediction value, the second color component to be predicted is decoded and reconstructed to obtain the second attribute reconstruction value; based on the The third cross-component attribute residual prediction value is described, and the third color component to be predicted is decoded and reconstructed to obtain the third attribute reconstruction value.
在本申请的一些实施例中,所述第二个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the second cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
在本申请的一些实施例中,所述第三个跨分量属性残差预测值,为所述第二个属性残差重建值和所述第二个跨分量属性残差预测值之和,或者,为所述第二个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or , the multiple or divisor of the reconstruction value for the second attribute residual.
在本申请的一些实施例中,所述第三个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
可以理解的是,由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的二次预测时,得到的颜色分量的属性重建值的准确度较高。It can be understood that since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
在本申请的实际应用中,如图13所示,本申请实施例还提供了一种解码器,包括:In the actual application of this application, as shown in Figure 13, the embodiment of this application also provides a decoder, including:
第一存储器14和第一处理器15;a first memory 14 and a first processor 15;
所述第一存储器14存储有可在第一处理器15上运行的计算机程序,所述第一处理器15执行所述程序时实现解码器对应的解码方法。The first memory 14 stores a computer program that can run on the first processor 15, and the first processor 15 implements a decoding method corresponding to the decoder when executing the program.
其中,第一处理器15可以通过软件、硬件、固件或者其组合实现,可以使用电路、单个或多个专用集成电路(application specific integrated circuits,ASIC)、单个或多个通用集成电路、单个或多个微处理器、单个或多个可编程逻辑器件、或者前述电路或器件的组合、或者其他适合的电路或器件,从而使得该第一处理器15可以执行前述实施例中的解码器侧的解码方法的相应步骤。Wherein, the first processor 15 can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application specific integrated circuits (ASIC), single or multiple general integrated circuits, single or multiple a microprocessor, a single or multiple programmable logic devices, or a combination of the aforementioned circuits or devices, or other suitable circuits or devices, so that the first processor 15 can perform the decoding on the decoder side in the aforementioned embodiments corresponding steps of the method.
本申请实施例提供了一种编码器2,如图14所示,包括:The embodiment of the present application provides an encoder 2, as shown in Figure 14, including:
第二获取部分20,被配置为获取点云中的当前点对应的颜色分量的属性预测值;The second acquiring part 20 is configured to acquire the attribute prediction value of the color component corresponding to the current point in the point cloud;
第二确定部分21,被配置为基于所述属性预测值,确定所述当前点对应的颜色分量的标准值;确定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;基于所述至少两个差异度,确定颜色分量的预测模式;The second determining part 21 is configured to determine the standard value of the color component corresponding to the current point based on the attribute prediction value; determine the difference between the at least two color components corresponding to the current point and the standard value at least two degrees of difference; based on the at least two degrees of difference, determining a prediction mode of the color component;
预测部分22,被配置为基于所述预测模式、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。The prediction part 22 is configured to perform secondary prediction on the color component of the current point based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value to obtain the attribute residual value of the color component.
在本申请的一些实施例中,所述属性预测值包括:第一颜色分量的第一属性预测值、第二颜色分量的第二属性预测值和第三颜色分量的第三属性预测值;In some embodiments of the present application, the property prediction value includes: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component;
所述第二确定部分21,还被配置为以下至少一种:The second determining part 21 is further configured as at least one of the following:
对所述第一属性预测值、所述第二属性预测值和所述第三属性预测值进行平均,确定所述标准值;averaging the first attribute predicted value, the second attribute predicted value and the third attribute predicted value to determine the standard value;
确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最大值为所述标准值;determining the maximum value of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value as the standard value;
确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最小值为所述标准值;determining that the minimum of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value is the standard value;
确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值的中值为所述标准值。Determining a median value of the first attribute prediction value, the second attribute prediction value, and the third attribute prediction value as the standard value.
在本申请的一些实施例中,所述预测部分22,还被配置为基于所述属性预测值和当前点的属性信息,确定当前点对应的初始属性残差重建值;基于所述初始属性残差重建值,确定所述当前点对应的颜色分量的标准值。In some embodiments of the present application, the prediction part 22 is further configured to determine the initial attribute residual reconstruction value corresponding to the current point based on the attribute prediction value and the attribute information of the current point; based on the initial attribute residual The difference reconstruction value determines the standard value of the color component corresponding to the current point.
在本申请的一些实施例中,所述预测部分22,还被配置为基于所述属性预测值和当前点的属性信息,确定当前点对应的初始残差值;对所述初始残差值进行量化和反量化,得到所述初始属性残差重建值。In some embodiments of the present application, the prediction part 22 is further configured to determine an initial residual value corresponding to the current point based on the predicted attribute value and the attribute information of the current point; Quantization and inverse quantization to obtain the residual reconstruction value of the initial attribute.
在本申请的一些实施例中,所述初始属性残差重建值包括:第一颜色分量的第一初始属性残差重建值、第二颜色分量的第二初始属性残差重建值和第三颜色分量的第三属初始属性残差重建值;In some embodiments of the present application, the initial attribute residual reconstruction value includes: the first initial attribute residual reconstruction value of the first color component, the second initial attribute residual reconstruction value of the second color component, and the third color The residual reconstruction value of the third attribute of the component's initial attribute;
所述第二确定部分21,还被配置为以下至少一种:The second determining part 21 is further configured as at least one of the following:
对所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值进行平均,确定所述标准值;averaging the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value and the third initial attribute residual reconstruction value to determine the standard value;
确定所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值值中的最大值为所述标准值;determining the maximum value of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value as the standard value;
确定所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值中的最小值为所述标准值;determining that the minimum of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value is the standard value;
确定所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值的中值为所述标准值。Determine the standard value as the median of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value.
在本申请的一些实施例中,所述编码器2还包括:写入部分23;In some embodiments of the present application, the encoder 2 further includes: a writing part 23;
所述预测部分22,还被配置为生成预测模式标志位;所述预测模式标志位表征所述预测模式;The prediction part 22 is further configured to generate a prediction mode flag; the prediction mode flag represents the prediction mode;
所述写入部分23,还被配置为将所述预测模式标志位写入码流。The writing part 23 is further configured to write the prediction mode flag bit into the code stream.
在本申请的一些实施例中,所述第二确定部分21,还被配置为确定所述至少两个差异度中的最小差异度;将所述最小差异度对应的颜色分量确定为所述预测模式。In some embodiments of the present application, the second determining part 21 is further configured to determine the minimum difference degree among the at least two difference degrees; determine the color component corresponding to the minimum difference degree as the predicted model.
在本申请的一些实施例中,所述第二确定部分21,还被配置为确定所述至少两个差异度的排序结果;按照所述排序结果,确定所述预测模式。In some embodiments of the present application, the second determining part 21 is further configured to determine a ranking result of the at least two degrees of difference; and determine the prediction mode according to the ranking result.
在本申请的一些实施例中,所述预测部分22,还被配置为按照所述预测模式,将第一个待预测颜色分量的第一属性信息,与第一个待预测颜色分量的属性预测值和所述初始跨分量属性残差预测值依次相减后量化,实现二次预测,得到第一个待预测颜色分量的属性残差值;所述预测模式包括:第一个待预测颜色分量;所述第一个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中最先编解码的颜色分量;In some embodiments of the present application, the prediction part 22 is further configured to predict the first property information of the first color component to be predicted and the property prediction of the first color component to be predicted according to the prediction mode Value and the initial cross-component attribute residual prediction value are sequentially subtracted and then quantized to realize secondary prediction, and obtain the attribute residual value of the first color component to be predicted; the prediction mode includes: the first color component to be predicted ; The first color component to be predicted is the first coded color component among the first color component, the second color component and the third color component;
对所述第一个待预测颜色分量的属性残差值进行反量化后,得到所述第一个待预测颜色分量的第一个属性残差重建值;基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值;基于所述第二个跨分量属性残差预测值,对其他颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值;第二个待预测颜色分量和第三个待预测颜色分量为所述第一颜色分量、所述第二颜色分量和所述第三颜色分量中的除所述第一个待预测颜色分量外的其他颜色分量。After dequantizing the attribute residual value of the first color component to be predicted, the first attribute residual reconstruction value of the first color component to be predicted is obtained; based on the first attribute residual reconstruction value, determine the second cross-component attribute residual prediction value; based on the second cross-component attribute residual prediction value, perform secondary prediction on other color components, and obtain the second attribute residual value of the color component to be predicted and the attribute residual value of the third color component to be predicted; the second color component to be predicted and the third color component to be predicted are the first color component, the second color component and the third color component Other color components in excluding the first color component to be predicted.
在本申请的一些实施例中,所述预测部分22,还被配置为基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值;In some embodiments of the present application, the prediction part 22 is further configured to perform secondary prediction on the second color component to be predicted based on the second cross-component attribute residual prediction value to obtain the second The attribute residual value of the color component to be predicted;
对所述第二个待预测颜色分量的属性残差值进行反量化后,得到所述第二个待预测颜色分量的第二个属性残差重建值;After dequantizing the attribute residual value of the second color component to be predicted, the second attribute residual reconstruction value of the second color component to be predicted is obtained;
基于所述第二个属性残差重建值,确定第三个跨分量属性残差预测值;determining a third cross-component attribute residual prediction value based on the second attribute residual reconstruction value;
基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行二次预测,得到第三个待预测颜色分量的属性残差值。Based on the third cross-component attribute residual prediction value, a second prediction is performed on the third to-be-predicted color component to obtain an attribute residual value of the third to-be-predicted color component.
在本申请的一些实施例中,所述预测部分22,还被配置为所述对所述第一个待预测颜色分量的属性残差值进行反量化后,得到所述第一个待预测颜色分量的第一个属性残差重建值之后,基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值和第三个跨分量属性残差预测值;基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值;基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行二次预测,得到第三个待预测颜色分量的属性残差值。In some embodiments of the present application, the prediction part 22 is further configured to obtain the first color to be predicted after dequantizing the attribute residual value of the first color component to be predicted. After the first attribute residual reconstruction value of the component, based on the first attribute residual reconstruction value, the second cross-component attribute residual prediction value and the third cross-component attribute residual prediction value are determined; based on the The second cross-component attribute residual prediction value performs secondary prediction on the second to-be-predicted color component to obtain the attribute residual value of the second to-be-predicted color component; based on the third cross-component attribute residual prediction value, perform secondary prediction on the third color component to be predicted, and obtain the attribute residual value of the third color component to be predicted.
在本申请的一些实施例中,所述第二个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the second cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
在本申请的一些实施例中,所述第三个跨分量属性残差预测值,为所述第二个属性残差重建值和所述第二个跨分量属性残差预测值之和,或者,为所述第二个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or , the multiple or divisor of the reconstruction value for the second attribute residual.
在本申请的一些实施例中,所述第三个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。In some embodiments of the present application, the third cross-component attribute residual prediction value is the sum of the first cross-component attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or, The multiple or divisor of the reconstruction value for the first attribute residual.
在本申请的一些实施例中,所述编码器2还包括:写入部分23;In some embodiments of the present application, the encoder 2 further includes: a writing part 23;
所述写入部分23,还被配置为将所述颜色分量的属性残差值写入码流。The writing part 23 is further configured to write the property residual value of the color component into the code stream.
在本申请的一些实施例中,所述颜色分量的属性残差值包括:所述第一个待预测颜色分量的属性残差值、所述第二个待预测颜色分量的属性残差和所述第三个待预测颜色分量的属性残差值。In some embodiments of the present application, the attribute residual value of the color component includes: the attribute residual value of the first color component to be predicted, the attribute residual value of the second color component to be predicted, and the Describe the attribute residual value of the third color component to be predicted.
可以理解的是,由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的二次预测时,得到的颜色分量的属性重建值的准确度较高。It can be understood that since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the second prediction of the color component of the current point is performed according to the prediction mode, the obtained color component The accuracy of attribute reconstruction values is high.
在实际应用中,如图15所示,本申请实施例还提供了一种编码器,包括:In practical applications, as shown in Figure 15, the embodiment of the present application also provides an encoder, including:
第二存储器25和第二处理器24;a second memory 25 and a second processor 24;
所述第二存储器25存储有可在第二处理器24上运行的计算机程序,所述第二处理器24执行所述程序时编码器对应的编码方法。The second memory 25 stores a computer program that can run on the second processor 24, and the second processor 24 executes the encoding method corresponding to the encoder when executing the program.
本申请实施例提供了一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现权利要求解码器对应的所述解码方法;或者,该计算机程序被第二处理器执行时,实现权利要求编码器对应的所述编码方法。The embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by the first processor, the decoding method corresponding to the claim decoder is realized; or, the computer program is processed by the second processor. When the encoder is executed, the encoding method corresponding to the encoder of the claim is realized.
在本申请实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可 以采用软件功能模块的形式实现。Each component in the embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory)等各种可以存储程序代码的介质,本公开实施例不作限制。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or It is said that the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: magnetic random access memory (FRAM, ferromagnetic random access memory), read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable Programmable Read-Only Memory (EPROM, Erasable Programmable Read-Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Flash Memory (Flash Memory), Magnetic Surface Memory, Optical Disk , or compact disc read-only memory (CD-ROM, Compact Disc Read-Only Memory) and other media that can store program codes, the embodiments of the present disclosure are not limited.
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only the embodiment of the present application, but the scope of protection of the present application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, and should covered within the scope of protection of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
工业实用性Industrial Applicability
本申请实施例提供了一种解码方法、编码方法、解码器、编码器及存储介质,通过解析码流,确定当前点对应的颜色分量的属性残差值;获取当前点对应的颜色分量的属性预测值;确定当前点的颜色分量的预测模式;其中,预测模式是基于颜色分量之间的差异度来确定的;基于预测模式、属性残差值、属性预测值和初始跨分量属性残差预测值,对当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。由于可以基于颜色分量之间的差异度来进行预测模式的自适应性的选取,因此,在依据预测模式来进行当前点的颜色分量的解码重建时,得到的颜色分量的属性重建值的准确度较高。The embodiment of the present application provides a decoding method, an encoding method, a decoder, an encoder, and a storage medium. By analyzing the code stream, determine the attribute residual value of the color component corresponding to the current point; obtain the attribute of the color component corresponding to the current point Prediction value; determine the prediction mode of the color component of the current point; where the prediction mode is determined based on the degree of difference between the color components; based on the prediction mode, attribute residual value, attribute prediction value and initial cross-component attribute residual prediction Value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component. Since the adaptive selection of the prediction mode can be performed based on the degree of difference between the color components, when the decoding and reconstruction of the color component of the current point is performed according to the prediction mode, the accuracy of the attribute reconstruction value of the obtained color component higher.

Claims (36)

  1. 一种解码方法,应用于解码器,包括:A decoding method, applied to a decoder, comprising:
    解析码流,确定当前点对应的颜色分量的属性残差值;Analyze the code stream to determine the attribute residual value of the color component corresponding to the current point;
    获取所述当前点对应的颜色分量的属性预测值;Acquiring the attribute prediction value of the color component corresponding to the current point;
    确定当前点的颜色分量的预测模式;其中,所述预测模式是基于颜色分量之间的差异度来确定的;Determine the prediction mode of the color component of the current point; wherein, the prediction mode is determined based on the degree of difference between the color components;
    基于所述预测模式、所述属性残差值、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。Based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, decode and reconstruct the color component of the current point to obtain the attribute reconstruction value of the color component.
  2. 根据权利要求1所述的方法,其中,所述确定当前点的颜色分量的预测模式,包括:The method according to claim 1, wherein said determining the prediction mode of the color component of the current point comprises:
    在解析码流时,解析出预测模式标志位;When parsing the code stream, parse out the prediction mode flag;
    根据所述预测模式标志位,确定所述当前点的颜色分量的所述预测模式。Determine the prediction mode of the color component of the current point according to the prediction mode flag bit.
  3. 根据权利要求1所述的方法,其中,所述确定当前点的颜色分量的预测模式,包括:The method according to claim 1, wherein said determining the prediction mode of the color component of the current point comprises:
    基于属性预测值,确定所述当前点对应的颜色分量的标准值;Determine a standard value of the color component corresponding to the current point based on the attribute prediction value;
    确定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;determining at least two degrees of difference between at least two color components corresponding to the current point and the standard value;
    基于所述至少两个差异度,确定所述当前点的颜色分量的所述预测模式。Based on the at least two degrees of difference, the prediction mode of the color component of the current point is determined.
  4. 根据权利要求3所述的方法,其中,所述基于所述至少两个差异度,确定颜色分量的所述预测模式,包括:The method according to claim 3, wherein the determining the prediction mode of the color component based on the at least two degrees of difference comprises:
    确定所述至少两个差异度中的最小差异度;determining a minimum degree of difference of the at least two degrees of difference;
    将所述最小差异度对应的颜色分量确定为所述预测模式。The color component corresponding to the minimum degree of difference is determined as the prediction mode.
  5. 根据权利要求3所述的方法,其中,所述基于所述至少两个差异度,确定颜色分量的所述预测模式,包括:The method according to claim 3, wherein the determining the prediction mode of the color component based on the at least two degrees of difference comprises:
    确定所述至少两个差异度的排序结果;determining a ranking result of the at least two degrees of difference;
    按照所述排序结果,确定所述预测模式。According to the ranking result, the prediction mode is determined.
  6. 根据权利要求3至5任一项所述的方法,其中,所述属性预测值包括:第一颜色分量的第一属性预测值、第二颜色分量的第二属性预测值和第三颜色分量的第三属性预测值;The method according to any one of claims 3 to 5, wherein the property prediction value comprises: a first property prediction value of the first color component, a second property prediction value of the second color component and a third color component The predicted value of the third attribute;
    所述基于属性预测值,确定所述当前点对应的颜色分量的标准值,包括以下至少一种:The determining the standard value of the color component corresponding to the current point based on the attribute prediction value includes at least one of the following:
    对所述第一属性预测值、所述第二属性预测值和所述第三属性预测值进行平均,确定所述标准值;averaging the first attribute predicted value, the second attribute predicted value and the third attribute predicted value to determine the standard value;
    确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最大值为所述标准值;determining the maximum value of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value as the standard value;
    确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最小值为所述标准值;determining that the minimum of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value is the standard value;
    确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值的中值为所述标准值。Determining a median value of the first attribute prediction value, the second attribute prediction value, and the third attribute prediction value as the standard value.
  7. 根据权利要求1-5任一项所述的方法,其中,The method according to any one of claims 1-5, wherein,
    所述预测模式包括:第一个待预测颜色分量;所述第一个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中最先编解码的颜色分量。The prediction mode includes: a first color component to be predicted; the first color component to be predicted is the first coded color component among the first color component, the second color component and the third color component.
  8. 根据权利要求1-7任一项所述的方法,其中,所述基于所述预测模式、所述属性残差值、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行解码重建,得到颜色分量的属性重建值,包括:The method according to any one of claims 1-7, wherein the current The color component of the point is decoded and reconstructed to obtain the attribute reconstruction value of the color component, including:
    按照所述预测模式,基于第一个待预测颜色分量的属性残差值,确定第一个待预测颜色分量的第一个属性残差重建值;其中,所述第一个待预测颜色分量为所述预测模式表征的颜色分量;According to the prediction mode, based on the attribute residual value of the first color component to be predicted, the first attribute residual reconstruction value of the first color component to be predicted is determined; wherein, the first color component to be predicted is a color component characterized by the prediction mode;
    基于所述属性预测值、所述第一个属性残差重建值和所述初始跨分量属性残差预测值对所述当前点的颜色分量进行解码重建,得到颜色分量的所述属性重建值。Decoding and reconstructing the color component of the current point based on the attribute prediction value, the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, to obtain the attribute reconstruction value of the color component.
  9. 根据权利要求8所述的方法,其中,所述按照所述预测模式,基于第一个待预测颜色分量的属性残差值,确定第一个待预测颜色分量的第一个属性残差重建值,包括:The method according to claim 8, wherein, according to the prediction mode, based on the attribute residual value of the first color component to be predicted, the first reconstructed value of the attribute residual of the first color component to be predicted is determined ,include:
    按照所述预测模式,对所述第一个待预测颜色分量的属性残差值进行反量化,确定所述第一个待预测颜色分量的所述第一个属性残差重建值。According to the prediction mode, inverse quantization is performed on the attribute residual value of the first to-be-predicted color component, and the first reconstructed attribute value of the first to-be-predicted color component is determined.
  10. 根据权利要求8或9所述的方法,其中,所述属性重建值包括:第一个属性重建值、第二个属性重建值和第三个属性重建值;The method according to claim 8 or 9, wherein the attribute reconstruction value comprises: a first attribute reconstruction value, a second attribute reconstruction value and a third attribute reconstruction value;
    所述基于所述属性预测值、所述第一个属性残差重建值和所述初始跨分量属性残差预测值对所述当前点的颜色分量进行解码重建,得到颜色分量的所述属性重建值,包括:Decoding and reconstructing the color component of the current point based on the attribute prediction value, the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, to obtain the attribute reconstruction of the color component values, including:
    将所述初始跨分量属性残差预测值,与第一个待预测颜色分量对应的属性预测值和第一个属性残差重建值相加,得到所述第一个待预测颜色分量的所述第一个属性重建值;Adding the initial cross-component attribute residual prediction value, the attribute prediction value corresponding to the first color component to be predicted, and the first attribute residual reconstruction value to obtain the first color component to be predicted The first attribute rebuilds the value;
    基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值;determining a second cross-component attribute residual prediction value based on the first attribute residual reconstruction value;
    基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量和第三个待预测颜色分量进行解码重建,得到所述第二个属性重建值和所述第三个属性重建值;所述第二个待预测颜色分量和所述第三个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中的除所述第一个待预测颜色分量外的其他颜色分量。Based on the second cross-component attribute residual prediction value, decode and reconstruct the second to-be-predicted color component and the third to-be-predicted color component to obtain the second attribute reconstruction value and the third attribute Reconstruction value; the second color component to be predicted and the third color component to be predicted are the first color component, the second color component and the third color component except the first color component to be predicted other color components.
  11. 根据权利要求10所述的方法,其中,所述基于所述第二个跨分量属性残差预测值,对其他颜色分量进行解码重建,得到所述第二个属性重建值和所述第三个属性重建值,包括:The method according to claim 10, wherein, based on the second cross-component attribute residual prediction value, decode and reconstruct other color components to obtain the second attribute reconstruction value and the third Attribute reconstruction values, including:
    基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行解码重建,得到所述第二个属性重建值;Decoding and reconstructing a second to-be-predicted color component based on the second cross-component attribute residual prediction value to obtain the second attribute reconstruction value;
    基于所述第二个属性残差重建值,确定第三个跨分量属性残差预测值;determining a third cross-component attribute residual prediction value based on the second attribute residual reconstruction value;
    基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行解码重建,得到所述第三个属性重建值。Based on the third cross-component attribute residual prediction value, decode and reconstruct a third to-be-predicted color component to obtain the third attribute reconstruction value.
  12. 根据权利要求10所述的方法,其中,所述将所述初始跨分量属性残差预测值,与第一个待预测颜色分量对应的属性预测值和第一个属性残差重建值相加,得到所述第一个待预测颜色分量的所述第一个属性重建值之后,所述方法还包括:The method according to claim 10, wherein said adding the initial cross-component attribute residual prediction value to the attribute prediction value corresponding to the first color component to be predicted and the first attribute residual reconstruction value, After obtaining the first attribute reconstruction value of the first color component to be predicted, the method further includes:
    基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值和第三个跨分量属性残差预测值;determining a second cross-component attribute residual prediction value and a third cross-component attribute residual prediction value based on the first attribute residual reconstruction value;
    基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行解码重建,得到第二个属性重建值;Based on the second cross-component attribute residual prediction value, decode and reconstruct the second color component to be predicted to obtain a second attribute reconstruction value;
    基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行解码重建,得到第三个属性重建值。Based on the third cross-component attribute residual prediction value, the third to-be-predicted color component is decoded and reconstructed to obtain a third attribute reconstruction value.
  13. 根据权利要求10至12任一项所述的方法,其中,A method according to any one of claims 10 to 12, wherein,
    所述第二个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。The second cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual The multiple or divisor of the reconstruction value.
  14. 根据权利要求11所述的方法,其中,The method of claim 11, wherein,
    所述第三个跨分量属性残差预测值,为所述第二个属性残差重建值和所述第二个跨分量属性残差预测值之和,或者,为所述第二个属性残差重建值的倍数或除数。The third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or is the second attribute residual Multiplier or divisor of the difference reconstruction value.
  15. 根据权利要求12所述的方法,其中,The method of claim 12, wherein,
    所述第三个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。The third cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual The multiple or divisor of the reconstruction value.
  16. 一种编码方法,应用于编码器,包括:An encoding method, applied to an encoder, comprising:
    获取点云中的当前点对应的颜色分量的属性预测值;Get the attribute prediction value of the color component corresponding to the current point in the point cloud;
    基于所述属性预测值,确定所述当前点对应的颜色分量的标准值;Based on the attribute prediction value, determine a standard value of the color component corresponding to the current point;
    确定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;determining at least two degrees of difference between at least two color components corresponding to the current point and the standard value;
    基于所述至少两个差异度,确定颜色分量的预测模式;determining a prediction mode for the color component based on the at least two degrees of difference;
    基于所述预测模式、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。Based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, the color component of the current point is predicted twice to obtain the attribute residual value of the color component.
  17. 根据权利要求16所述的方法,其中,所述属性预测值包括:第一颜色分量的第一属性预测值、第二颜色分量的第二属性预测值和第三颜色分量的第三属性预测值;The method according to claim 16, wherein the property prediction value comprises: a first property prediction value of the first color component, a second property prediction value of the second color component, and a third property prediction value of the third color component ;
    所述基于所述属性预测值,确定所述当前点对应的颜色分量的标准值,包括以下至少一种:The determining the standard value of the color component corresponding to the current point based on the attribute prediction value includes at least one of the following:
    对所述第一属性预测值、所述第二属性预测值和所述第三属性预测值进行平均,确定所述标准值;averaging the first attribute predicted value, the second attribute predicted value and the third attribute predicted value to determine the standard value;
    确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最大值为所述标准值;determining the maximum value of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value as the standard value;
    确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值中的最小值为所述标准值;determining that the minimum of the first attribute predicted value, the second attribute predicted value, and the third attribute predicted value is the standard value;
    确定所述第一属性预测值、所述第二属性预测值和所述第三属性预测值的中值为所述标准值。Determining a median value of the first attribute prediction value, the second attribute prediction value, and the third attribute prediction value as the standard value.
  18. 根据权利要求16所述的方法,其中,所述基于所述属性预测值,确定所述当前点对应的颜色分量的标准值,包括:The method according to claim 16, wherein said determining the standard value of the color component corresponding to the current point based on the attribute prediction value comprises:
    基于所述属性预测值和当前点的属性信息,确定当前点对应的初始属性残差重建值;Based on the attribute prediction value and the attribute information of the current point, determine the initial attribute residual reconstruction value corresponding to the current point;
    基于所述初始属性残差重建值,确定所述当前点对应的颜色分量的标准值。Based on the initial attribute residual reconstruction value, determine a standard value of the color component corresponding to the current point.
  19. 根据权利要求18所述的方法,其中,所述基于所述属性预测值和当前点的属性信息,确定当前点对应的初始属性残差重建值,包括:The method according to claim 18, wherein said determining the initial attribute residual reconstruction value corresponding to the current point based on the attribute prediction value and the attribute information of the current point comprises:
    基于所述属性预测值和当前点的属性信息,确定当前点对应的初始残差值;Determining an initial residual value corresponding to the current point based on the attribute prediction value and the attribute information of the current point;
    对所述初始残差值进行量化和反量化,得到所述初始属性残差重建值。Quantization and inverse quantization are performed on the initial residual value to obtain the residual reconstruction value of the initial attribute.
  20. 根据权利要求17或18所述的方法,其中,所述初始属性残差重建值包括:第一颜色分量的第一初始属性残差重建值、第二颜色分量的第二初始属性残差重建值和第三颜色分量的第三属初始属性残差重建值;The method according to claim 17 or 18, wherein the initial attribute residual reconstruction value comprises: a first initial attribute residual reconstruction value of the first color component, a second initial attribute residual reconstruction value of the second color component and the third initial attribute residual reconstruction value of the third color component;
    所述基于所述初始属性残差重建值,确定所述当前点对应的颜色分量的标准值,包括以下至少一种:The determining the standard value of the color component corresponding to the current point based on the reconstruction value of the initial attribute residual includes at least one of the following:
    对所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值进行平均,确定所述标准值;averaging the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value and the third initial attribute residual reconstruction value to determine the standard value;
    确定所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值值中的最大值为所述标准值;determining the maximum value of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value as the standard value;
    确定所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值中的最小值为所述标准值;determining that the minimum of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value is the standard value;
    确定所述第一初始属性残差重建值、所述第二初始属性残差重建值和所述第三初始属性残差重建值的中值为所述标准值。Determine the standard value as the median of the first initial attribute residual reconstruction value, the second initial attribute residual reconstruction value, and the third initial attribute residual reconstruction value.
  21. 根据权利要求18-20任一项所述的方法,其中,所述基于所述至少两个差异度,确定颜色分量的预测模式时,所述方法还包括:The method according to any one of claims 18-20, wherein, when determining the prediction mode of the color component based on the at least two degrees of difference, the method further comprises:
    生成预测模式标志位,写入码流;所述预测模式标志位表征所述预测模式。Generate a prediction mode flag and write it into the code stream; the prediction mode flag represents the prediction mode.
  22. 根据权利要求16所述的方法,其中,所述基于所述至少两个差异度,确定颜色分量的所述预测模式,包括:The method according to claim 16, wherein said determining said prediction mode of a color component based on said at least two degrees of difference comprises:
    确定所述至少两个差异度中的最小差异度;determining a minimum degree of difference of the at least two degrees of difference;
    将所述最小差异度对应的颜色分量确定为所述预测模式。The color component corresponding to the minimum degree of difference is determined as the prediction mode.
  23. 根据权利要求16所述的方法,其中,所述基于所述至少两个差异度,确定颜色分量的所述预测模式,包括:The method according to claim 16, wherein said determining said prediction mode of a color component based on said at least two degrees of difference comprises:
    确定所述至少两个差异度的排序结果;determining a ranking result of the at least two degrees of difference;
    按照所述排序结果,确定所述预测模式。According to the ranking result, the prediction mode is determined.
  24. 根据权利要求16至23任一项所述的方法,其中,所述基于所述预测模式、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行二次预测,得到颜色分量的属性残差值,包括:The method according to any one of claims 16 to 23, wherein, based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, the color component of the current point is twice Prediction, get the attribute residual value of the color component, including:
    按照所述预测模式,将第一个待预测颜色分量的第一属性信息,与第一个待预测颜色分量的属性预测值和所述初始跨分量属性残差预测值依次相减后量化,实现二次预测,得到第一个待预测颜色分量的属性残差值;所述预测模式包括:第一个待预测颜色分量;所述第一个待预测颜色分量为第一颜色分量、第二颜色分量和第三颜色分量中最先编解码的颜色分量;According to the prediction mode, the first attribute information of the first color component to be predicted, the attribute prediction value of the first color component to be predicted and the initial cross-component attribute residual prediction value are sequentially subtracted and then quantized to realize The second prediction is to obtain the attribute residual value of the first color component to be predicted; the prediction mode includes: the first color component to be predicted; the first color component to be predicted is the first color component, the second color The first coded color component among the color component and the third color component;
    对所述第一个待预测颜色分量的属性残差值进行反量化后,得到所述第一个待预测颜色分量的第一个属性残差重建值;After dequantizing the attribute residual value of the first color component to be predicted, the first attribute residual reconstruction value of the first color component to be predicted is obtained;
    基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值;determining a second cross-component attribute residual prediction value based on the first attribute residual reconstruction value;
    基于所述第二个跨分量属性残差预测值,对其他颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值;第二个待预测颜色分量和第三个待预测颜色分量为所述第一颜色分量、所述第二颜色分量和所述第三颜色分量中的除所述第一个待预测颜色分量外的其他颜色分量。Based on the second cross-component attribute residual prediction value, perform secondary prediction on other color components to obtain the attribute residual value of the second to-be-predicted color component and the attribute residual value of the third to-be-predicted color component; The second color component to be predicted and the third color component to be predicted are the first color component, the second color component and the third color component except the first color component to be predicted Additional color components.
  25. 根据权利要求24所述的方法,其中,所述基于所述第二个跨分量属性残差预测值,对其他颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值和第三个待预测颜色分量的属性残差值,包括:The method according to claim 24, wherein, based on the second cross-component attribute residual prediction value, the second prediction is performed on other color components to obtain the attribute residual value and the second color component to be predicted. The attribute residual value of the third color component to be predicted, including:
    基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值;Based on the second cross-component attribute residual prediction value, performing secondary prediction on the second to-be-predicted color component to obtain the attribute residual value of the second to-be-predicted color component;
    对所述第二个待预测颜色分量的属性残差值进行反量化后,得到所述第二个待预测颜色分量的第二个属性残差重建值;After dequantizing the attribute residual value of the second color component to be predicted, the second attribute residual reconstruction value of the second color component to be predicted is obtained;
    基于所述第二个属性残差重建值,确定第三个跨分量属性残差预测值;determining a third cross-component attribute residual prediction value based on the second attribute residual reconstruction value;
    基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行二次预测,得到第三个待预测颜色分量的属性残差值。Based on the third cross-component attribute residual prediction value, a second prediction is performed on the third to-be-predicted color component to obtain an attribute residual value of the third to-be-predicted color component.
  26. 根据权利要求24所述的方法,其中,所述对所述第一个待预测颜色分量的属性残差值进行反量化后,得到所述第一个待预测颜色分量的第一个属性残差重建值之后,所述方法还包括:The method according to claim 24, wherein after dequantizing the attribute residual value of the first color component to be predicted, the first attribute residual value of the first color component to be predicted is obtained After reconstructing the values, the method also includes:
    基于所述第一个属性残差重建值,确定第二个跨分量属性残差预测值和第三个跨分量属性残差预测值;determining a second cross-component attribute residual prediction value and a third cross-component attribute residual prediction value based on the first attribute residual reconstruction value;
    基于所述第二个跨分量属性残差预测值,对第二个待预测颜色分量进行二次预测,得到第二个待预测颜色分量的属性残差值;Based on the second cross-component attribute residual prediction value, performing secondary prediction on the second to-be-predicted color component to obtain the attribute residual value of the second to-be-predicted color component;
    基于所述第三个跨分量属性残差预测值,对第三个待预测颜色分量进行二次预测,得到第三个待预测颜色分量的属性残差值。Based on the third cross-component attribute residual prediction value, a second prediction is performed on the third to-be-predicted color component to obtain an attribute residual value of the third to-be-predicted color component.
  27. 根据权利要求24至26任一项所述的方法,其中,A method according to any one of claims 24 to 26, wherein,
    所述第二个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。The second cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual The multiple or divisor of the reconstruction value.
  28. 根据权利要求25所述的方法,其中,The method of claim 25, wherein,
    所述第三个跨分量属性残差预测值,为所述第二个属性残差重建值和所述第二个跨分量属性残差预测值之和,或者,为所述第二个属性残差重建值的倍数或除数。The third cross-component attribute residual prediction value is the sum of the second attribute residual reconstruction value and the second cross-component attribute residual prediction value, or is the second attribute residual Multiplier or divisor of the difference reconstruction value.
  29. 根据权利要求26所述的方法,其中,The method of claim 26, wherein,
    所述第三个跨分量属性残差预测值,为所述第一个属性残差重建值和所述初始跨分量属性残差预测值发之和,或者,为所述第一个属性残差重建值的倍数或除数。The third cross-component attribute residual prediction value is the sum of the first attribute residual reconstruction value and the initial cross-component attribute residual prediction value, or is the first attribute residual The multiple or divisor of the reconstruction value.
  30. 根据权利要求20所述的方法,其中,所述方法还包括:The method according to claim 20, wherein said method further comprises:
    将所述颜色分量的属性残差值写入码流。Write the attribute residual value of the color component into the code stream.
  31. 根据权利要求24至26任一项所述的方法,其中,A method according to any one of claims 24 to 26, wherein,
    所述颜色分量的属性残差值包括:所述第一个待预测颜色分量的属性残差值、所述第二个待预测颜色分量的属性残差和所述第三个待预测颜色分量的属性残差值。The property residual value of the color component includes: the property residual value of the first color component to be predicted, the property residual value of the second color component to be predicted, and the property residual value of the third color component to be predicted Attribute residual value.
  32. 一种解码器,包括:A decoder comprising:
    解析部分,被配置为解析码流,确定当前点对应的颜色分量的属性残差值;The parsing part is configured to parse the code stream and determine the attribute residual value of the color component corresponding to the current point;
    第一获取部分,被配置为获取所述当前点对应的颜色分量的属性预测值;The first acquisition part is configured to acquire the attribute prediction value of the color component corresponding to the current point;
    第一确定部分,被配置为确定当前点的颜色分量的预测模式;其中,所述预测模式是基于颜色分量之间的差异度来确定的;The first determining part is configured to determine a prediction mode of the color component of the current point; wherein the prediction mode is determined based on the degree of difference between the color components;
    解码部分,被配置为基于所述预测模式、所述属性残差值、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行解码重建,得到颜色分量的属性重建值。The decoding part is configured to decode and reconstruct the color component of the current point based on the prediction mode, the attribute residual value, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the color component Property reconstruction value.
  33. 一种编码器,包括:An encoder comprising:
    第二获取部分,被配置为获取点云中的当前点对应的颜色分量的属性预测值;The second acquisition part is configured to acquire the attribute prediction value of the color component corresponding to the current point in the point cloud;
    第二确定部分,被配置为基于所述属性预测值,确定所述当前点对应的颜色分量的标准值;确定所述当前点对应的至少两个颜色分量,与所述标准值之间的至少两个差异度;基于所述至少两个差异度,确定颜色分量的预测模式;The second determination part is configured to determine a standard value of the color component corresponding to the current point based on the attribute prediction value; determine at least two color components corresponding to the current point, and at least the standard value two degrees of difference; based on the at least two degrees of difference, determining a prediction mode of the color component;
    预测部分,被配置为基于所述预测模式、所述属性预测值和初始跨分量属性残差预测值,对所述当前点的颜色分量进行二次预测,得到颜色分量的属性残差值。The prediction part is configured to perform secondary prediction on the color component of the current point based on the prediction mode, the attribute prediction value and the initial cross-component attribute residual prediction value, to obtain the attribute residual value of the color component.
  34. 一种解码器,包括:A decoder comprising:
    第一存储器和第一处理器;a first memory and a first processor;
    所述第一存储器存储有可在第一处理器上运行的计算机程序,所述第一处理器执行所述程序时实现权利要求1至15任一项所述的方法。The first memory stores a computer program that can run on the first processor, and the first processor implements the method according to any one of claims 1 to 15 when executing the program.
  35. 一种编码器,包括:An encoder comprising:
    第二存储器和第二处理器;a second memory and a second processor;
    所述第二存储器存储有可在第二处理器上运行的计算机程序,所述第二处理器执行所述程序时实现权利要求16至31任一项所述的方法。The second memory stores a computer program executable on the second processor, and the second processor implements the method according to any one of claims 16 to 31 when executing the program.
  36. 一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现权利要求1至15任一项所述的法;或者,该计算机程序被第二处理器执行时,实现权利要求16至31任一 项所述的方法。A storage medium, on which a computer program is stored. When the computer program is executed by the first processor, the method according to any one of claims 1 to 15 is realized; or, when the computer program is executed by the second processor, Implementing the method of any one of claims 16 to 31.
PCT/CN2021/143372 2021-12-30 2021-12-30 Decoding method, encoding method, decoder, encoder, and storage medium WO2023123284A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/143372 WO2023123284A1 (en) 2021-12-30 2021-12-30 Decoding method, encoding method, decoder, encoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/143372 WO2023123284A1 (en) 2021-12-30 2021-12-30 Decoding method, encoding method, decoder, encoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2023123284A1 true WO2023123284A1 (en) 2023-07-06

Family

ID=86997081

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143372 WO2023123284A1 (en) 2021-12-30 2021-12-30 Decoding method, encoding method, decoder, encoder, and storage medium

Country Status (1)

Country Link
WO (1) WO2023123284A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385555A (en) * 2018-12-28 2020-07-07 上海天荷电子信息有限公司 Data compression method and device for inter-component prediction of original and/or residual data
US20210385303A1 (en) * 2020-06-09 2021-12-09 Qualcomm Incorporated Attribute residual coding in g-pcc
CN113795870A (en) * 2019-10-10 2021-12-14 腾讯美国有限责任公司 Techniques and apparatus for inter-channel prediction and transformation for point cloud attribute coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385555A (en) * 2018-12-28 2020-07-07 上海天荷电子信息有限公司 Data compression method and device for inter-component prediction of original and/or residual data
CN113795870A (en) * 2019-10-10 2021-12-14 腾讯美国有限责任公司 Techniques and apparatus for inter-channel prediction and transformation for point cloud attribute coding
US20210385303A1 (en) * 2020-06-09 2021-12-09 Qualcomm Incorporated Attribute residual coding in g-pcc

Similar Documents

Publication Publication Date Title
US11803986B2 (en) Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method
US11711535B2 (en) Video-based point cloud compression model to world signaling information
US11483363B2 (en) Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method
US11190803B2 (en) Point cloud coding using homography transform
EP4258671A1 (en) Point cloud attribute predicting method, encoder, decoder, and storage medium
WO2023123284A1 (en) Decoding method, encoding method, decoder, encoder, and storage medium
WO2023015530A1 (en) Point cloud encoding and decoding methods, encoder, decoder, and computer readable storage medium
KR20230060534A (en) Point cloud encoding and decoding method and apparatus based on two-dimensional normalized plane projection
WO2022141461A1 (en) Point cloud encoding and decoding method, encoder, decoder and computer storage medium
WO2022257145A1 (en) Point cloud attribute prediction method and apparatus, and codec
WO2023097694A1 (en) Decoding method, encoding method, decoder, and encoder
WO2023023918A1 (en) Decoding method, encoding method, decoder and encoder
WO2022257155A1 (en) Decoding method, encoding method, decoder, encoder, encoding device and decoding device
WO2022257143A1 (en) Intra-frame prediction method and apparatus, encoding method and apparatus, decoding method and apparatus, codec, device and medium
WO2023240455A1 (en) Point cloud encoding method and apparatus, encoding device, and storage medium
WO2023173238A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2022257150A1 (en) Point cloud encoding and decoding methods and apparatus, point cloud codec, and storage medium
WO2023173237A1 (en) Encoding method, decoding method, bit stream, encoder, decoder, and storage medium
EP4325851A1 (en) Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method
WO2024077548A1 (en) Point cloud decoding method, point cloud encoding method, decoder, and encoder
US20230412837A1 (en) Point cloud data transmission method, point cloud data transmission device, point cloud data reception method, and point cloud data reception device
WO2023197337A1 (en) Index determining method and apparatus, decoder, and encoder
WO2022217472A1 (en) Point cloud encoding and decoding methods, encoder, decoder, and computer readable storage medium
WO2024065406A1 (en) Encoding and decoding methods, bit stream, encoder, decoder, and storage medium
WO2024007144A1 (en) Encoding method, decoding method, code stream, encoders, decoders and storage medium

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: 21969641

Country of ref document: EP

Kind code of ref document: A1