WO2024026712A1 - 点云编解码方法、装置、设备及存储介质 - Google Patents

点云编解码方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2024026712A1
WO2024026712A1 PCT/CN2022/109891 CN2022109891W WO2024026712A1 WO 2024026712 A1 WO2024026712 A1 WO 2024026712A1 CN 2022109891 W CN2022109891 W CN 2022109891W WO 2024026712 A1 WO2024026712 A1 WO 2024026712A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
prediction
points
determination mode
attribute
Prior art date
Application number
PCT/CN2022/109891
Other languages
English (en)
French (fr)
Inventor
徐异凌
侯礼志
高粼遥
魏红莲
Original Assignee
上海交通大学
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海交通大学, Oppo广东移动通信有限公司 filed Critical 上海交通大学
Priority to PCT/CN2022/109891 priority Critical patent/WO2024026712A1/zh
Publication of WO2024026712A1 publication Critical patent/WO2024026712A1/zh

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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • 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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present application relates to the field of point cloud technology, and in particular to a point cloud encoding and decoding method, device, equipment and storage medium.
  • point cloud data which includes hundreds of thousands or more points.
  • point cloud data is transmitted between the point cloud encoding device and the point cloud decoding device in the form of point cloud media files.
  • point cloud encoding equipment needs to compress the point cloud data before transmitting it.
  • Point cloud coding includes geometric coding and attribute coding.
  • attribute coding process data redundancy is reduced through attribute prediction.
  • selection of reference points is not accurate enough, resulting in a low attribute prediction accuracy.
  • Embodiments of the present application provide a point cloud encoding and decoding method, device, equipment and storage medium, which improves the accuracy of reference point selection, thereby improving the accuracy of attribute prediction.
  • embodiments of the present application provide a point cloud decoding method, including:
  • the attribute reconstruction value of the current point is determined.
  • this application provides a point cloud coding method, including:
  • the attribute residual value of the current point is determined.
  • this application provides a point cloud decoding device for performing the method in the above first aspect or its respective implementations.
  • the device includes a functional unit for performing the method in the above-mentioned first aspect or its respective implementations.
  • the present application provides a point cloud encoding device for executing the method in the above second aspect or its respective implementations.
  • the device includes a functional unit for performing the method in the above-mentioned second aspect or its respective implementations.
  • the fifth aspect provides a point cloud decoder, including a processor and a memory.
  • the memory is used to store a computer program
  • the processor is used to call and run the computer program stored in the memory to execute the method in the above first aspect or its respective implementations.
  • a sixth aspect provides a point cloud encoder, including a processor and a memory.
  • the memory is used to store a computer program
  • the processor is used to call and run the computer program stored in the memory to execute the method in the above second aspect or its respective implementations.
  • a point cloud encoding and decoding system including a point cloud encoder and a point cloud decoder.
  • the point cloud decoder is used to perform the method in the above-mentioned first aspect or its various implementations, and the point cloud encoder is used to perform the method in the above-mentioned second aspect or its various implementations.
  • An eighth aspect provides a chip for implementing any one of the above-mentioned first to second aspects or the method in each implementation manner thereof.
  • the chip includes: a processor, configured to call and run a computer program from a memory, so that the device installed with the chip executes any one of the above-mentioned first to second aspects or implementations thereof. method.
  • a ninth aspect provides a computer-readable storage medium for storing a computer program that causes a computer to execute any one of the above-mentioned first to second aspects or the method in each implementation thereof.
  • a computer program product including computer program instructions, which enable a computer to execute any one of the above-mentioned first to second aspects or the methods in each implementation thereof.
  • An eleventh aspect provides a computer program that, when run on a computer, causes the computer to execute any one of the above-mentioned first to second aspects or the method in each implementation thereof.
  • a twelfth aspect provides a code stream.
  • the code stream is generated based on the method of the second aspect.
  • the code stream includes at least one of a first parameter and a second parameter.
  • the classification information is used to indicate the category to which the point belongs; according to the classification information and distance At least one of the information, determine K reference points of the current point from the decoded points, K is a positive integer; determine the attribute prediction value of the current point based on the attribute information of the K reference points; determine the attribute prediction value of the current point based on the attribute prediction value of the current point, Determine the attribute reconstruction value of the current point.
  • the embodiment of the present application not only considers the distance information, but also considers the classification information, thereby improving the accuracy of determining the reference point. Based on the accurately determined When using reference points for attribute prediction, the accuracy of attribute prediction can be improved.
  • Figure 1 is a schematic block diagram of a point cloud encoding and decoding system involved in an embodiment of the present application
  • Figure 2 is a schematic block diagram of a point cloud encoder provided by an embodiment of the present application.
  • Figure 3 is a schematic block diagram of a point cloud decoder provided by an embodiment of the present application.
  • Figure 4 is a schematic flow chart of a point cloud decoding method provided by an embodiment of the present application.
  • Figure 5 is a point cloud histogram related to the embodiment of the present application.
  • Figure 6 is a schematic flow chart of a point cloud encoding method provided by an embodiment of the present application.
  • Figure 7 is a schematic block diagram of a point cloud decoding device provided by an embodiment of the present application.
  • Figure 8 is a schematic block diagram of a point cloud encoding device provided by an embodiment of the present application.
  • Figure 9 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • Figure 10 is a schematic block diagram of a point cloud encoding and decoding system provided by an embodiment of the present application.
  • This application can be applied to the field of point cloud upsampling technology, for example, can be applied to the field of point cloud compression technology.
  • Point Cloud refers to a set of discrete points randomly distributed in space that express the spatial structure and surface properties of a three-dimensional object or scene.
  • Point Cloud Data is a specific record form of point cloud.
  • Points in point cloud can include point location information and point attribute information.
  • the position information of the point may be the three-dimensional coordinate information of the point.
  • the position information of a point can also be called the geometric information of the point.
  • point attribute information may include color information, reflectance information, normal vector information, and so on.
  • the color information may be information in any color space.
  • the color information may be (RGB).
  • the color information may be brightness and chromaticity (YcbCr, YUV) information.
  • Y represents brightness (Luma)
  • Cb(U) represents blue color difference
  • Cr(V) represents red
  • U and V represent chroma (Chroma), which is used to describe color difference information.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the laser reflection intensity (reflectance) of the point.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the color information of the point.
  • a point cloud is obtained by combining the principles of laser measurement and photogrammetry.
  • the points in the point cloud may include the three-dimensional coordinate information of the point, the laser reflection intensity (reflectance) of the point, and the color information of the point.
  • the ways to obtain point cloud data may include but are not limited to at least one of the following: (1) Generated by computer equipment.
  • the computer device can generate point cloud data based on virtual three-dimensional objects and virtual three-dimensional scenes.
  • Point cloud data of static real-world three-dimensional objects or three-dimensional scenes can be obtained through 3D laser scanning, and millions of point cloud data can be obtained per second;
  • Real-world visual scenes are collected through 3D photography equipment (i.e., a set of cameras or camera equipment with multiple lenses and sensors) to obtain point cloud data of real-world visual scenes.
  • Dynamic real-world three-dimensional objects can be obtained through 3D photography.
  • Point clouds can be divided into dense point clouds and sparse point clouds according to the way they are obtained.
  • Point clouds are divided into: according to the time series type of data:
  • the first type of static point cloud that is, the object is stationary and the device that obtains the point cloud is also stationary;
  • the second type of dynamic point cloud the object is moving, but the device that obtains the point cloud is stationary;
  • the third type of dynamically acquired point cloud the device that acquires the point cloud is in motion.
  • Point clouds are divided into two categories according to their uses:
  • 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 rescue and disaster relief robots;
  • Category 2 Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive communication, and three-dimensional immersive interaction.
  • point cloud is widely used in virtual reality, immersive telepresence, 3D printing and other fields.
  • 3D point clouds often have a huge number of points, and the distribution of points is disordered in space; at the same time, each point often has rich attribute information, resulting in a point cloud with a huge amount of data, which makes the point cloud Storage and transmission bring huge challenges. Therefore, point cloud compression coding technology is one of the key technologies for point cloud processing and application.
  • Figure 1 is a schematic block diagram of a point cloud encoding and decoding system related to an embodiment of the present application. It should be noted that Figure 1 is only an example, and the point cloud encoding and decoding system in the embodiment of the present application includes but is not limited to what is shown in Figure 1 .
  • the point cloud encoding and decoding system 100 includes an encoding device 110 and a decoding device 120 .
  • the encoding device is used to encode the point cloud data (which can be understood as compression) to generate a code stream, and transmit the code stream to the decoding device.
  • the decoding device decodes the code stream generated by the encoding device to obtain decoded point cloud data.
  • the encoding device 110 in the embodiment of the present application can be understood as a device with a point cloud encoding function
  • the decoding device 120 can be understood as a device with a point cloud decoding function. That is, the embodiment of the present application includes a wider range of applications for the encoding device 110 and the decoding device 120.
  • Devices including, for example, smartphones, desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, point cloud gaming consoles, vehicle-mounted computers, etc. .
  • the encoding device 110 may transmit the encoded point cloud data (such as a code stream) to the decoding device 120 via the channel 130 .
  • Channel 130 may include one or more media and/or devices capable of transmitting encoded point cloud data from encoding device 110 to decoding device 120 .
  • channel 130 includes one or more communication media that enables encoding device 110 to transmit encoded point cloud data directly to decoding device 120 in real time.
  • the encoding device 110 may modulate the encoded point cloud data according to the communication standard and transmit the modulated point cloud data to the decoding device 120 .
  • the communication media includes wireless communication media, such as radio frequency spectrum.
  • the communication media may also include wired communication media, such as one or more physical transmission lines.
  • channel 130 includes a storage medium that can store point cloud data encoded by encoding device 110 .
  • Storage media include a variety of local access data storage media, such as optical disks, DVDs, flash memories, etc.
  • the decoding device 120 may obtain the encoded point cloud data from the storage medium.
  • channel 130 may include a storage server that may store point cloud data encoded by encoding device 110 .
  • the decoding device 120 may download the stored encoded point cloud data from the storage server.
  • the storage server can store the encoded point cloud data and can transmit the encoded point cloud data to the decoding device 120, such as a web server (for example, for a website), a file transfer protocol (FTP) server, etc. .
  • FTP file transfer protocol
  • the encoding device 110 includes a point cloud encoder 112 and an output interface 113 .
  • the output interface 113 may include a modulator/demodulator (modem) and/or a transmitter.
  • the encoding device 110 may also include a point cloud source 111 in addition to the point cloud encoder 112 and the input interface 113 .
  • the point cloud source 111 may include at least one of a point cloud acquisition device (eg, a scanner), a point cloud archive, a point cloud input interface, and a computer graphics system, where the point cloud input interface is used to receive data from a point cloud content provider.
  • Point Cloud Data,Computer graphics systems are used to generate point cloud,data.
  • the point cloud encoder 112 encodes the point cloud data from the point cloud source 111 to generate a code stream.
  • the point cloud encoder 112 directly transmits the encoded point cloud data to the decoding device 120 via the output interface 113 .
  • the encoded point cloud data can also be stored in a storage medium or storage server for subsequent reading by the decoding device 120 .
  • decoding device 120 includes an input interface 121 and a point cloud decoder 122.
  • the decoding device 120 may also include a display device 123.
  • the input interface 121 includes a receiver and/or a modem. Input interface 121 may receive encoded point cloud data via channel 130 .
  • the point cloud decoder 122 is used to decode the encoded point cloud data to obtain decoded point cloud data, and transmit the decoded point cloud data to the display device 123 .
  • the display device 123 displays the decoded point cloud data.
  • Display device 123 may be integrated with decoding device 120 or external to decoding device 120 .
  • Display device 123 may include a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
  • LCD liquid crystal display
  • plasma display a plasma display
  • OLED organic light emitting diode
  • Figure 1 is only an example, and the technical solution of the embodiment of the present application is not limited to Figure 1.
  • the technology of the present application can also be applied to unilateral point cloud encoding or unilateral point cloud decoding.
  • the current point cloud encoder can use the International Standards Organization Moving Picture Experts Group (MPEG) to propose two point cloud compression encoding technology routes, namely projection-based point cloud compression (Video-based Point Cloud Compression, VPCC) and Geometry-based Point Cloud Compression (GPCC).
  • MPEG Moving Picture Experts Group
  • VPCC projects the three-dimensional point cloud into two dimensions and uses existing two-dimensional coding tools to encode the projected two-dimensional image.
  • GPCC uses a hierarchical structure to divide the point cloud into multiple units step by step, and records the divisions through coding. The process encodes the entire point cloud.
  • Figure 2 is a schematic block diagram of a point cloud encoder provided by an embodiment of the present application.
  • points in a point cloud can include point position information and point attribute information. Therefore, the coding of points in a point cloud mainly includes position coding and attribute coding.
  • the position information of the points in the point cloud is also called geometric information, and the corresponding position encoding of the points in the point cloud can also be called geometric encoding.
  • the geometric information and corresponding attribute information of the point cloud are encoded separately.
  • the process of position encoding includes: first establishing a minimum cube that surrounds all points of the point cloud, which is called a minimum bounding box. Carry out octree division of the minimum bounding box, that is, divide the bounding box into eight equal parts into eight sub-cubes, and continue to divide the non-empty sub-cubes (including points in the point cloud) into eight equal parts until the divided leaf nodes are The division stops when the unit cube is 1 ⁇ 1 ⁇ 1. During this process, an 8-bit binary number is used to encode the occupancy of the 8 sub-cubes generated by each division to generate a binary geometry bit stream, that is, a geometry code stream.
  • the points in the point cloud are preprocessed, such as coordinate transformation, quantization and removal of duplicate points, etc.; then, the preprocessed point cloud is geometrically encoded, such as constructing an octree, based on the constructed octree Perform geometric encoding to form a geometric code stream.
  • the position information of each point in the point cloud data is reconstructed to obtain the reconstructed value of the position information of each point.
  • the attribute encoding process includes: given the reconstructed information of the position information of the input point cloud and the original value of the attribute information, select one of the three prediction modes for point cloud prediction, quantify the predicted results, and perform arithmetic coding to form Attribute code stream.
  • position encoding can be implemented through the following units:
  • Coordinate transformation transformation (Tanmsform coordinates) unit 201, voxelize (Voxelize) unit 202, octree division (Analyze octree) unit 203, geometric reconstruction (Reconstruct geometry) unit 204, first arithmetic encoding (Arithmetic enconde) unit 205 and surface simulation Analyze surface approximation)206.
  • the coordinate conversion unit 201 may be used to convert world coordinates of points in the point cloud into relative coordinates. For example, the geometric coordinates of a point are subtracted from the minimum value of the xyz coordinate axis, which is equivalent to a DC removal operation to convert the coordinates of the points in the point cloud from world coordinates to relative coordinates.
  • the Voxelize unit 202 is also called the Quantize and remove points unit, which can reduce the number of coordinates through quantization; after quantization, originally different points may be assigned the same coordinates. Based on this, the The deduplication operation removes duplicate points; for example, multiple clouds with the same quantified position and different attribute information can be merged into one cloud through attribute transformation.
  • the voxel unit 202 is an optional unit module.
  • the octree dividing unit 203 may use an octree encoding method to encode the position information of the quantized points.
  • the point cloud is divided in the form of an octree, so that the position of the point can correspond to the position of the octree.
  • the flag is recorded as 1 for geometric encoding.
  • the point cloud in the process of encoding geometric information based on triangle patch sets (trianglesoup, trisoup), the point cloud is also divided into octrees through the octree dividing unit 203, but it is different from the process based on octrees.
  • this trisoup does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step, but divides it into blocks (sub-blocks) and stops dividing when the side length is W, based on the distribution of point clouds in each block From the formed surface, at most twelve vertex (intersection points) generated by the surface and the twelve edges of the block are obtained.
  • the intersection points are surface fitted through the surface fitting unit 206, and the fitted intersection points are geometrically encoded.
  • the geometric reconstruction unit 204 may perform position reconstruction based on the position information output by the octree dividing unit 203 or the intersection points fitted by the surface fitting unit 206 to obtain a reconstructed value of the position information of each point in the point cloud data.
  • the arithmetic coding unit 205 may use entropy coding to arithmetic encode the position information output by the octree analysis unit 203 or the intersection after fitting by the surface fitting unit 206.
  • the position information output by the octree analysis unit 203 may be encoded using arithmetic.
  • the encoding method generates a geometry code stream; the geometry code stream can also be called a geometry bitstream.
  • Attribute encoding is implemented via the following units:
  • Color conversion (Transform colors) unit 210 Color conversion (Transform colors) unit 210, recoloring (Transfer attributes) unit 211, Region Adaptive Hierarchical Transform (RAHT) unit 212, Generate LOD (Generate LOD) unit 213 and lifting (lifting transform) unit 214.
  • point cloud encoder 200 may include more, less, or different functional components than in FIG. 2 .
  • the color conversion unit 210 may be used to convert the RGB color space of points in the point cloud into YCbCr format or other formats.
  • the recoloring unit 211 uses the reconstructed geometric information to recolor the color information so that the uncoded attribute information corresponds to the reconstructed geometric information.
  • any transformation unit can be selected to transform the points in the point cloud.
  • the transformation unit may include: RAHT transformation 212 and lifting transform unit 214. Among them, the improvement change relies on generating a level of detail (LOD).
  • LOD level of detail
  • Either RAHT transform or lifting transform can be understood as being used to predict the attribute information of points in the point cloud to obtain the predicted value of the attribute information of the point, and then obtain the attribute information of the point based on the predicted value of the attribute information of the point.
  • the residual value For example, the residual value of the attribute information of the point may be the original value of the attribute information of the point minus the predicted value of the attribute information of the point.
  • the process of generating LOD by generating LOD units includes: obtaining the Euclidean distance between points according to the position information of the points in the point cloud; dividing the points into different detail expression layers according to the Euclidean distance .
  • different ranges of Euclidean distances can be divided into different detail expression levels. For example, you can randomly select a point as the first detail expression layer. Then calculate the Euclidean distance between the remaining points and this point, and classify the points whose Euclidean distance meets the first threshold requirement into the second detail expression layer.
  • the point cloud can be directly divided into one or more detail expression layers, or the point cloud can be divided into multiple point cloud slices first, and then each point cloud slice can be divided into one or more detail expression layers. Multiple LOD layers.
  • the point cloud can be divided into multiple point cloud slices, and the number of points in each point cloud slice can be between 550,000 and 1.1 million.
  • Each point cloud slice can be viewed as a separate point cloud.
  • Each point cloud slice can be divided into multiple detail expression layers, and each detail expression layer includes multiple points.
  • the detailed expression layer can be divided according to the Euclidean distance between points.
  • the quantization unit 215 may be used to quantize the residual value of the attribute information of the point. For example, if the quantization unit 215 and the RAHT transform unit 212 are connected, the quantization unit 215 may be used to quantize the residual value of the attribute information of the points output by the RAHT transform unit 212.
  • the arithmetic coding unit 216 may use zero run length coding to perform entropy coding on the residual value of the attribute information of the point to obtain the attribute code stream.
  • the attribute code stream may be bit stream information.
  • Figure 3 is a schematic block diagram of a point cloud decoder provided by an embodiment of the present application.
  • the decoder 300 can obtain the point cloud code stream from the encoding device, and obtain the position information and attribute information of the points in the point cloud by parsing the code.
  • Point cloud decoding includes position decoding and attribute decoding.
  • the process of position decoding includes: arithmetic decoding of the geometric code stream; merging after constructing the octree, reconstructing the position information of the point to obtain the reconstructed information of the position information of the point; performing coordinates on the reconstructed information of the position information of the point Transform to obtain the position information of the point.
  • the position information of a point can also be called the geometric information of the point.
  • the attribute decoding process includes: by parsing the attribute code stream, obtaining the residual value of the attribute information of the point cloud; by dequantizing the residual value of the attribute information of the point, obtaining the residual value of the dequantized attribute information of the point value; based on the reconstruction information of the position information of the point obtained during the position decoding process, select one of the following RAHT inverse transform and lifting inverse transform to perform point cloud prediction to obtain the predicted value.
  • the predicted value is added to the residual value to obtain the point cloud value.
  • the reconstructed value of the attribute information perform inverse color space conversion on the reconstructed value of the attribute information of the point to obtain the decoded point cloud.
  • position decoding can be achieved through the following units:
  • Arithmetic decoding unit 301 Arithmetic decoding unit 301, octree synthesis (synthesize octree) unit 302, surface fitting unit (Synthesize suface approximation) 303, geometric reconstruction (Reconstruct geometry) unit 304 and inverse coordinate transformation (inverse transform coordinates) unit 305.
  • Attribute encoding is implemented via the following units:
  • LOD Generate LOD
  • lifting inverse transform Inverselifting
  • inverse color conversion inverse trasform colors
  • decompression is the reverse process of compression.
  • the functions of each unit in the decoder 300 can be referred to the functions of the corresponding units in the encoder 200 .
  • point cloud decoder 300 may include more, fewer, or different functional components than in FIG. 3 .
  • the decoder 300 can divide the point cloud into multiple LODs according to the Euclidean distance between points in the point cloud; then, decode the attribute information of the points in the LOD in sequence; for example, calculate the zero-run coding technology quantity (zero_cnt) to decode the residual based on zero_cnt; then, the decoding framework 200 can perform inverse quantization based on the decoded residual value, and obtain the result based on the addition of the inverse quantized residual value and the predicted value of the current point. The reconstructed value of the point cloud until all point clouds are decoded. The current point will be used as the nearest neighbor point of the subsequent LOD midpoint, and the reconstructed value of the current point will be used to predict the attribute information of the subsequent points.
  • zero_cnt zero-run coding technology quantity
  • the above is the basic process of the point cloud codec based on the GPCC codec framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the point cloud codec based on the GPCC codec framework.
  • the basic process of the point cloud codec but is not limited to this framework and process.
  • the embodiments of this application mainly relate to attribute encoding and decoding, specifically attribute prediction.
  • the currently determined K reference points are not accurate enough.
  • the reference points are determined based on distance without considering other reference information, resulting in a low accuracy of attribute coding.
  • the embodiment of the present application determines K reference points based on at least one of classification information and distance information. That is to say, when determining the reference points, the embodiment of the present application considers not only the distance information but also the classification. Information, where classification information can be understood as the category to which the points in the point cloud belong. In this way, based on at least one of classification information and distance information, the accuracy of determining the reference point can be improved, and attributes can be performed based on the accurately determined reference point. When predicting, the accuracy of attribute prediction can be improved, thereby improving the encoding and decoding performance.
  • FIG 4 is a schematic flowchart of a point cloud decoding method provided by an embodiment of the present application.
  • the point cloud decoding method in the embodiment of the present application can be completed by the point cloud decoding device shown in Figure 1 or Figure 3 above.
  • the point cloud decoding method in this embodiment of the present application includes:
  • S101 Determine the classification information of the current point and the decoded point in the point cloud, and/or the distance information between the decoded point and the current point.
  • the classification information is used to indicate the category to which the points in the point cloud belong.
  • classification information can be understood as the real-world categories to which points in the point cloud belong, such as roads, cars, pedestrians, etc.
  • the classification information of the current point and the decoded point and/or the distance information between the decoded point and the current point are determined, and then the current point is determined from the decoded point based on the classification information and/or the distance information.
  • K reference points Since the attribute information of points of the same category is relatively similar, based on this, when determining the reference point, the embodiment of the present application not only considers the distance information, but also considers the classification information, thereby improving the accuracy of determining the reference point. Based on the accurately determined When using reference points for attribute prediction, the accuracy of attribute prediction can be improved.
  • the embodiments of the present application have the same specific process for determining the classification information of the current point and the decoded point in the point cloud.
  • the methods for determining the classification information of the current point and the decoded point in the point cloud in S101 above include but are not limited to the following:
  • Method 1 Before decoding the attributes of the point cloud, the geometric decoding of the point cloud (also called position decoding) has been completed, and the geometric information of the points in the point cloud has been obtained. Segment the point cloud according to the geometric information of the points in the point cloud to obtain the classification information of the point cloud, and then determine the classification information of the current point and the decoded point.
  • position decoding also called position decoding
  • the motions of different objects may be different.
  • take point cloud data captured by a lidar sensor on a moving vehicle In this point cloud data, roads and objects usually have different motions. Since the distance between the road and the radar sensor is relatively constant and the road changes slightly from one vehicle location to the next, the point representing the road moves very little relative to the radar sensor location. In contrast, objects such as buildings, road signs, vegetation, or other vehicles have larger motions.
  • a histogram is used to count the height values of the point cloud midpoints.
  • the horizontal axis of the histogram is the height value of the point cloud midpoints.
  • the histogram The vertical axis of is the number of points at that height value.
  • Figure 5 takes the radar point cloud as an example for statistics. The height of the radar is the height zero point, so the height values of most points are negative.
  • obtain the height value corresponding to the peak value of the histogram and calculate the standard deviation of the height value.
  • the threshold value higher than the center a times (for example, 1.5 times) of the standard deviation is recorded as the first height threshold Top_thr.
  • the threshold value that is lower than b times (for example, 1.5 times) the standard deviation of the center is recorded as the second height threshold Bottom_thr.
  • the point cloud is divided into different categories according to the first height threshold and the second height threshold. For example, a point cloud whose height value is between the first height threshold and the second height threshold is recorded as a first type point cloud (for example, a road point cloud), the height value is greater than the first height threshold, and the height value Point clouds smaller than the second height threshold are recorded as second type point clouds (such as non-road point clouds).
  • the point cloud code stream includes indication information of the classification information of the points in the point cloud, so that the decoding end obtains the classification information of the current point and the decoded point by decoding the point cloud code stream. For example, the encoding end writes the category identification of each point in the point cloud into the code stream, and the decoding end obtains the category identification of the current point in the point cloud and the decoded point by decoding the code stream, and then determines the classification information based on the category identification. .
  • Method 3 Use the pre-trained neural network model to predict the classification information of the current point and the decoded point.
  • the classification information of the decoded point when decoding the current point, the classification information of the decoded point Predicted.
  • the classification information of the decoded point is selected from the decoded points.
  • the at least one decoded point may be the decoded point closest to the current point.
  • the classification information of at least one decoded point is input into the neural network model, so that the neural network model predicts the classification information of the current point based on the classification information of at least one decoded point.
  • the position information of the points in the point cloud is input into the neural network model, so that the neural network model divides the point cloud into multiple categories based on the position information of the points in the point cloud, and then determines Outputs the classification information of the current point and the decoded point.
  • the decoding end can determine the distance information between the decoded point and the current point based on the position information of the decoded point and the position information of the current point.
  • the embodiment of the present application does not limit the specific method of determining the distance between the decoded point and the current point.
  • a Manhattan distance between the decoded point and the current point is determined according to a Manhattan distance calculation method.
  • the Euclidean distance between the decoded point and the current point is determined according to the Euclidean distance calculation method.
  • the embodiments of the present application do not limit the specific number of decoded points used to determine classification information and distance information.
  • the L decoded points located before the current point in the decoding order are used as research objects, the classification information of the current point and these L decoded points is determined, and/or the classification information of the L decoded points is determined.
  • the above L is a preset fixed value, that is to say, except for the first few points in the decoding sequence, the number of L decoded points corresponding to other points is the same.
  • the above L is not a fixed value.
  • different L values can be determined according to the category of the current point. As an example, if the current point belongs to the first type of point cloud, then L is determined to be A1. If the current point belongs to the second type of point cloud, then L is determined to be A2, where A1 and A2 are both positive integers, and the values of A1 and A2 are different.
  • the decoding order in the embodiment of the present application can be any one of the original input order of points in the point cloud, Morton order, Hilbert order, and LOD order.
  • the Morton order can be understood as the order obtained by converting the coordinates of the points in the point cloud into Morton codes, and sorting the point cloud from small to large according to the size of the Morton codes.
  • the Hilbert order can be understood as the order obtained by converting the coordinates of the points in the point cloud into Hilbert codes, and sorting the point clouds from small to large according to the size of the Hilbert codes.
  • the classification information of the current point and the decoded point, and/or the distance information between the decoded point and the current point can be determined. Then, the following step S102 is performed.
  • K is a positive integer.
  • the specific value of K can be a default value, can also be obtained by decoding, or can be calculated adaptively, and is not limited in this application.
  • this application When determining the reference point, this application not only considers distance information, but also considers classification information, thereby improving the accuracy of determining the reference point.
  • this application When performing attribute prediction based on the accurately determined reference point, the accuracy of attribute prediction can be improved. .
  • the decoding end determines K reference points of the current point from the decoded points based on the classification information of the current point and the decoded point. For example, the decoding end determines K decoded points that are close to the current point in the decoding order and have the same category as the current point as the K reference points of the current point.
  • the decoding end determines K reference points of the current point from the decoded points based on the classification information of the current point and the decoded point, and the distance between the decoded point and the current point. For example, the decoding end determines the K decoded points whose categories are consistent with the current point's category and which are closest to the current point as the K reference points of the current point.
  • the decoding end determines K reference points of the current point from the decoded points based on the distance between the decoded point and the current point. For example, the decoding end determines the K decoded points closest to the current point as the K reference points of the current point.
  • the embodiments of the present application include multiple ways of determining the reference point.
  • the above-mentioned S102 includes the following steps of S102-A and S102-B:
  • S102-B Determine K reference points of the current point from the decoded points according to the reference point determination mode and at least one of the classification information and the distance information.
  • the decoder determines the reference point of the current point, it first needs to determine the reference point determination mode corresponding to the current point, and then determine the mode based on the determination of the reference point, and classify At least one of information and distance information, K reference points of the current point are determined from the decoded points.
  • the reference point determination mode of all points in the point cloud is the same, that is, the decoder uses a reference point determination mode to determine the reference point of each point in the point cloud.
  • the reference point determination mode may be a default mode.
  • the encoding end determines a reference point determination mode from multiple reference point determination modes, and writes the determined reference point determination mode into the code stream to indicate to the decoding end, so that the decoding end obtains the code stream by decoding the code stream.
  • a reference point determination pattern is used to determine the reference point for all points in the point cloud.
  • the encoding end can also encode an identification bit for each point in the point cloud to indicate the reference point determination mode corresponding to each point.
  • multiple reference point determination modes can be used in the point cloud. For example, some points in the point cloud use one reference point determination mode to determine the reference point, and another reference point uses another reference point determination mode to determine the reference point. Determine the reference point.
  • the reference point determination mode is any one of a first reference point determination mode, a second reference point determination mode, and a third reference point determination mode.
  • at least one of the first reference point determination mode, the second reference point determination mode and the third reference point determination mode determines the reference point based on classification information.
  • the methods for determining the reference point determination mode corresponding to the current point in the above S102-A include but are not limited to the following:
  • Method 1 Determine the reference point determination mode corresponding to the current point based on the classification information of the current point.
  • the reference point determination mode is determined to be the first reference point determination mode.
  • the reference point determination mode is determined to be the second reference point determination mode.
  • the above-mentioned second reference point determination mode and the first reference point determination mode are any one of the above-mentioned first reference point determination mode, second reference point determination mode and third reference point determination mode, and the second reference point determination mode The determination mode is different from the first reference point determination mode.
  • the correspondence between the categories of points in the point cloud and the reference point determination mode is as shown in Table 1:
  • Point classification information Reference point determination mode Category 1 The first reference point determination mode Category 2
  • the decoder can query the above Table 1 according to the classification information of the current point to determine the reference point determination mode corresponding to the current point.
  • the above-mentioned first reference point determination mode and second determination mode are default modes. For example, if the category of the current point is the first category, the decoding end determines by default that the reference point corresponding to the current point is determined as The second reference point determination mode, that is, the first reference point determination mode is the second reference point determination mode. If the category of the current point is the second category, the encoding end defaults to the reference point determination mode corresponding to the current point as the third reference point determination mode, that is, the second reference point determination mode is the third reference point determination mode.
  • the encoding end can write the reference point determination modes corresponding to different categories into the code stream, so that the decoding end can determine the reference point determination mode corresponding to the category to which the current point belongs by decoding the code stream. For example, the decoding end decodes the first category corresponding to the second reference point determination mode from the code stream, and the second category corresponds to the third reference point determination mode. In this way, if it is determined that the category of the current point is the first category, the second reference point determination mode is determined as the reference point determination mode corresponding to the current point, that is, the first reference point determination mode is the second reference point determination mode. If it is determined that the category of the current point is the second category, the third reference point determination mode is determined as the reference point determination mode corresponding to the current point, that is, the second reference point determination mode is the third reference point determination mode.
  • the reference point determination mode corresponding to the current point can also be determined based on the classification information of the current point and the decoded point.
  • the reference point determination mode corresponding to the current point is determined to be a reference point determination mode.
  • the reference point determination mode corresponding to the current point is determined to be another reference point determination mode.
  • the decoder can also use the following method two, three or four to determine the reference point determination mode corresponding to the current point.
  • the reference point determination mode corresponding to the current point is the default mode. That is to say, both the decoding end and the encoding end use the default mode to determine the reference point of the current point.
  • the above-mentioned default mode may be any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
  • Method three decode the point cloud code stream to obtain a first identifier, which is used to indicate the reference point determination mode corresponding to the current point; determine the reference point determination mode according to the first identifier.
  • the reference point determination mode is indicated to the decoding end. Specifically, the first identifier is written in the code stream, and the first identifier is used to determine the reference point determination mode. Indicates the reference point determination mode corresponding to the current point. In this way, the decoding end can obtain the first identifier by decoding the code stream, and then determine the reference point determination mode corresponding to the current point based on the first identifier.
  • the first identifier may be an index of a pattern determined for the reference point.
  • the encoding end may encode a first identifier for each point in the point cloud, which is used to indicate the reference point determination mode corresponding to the point.
  • the encoding end can write a first identifier in the code stream, and the first identifier is used for Indicates the reference point determination pattern corresponding to all points in the point cloud.
  • the encoding end can encode different first identifiers for points of different categories, for example, the first type of point cloud corresponds to The first identifier of is B1, and the first identifier corresponding to the second type of point cloud is B2.
  • the decoder can determine the first identifier corresponding to the current point based on the classification information of the current point, and then determine the reference point determination mode corresponding to the current point based on the first identifier. For example, if the current point is a point cloud of the first type, the decoding end determines the reference point determination mode corresponding to the first identifier B1 as the reference point determination mode corresponding to the current point. If the current point is a point cloud of the second type, the decoding end determines the reference point determination mode corresponding to the first identifier B1. The reference point determination mode corresponding to the first identification B2 is determined as the reference point determination mode corresponding to the current point.
  • Method 4 The decoder uses an adaptive method to determine the reference point determination mode corresponding to the current point.
  • the above S102-A includes the following steps:
  • N is a positive integer
  • the N reference point candidate determination modes are any N modes among the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
  • the above-mentioned N reference point candidate determination modes are default for encoding and decoding.
  • the encoding end determines N reference point candidate determination modes from the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode, and determines the N reference point candidate determination modes Indicate to the decoder.
  • the decoder can also obtain N reference point candidate determination modes through other methods, and the embodiments of the present application do not limit this. After the decoding end obtains N reference point candidate determination modes, it determines the reference point determination mode corresponding to the current point from these N reference point candidate determination modes.
  • the decoding end determines a reference point candidate determination mode from N reference point candidate determination modes as the reference point determination mode corresponding to the current point, including but not limited to the following:
  • Method 1 The decoder determines the reference point determination mode corresponding to the current point from the N reference point candidate determination modes based on the classification information of the current point.
  • reference point candidate mode a among the N reference point candidate determination modes is determined as the reference point determination mode corresponding to the current point.
  • reference point candidate mode b among the N reference point candidate determination modes is determined as the reference point determination mode corresponding to the current point.
  • Method 2 The decoder determines the cost of N reference point candidate determination modes; determines the reference point candidate determination mode with the smallest cost among the N reference point candidate determination modes as the reference point determination mode corresponding to the current point.
  • the above cost can be the sum of squared differences (Sum of Squared Difference, SSD), absolute error (Sum of Absolute Difference, SAD), sum of absolute values after Hadamard transformation (Sum of Absolute Transformed Difference, SATD), etc.
  • the embodiment of the present application does not limit the specific method of determining the cost of the N reference point candidate determination modes.
  • the decoding end selects the P points closest to the current point from the decoded points according to the decoding order, where P is a positive integer; and determines the jth reference point in the pattern based on the N reference point candidates.
  • Candidate determination mode use the jth reference point candidate determination mode to predict P points, and obtain the attribute prediction values of P points in the jth reference point candidate determination mode, j is a positive integer; according to the P points in the jth reference point candidate determination mode
  • the j reference point candidate determines the attribute prediction value in the mode, and determines the cost of the jth reference point candidate mode.
  • the decoding end selects the P points closest to the current point from the decoded points according to the decoding order, and uses the N reference point candidate determination modes to predict the P points respectively to obtain N
  • the attribute prediction values of P points corresponding to each reference point candidate determination mode in the reference point candidate determination mode are then determined, and the cost of each reference point candidate determination mode is determined based on the attribute prediction values of the P points.
  • the j-th reference point candidate determination mode For example, taking the j-th reference point candidate determination mode among the N reference point candidate determination modes as an example, use the j-th reference point candidate determination mode to perform attribute prediction on each of the P points, and obtain the The attribute prediction value of each point in the jth reference point candidate determination mode.
  • the j-th reference point candidate determination mode is used to determine K reference points of the i-th point, and the i-th point is determined based on the K reference points of the i-th point.
  • the weighted average of the attribute information of K reference points of the i-th point is determined as the attribute prediction value of the i-th point.
  • the attribute prediction value of each of the P points in the j-th reference point candidate determination mode can be determined.
  • the cost of the j-th reference point candidate determination mode is determined based on the attribute prediction value of each of the P points in the j-th reference point candidate determination mode.
  • the method of determining the cost of the j-th reference point candidate determination mode includes but is not limited to the following examples:
  • Example 1 Since P points are attribute decoded points, their respective attribute prediction values have been determined during attribute decoding. For the convenience of description, the attribute prediction values of P points determined during the attribute decoding process are recorded as Predict the value for the original attribute. In this way, the predicted attribute values of P points in the j-th reference point candidate determination mode can be compared with the original attribute prediction values to determine the cost of the j-th reference point candidate determination mode. For example, the sum of the differences between the attribute prediction values of P points in the j-th reference point candidate determination mode and the original attribute prediction values of the P points is determined as the cost of the j-th reference point candidate determination mode.
  • the cost of the j-th reference point candidate determination mode is determined according to the following formula (1):
  • D is the cost of the j-th reference point candidate determination mode
  • ai is the original attribute prediction value of the i-th point among P points
  • aij is the attribute prediction of the i-th point in the j-th reference point candidate determination mode. value.
  • Example 2 Determine the attribute reconstruction values of P points in the j-th reference point candidate determination mode based on the attribute prediction values of P points in the j-th reference point candidate determination mode; based on the attribute prediction values of P points in the j-th reference point candidate determination mode; The attribute reconstruction value in the point candidate determination mode and the decoded attribute values of P points determine the cost of the jth reference point candidate determination mode.
  • the code stream is decoded to obtain the attribute residual values of P points, and the attribute prediction values of the P points in the jth reference point candidate determination mode are added to the attribute residual values of the P points.
  • the attribute reconstruction value of each point in the P points in the j-th reference point candidate determination mode can be obtained. Since the attribute information of the P points has been decoded, the j-th reference point candidate determination mode is determined based on the attribute reconstruction values of the P points in the j-th reference point candidate determination mode and the decoded attribute values of the P points. price. For example, cost calculation methods such as SAD, SATD, and SSD are used to determine the cost of the j-th reference point candidate determination mode.
  • the cost corresponding to each mode in the N reference point candidate determination modes can be determined, and then the reference point candidate determination mode with the smallest cost is determined as the reference point determination mode corresponding to the current point.
  • the decoding end determines the reference point determination mode corresponding to the current point according to the above method, it executes the above step S102-B, and based on the reference point determination mode corresponding to the current point and at least one of the classification information and distance information, from the decoded point Determine the K reference points of the current point.
  • the above S102-B has different implementation processes depending on the reference point determination mode corresponding to the current point. Examples include but are not limited to the following situations:
  • the first reference point determination mode uses the K decoded points closest to the current point in the decoding order as reference points. Therefore, according to the above steps of S102-A, if the decoding end determines that the reference point determination mode corresponding to the current point is the first reference point determination mode, then according to the decoding order, the K decoded points closest to the current point among the decoded points are points are determined as K reference points.
  • the distance can be Manhattan distance or Euclidean distance.
  • the second reference point determination mode determines K decoded points whose classification information is the same as the classification information of the current point as reference points. Therefore, according to the above steps of S102-A, if the decoding end determines that the reference point determination mode corresponding to the current point is the second reference point determination mode, then according to the decoding order, the classification information and the classification of the current point are selected from the decoded points. K decoded points with consistent information are used as K reference points. For example, for the current point, search forward according to the decoding order. If the found candidate reference point belongs to the same category as the current point, keep it. Otherwise, continue to search until k reference points with the same category as the current point are found.
  • case 2 The actual effect of case 2 is equivalent to dividing the entire point cloud into multiple parts according to the classification information, and then searching each part independently according to the method of case 1.
  • the decoding end determines that the reference point determination mode corresponding to the current point is the third reference point determination mode according to the above steps of S102-A, the decoding end performs the following steps from S102-B1 to S102-B3:
  • the weight of the decoded point is determined based on at least one of the classification information and the distance information, and then based on the weight, Determine the score of the decoded point, and then determine K reference points from the decoded point based on the score.
  • the above-mentioned S102-B1 determines the weight of the decoded point based on at least one of the classification information and the distance information, including but not limited to the following:
  • Method 1 Determine the weight of the decoded point based on the classification information.
  • the process of determining the weight of each point in the decoded points is the same.
  • the i-th point among the decoded points as an example.
  • the classification information of the i-th point determine the The weight of the i-th point, i is a positive integer.
  • different weights are configured for points of different categories. For example, if the i-th point belongs to the first category, then the weight of the i-th point is determined to be W1. If the i-th point belongs to For the second category, determine the weight of the i-th point as W2. Among them, W1 and W2 are preset values or default values.
  • the weight of the i-th point is determined based on the classification information of the i-th point and the classification information of the current point.
  • the weight of the i-th point is determined to be the first weight
  • the weight of the i-th point is determined to be the second weight.
  • the embodiments of this application do not limit the specific values of the first weight and the second weight.
  • the first weight and the second weight are preset values or default values.
  • the first weight and the second weight are indicated to the decoding end through the encoding end.
  • the weight of each point in the decoded points can be determined by referring to the method of determining the weight of the i-th point.
  • the decoding end can also determine the weight of the decoded point based on the classification information and distance information.
  • the weight 1 based on the classification information of the i-th point
  • determine the weight 2 based on the distance between the i-th point and the current point
  • determine the weight 1 and weight 2 based on the distance between the i-th point and the current point.
  • the weight 1 of the i-th point is determined as the first weight.
  • the weight 1 of the i-th point is determined as the second weight.
  • the distance between the i-th point and the current point is reciprocally determined to be the weight 2 of the i-th point.
  • the decoding end can also determine the weight of the decoded point based on the distance information. For example, the reciprocal of the distance from the decoded point to the current point is determined as the weight of the decoded point.
  • the above S102-B2 is executed to determine the score of the decoded point based on the weight.
  • the decoding end uses or converts the weight of the decoded point determined above as a score of the decoded point. In other words, the greater the weight of the decoded point, the higher the corresponding score.
  • the score of the i-th point is determined based on the distance information between the i-th point and the current point, and the weight of the i-th point.
  • the classification information is considered.
  • the weight between the i-th point and the current point can be determined.
  • the distance information, as well as the weight of the i-th point determine the score of the i-th point.
  • the product of the distance information between the i-th point and the current point and the weight of the i-th point is determined as the score of the i-th point.
  • the score of the i-th point is determined according to the following formula (2):
  • weight is the weight of the i-th point
  • dist is the distance between the i-th point and the current point.
  • the decoder can also perform other operations on the distance information between the i-th point and the current point, as well as the weight of the i-th point, to obtain the score of the i-th point. This is not done in the embodiment of this application. limit.
  • the classification information of the i-th point and the i-th point can be used.
  • the weight of the point determines the score of the i-th point. For example, a weight is determined based on the classification information of the i-th point, and the product or sum of the weight and the weight of the i-th point is determined as the score of the i-th point.
  • Each point in the decoded point can refer to the method of the i-th point to determine the score of each point in the decoded point, and then based on the score, from the decoded point K parameter points are determined among the points.
  • the K decoded points with the largest scores among the decoded points are determined as the K reference points of the current point.
  • the weight of the decoded point is determined using the above method 1, that is, if the classification information of the i-th point is consistent with the classification information of the current point, then the weight of the i-th point is determined to be the first weight; if If the classification information of the i point is inconsistent with the classification information of the current point, then the weight of the i-th point is determined to be the second weight. If the second weight is greater than the first weight, the K points with the smallest scores among the decoded points are determined as K reference points.
  • the first weight is a positive number less than 1, and the second weight is a positive number greater than 1.
  • the decoding end determines K reference points of the current point according to the above method. From the above, it can be seen that when determining the reference point, the embodiment of this application not only considers distance information, but also considers classification information, thereby improving The accuracy of the determination of the reference point can improve the accuracy of the attribute prediction when performing attribute prediction based on the accurately determined reference point.
  • the decoder determines the K reference points of the current point, it performs the following steps of S103.
  • the decoder directly determines the attribute prediction value of the current point based on the attribute information of the K reference points. For example, the weighted average of the attribute information of K reference points is determined as the attribute prediction value of the current point.
  • the above S103 includes the following steps S103-A and S103-B.
  • S103-A Determine M prediction points from K reference points, where M is a positive integer less than or equal to K.
  • M prediction points are determined from K reference points, and based on the attribute information of these M prediction points, the attribute prediction value of the current point is determined.
  • the above S103-A includes the following steps:
  • the decoder first determines the prediction point determination mode corresponding to the current point from a plurality of M prediction points from K reference points, and then determines the mode from the K reference points based on the prediction point. Determine M prediction points.
  • the prediction point determination mode of all points in the point cloud is the same, that is, the decoder uses a prediction point determination mode to determine the prediction point of each point in the point cloud.
  • the prediction point determination mode may be a default mode.
  • the encoding end determines a prediction point determination mode from multiple prediction point determination modes, and writes the determined prediction point determination mode into the code stream to indicate to the decoding end, so that the decoding end obtains the code stream by decoding the code stream.
  • a prediction point determination pattern is used to determine prediction points for all points in the point cloud.
  • the encoding end can also encode an identification bit for each point in the point cloud to indicate the prediction point determination mode corresponding to each point.
  • multiple prediction point determination modes can be used in the point cloud. For example, some points in the point cloud use one prediction point determination mode to determine the prediction point, and another prediction point uses another prediction point determination mode. to determine the prediction point.
  • the embodiment of the present application does not limit the prediction point determination mode.
  • the prediction point determination mode is any one of a first prediction point determination mode, a second prediction point determination mode, and a third prediction point determination mode.
  • at least one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode determines the prediction point based on the classification information.
  • the methods for determining the prediction point determination mode corresponding to the current point in S103-A above include but are not limited to the following:
  • Method 1 Determine the prediction point determination mode corresponding to the current point based on the classification information of the current point.
  • the prediction point determination mode is determined to be the first prediction point determination mode.
  • the prediction point determination mode is determined to be the second prediction point determination mode.
  • the above-mentioned second prediction point determination mode and the first prediction point determination mode are any one of the above-mentioned first prediction point determination mode, second prediction point determination mode and third prediction point determination mode, and the second prediction point determination mode The determination mode is different from the first prediction point determination mode.
  • the correspondence between the categories of points in the point cloud and the determination mode of predicted points is as shown in Table 2:
  • Point classification information Prediction point determination mode Category 1 The first prediction point determination mode Category 2
  • the decoder can query the above Table 2 according to the classification information of the current point to determine the prediction point determination mode corresponding to the current point.
  • the first prediction point determination mode and the second prediction point determination mode mentioned above are default modes. For example, if the category of the current point is the first category, the decoder defaults to the prediction point determination mode corresponding to the current point. is the second prediction point determination mode, that is, the first prediction point determination mode is the second prediction point determination mode. If the category of the current point is the second category, the encoding end defaults to the prediction point determination mode corresponding to the current point as the third prediction point determination mode, that is, the second prediction point determination mode is the third prediction point determination mode.
  • the encoding end can write prediction point determination modes corresponding to different categories into the code stream, so that the decoding end can determine the prediction point determination mode corresponding to the category to which the current point belongs by decoding the code stream.
  • the decoding end decodes from the code stream that the first category corresponds to the second prediction point determination mode, and the second category corresponds to the third prediction point determination mode.
  • the second prediction point determination mode is determined as the prediction point determination mode corresponding to the current point, that is, the first prediction point determination mode is the second prediction point determination mode.
  • the third prediction point determination mode is determined as the prediction point determination mode corresponding to the current point, that is, the second prediction point determination mode is the third prediction point determination mode.
  • the predicted point determination mode corresponding to the current point can also be determined based on the classification information of the current point and the decoded point.
  • the prediction point determination mode corresponding to the current point is determined to be a prediction point determination mode.
  • the prediction point determination mode corresponding to the current point is determined to be another prediction point determination mode.
  • the decoder can also use the following method two, three, four or five to determine the prediction point determination mode corresponding to the current point.
  • Method 2 Determine the prediction point determination mode based on the classification information of K reference points.
  • the number of points belonging to different categories among the K reference points is determined, and the prediction point determination mode corresponding to the category with the largest number is determined as the prediction point determination mode corresponding to the current point.
  • the number of points belonging to the first category is the largest.
  • the first category corresponds to the first prediction point determination mode, and then the first prediction point determination mode is determined as the current point.
  • the corresponding prediction points determine the mode.
  • the prediction point determination mode corresponding to the current point is determined based on the classification information of the K reference points and the current point.
  • the prediction point determination mode is determined to be the third prediction point determination mode
  • the prediction point determination mode is determined to be the fourth prediction point determination mode, and the fourth prediction point determination mode is the same as the third prediction point determination mode.
  • Each of the three prediction point determination modes is any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode, and the fourth prediction point determination mode is different from the third prediction point determination mode.
  • the prediction point determination mode corresponding to the current point is the default mode. That is to say, both the decoding end and the encoding end use the default mode to determine the prediction point of the current point.
  • the above default mode may be any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
  • Method 4 Decode the point cloud code stream to obtain a second identifier, which is used to indicate the prediction point determination mode corresponding to the current point; determine the prediction point determination mode corresponding to the current point according to the second identifier.
  • the decoder After the encoding end determines the prediction point determination mode corresponding to the current point, it indicates the prediction point determination mode to the decoder. Specifically, a second identifier is written in the code stream, and the second identifier is used to determine the prediction point determination mode. Indicates the prediction point determination mode corresponding to the current point. In this way, the decoder can obtain the second identifier by decoding the code stream, and then determine the prediction point determination mode corresponding to the current point based on the second identifier.
  • the second identification may determine the index of the mode for the prediction point.
  • the encoding end may encode a second identifier for each point in the point cloud, which is used to indicate the prediction point determination mode corresponding to the point.
  • the encoding end can write a second identifier in the code stream, and the second identifier is used for Indicates the prediction point determination mode corresponding to all points in the point cloud.
  • the encoding end can encode different second identifiers for points of different categories, for example, corresponding to point clouds of the first category
  • the second identifier is B1
  • the second identifier corresponding to the second type of point cloud is B2.
  • the decoder can determine the second identifier corresponding to the current point based on the classification information of the current point, and then determine the prediction point determination mode corresponding to the current point based on the second identifier. For example, if the current point is a point cloud of the first type, the decoding end determines the prediction point determination mode corresponding to the second identifier B1 as the prediction point determination mode corresponding to the current point. If the current point is a point cloud of the second type, the decoding end determines the prediction point determination mode corresponding to the second identifier B1. The prediction point determination mode corresponding to the second identification B2 is determined as the prediction point determination mode corresponding to the current point.
  • Method 5 The decoder uses an adaptive method to determine the prediction point determination mode corresponding to the current point.
  • the above S103-A includes the following steps:
  • the Q prediction point candidate determination modes are any Q modes among the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
  • the above-mentioned Q prediction point candidate determination modes are default for encoding and decoding.
  • the encoding end determines Q prediction point candidate determination modes from the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode, and will determine the Q prediction point candidate determination modes Indicate to the decoder.
  • the decoder can also obtain Q prediction point candidate determination modes through other methods, and the embodiments of the present application do not limit this. After the decoder obtains Q prediction point candidate determination modes, it determines the prediction point determination mode corresponding to the current point from these Q prediction point candidate determination modes.
  • the decoder determines one prediction point candidate determination mode from Q prediction point candidate determination modes as the prediction point determination mode corresponding to the current point, including but not limited to the following:
  • Method 1 The decoder determines the prediction point determination mode corresponding to the current point from the Q prediction point candidate determination modes based on the classification information of the current point.
  • the prediction point candidate mode a among the Q prediction point candidate determination modes is determined as the prediction point determination mode corresponding to the current point.
  • the prediction point candidate mode b among the Q prediction point candidate determination modes is determined as the prediction point determination mode corresponding to the current point.
  • Method 2 The decoder determines the cost of the Q prediction point candidate determination modes; determines the prediction point determination mode corresponding to the current point based on the costs of the Q prediction point candidate determination modes.
  • the above cost can be the sum of squared differences (Sum of Squared Difference, SSD), absolute error (Sum of Absolute Difference, SAD), sum of absolute values after Hadamard transformation (Sum of Absolute Transformed Difference, SATD), etc.
  • the maximum attribute difference may also be determined as the cost.
  • the embodiment of the present application does not limit the specific method of determining the cost of the Q prediction point candidate determination modes.
  • the decoding end selects the P points closest to the current point from the decoded points in accordance with the decoding order, where P is a positive integer; and determines the jth prediction point in the pattern for the Q prediction point candidates.
  • Candidate determination mode use the jth prediction point candidate determination mode to predict P points, and obtain the attribute prediction values of P points in the jth prediction point candidate determination mode, j is a positive integer; according to the P points in the jth prediction point candidate determination mode The j prediction point candidate determines the attribute prediction value in the mode, and determines the cost of the jth prediction point candidate mode.
  • the decoding end selects the P points closest to the current point from the decoded points in accordance with the decoding order, and uses the Q prediction point candidate determination modes to predict the P points respectively, and obtain Q
  • the attribute prediction values of P points corresponding to each prediction point candidate determination mode in the prediction point candidate determination mode are then determined, and the cost of each prediction point candidate determination mode is determined based on the attribute prediction values of the P points.
  • the j-th prediction point candidate determination mode uses the j-th prediction point candidate determination mode to perform attribute prediction on each of the P points, and obtain the The attribute prediction value of each point in the jth prediction point candidate determination mode.
  • the j-th prediction point candidate determination mode is used to determine the M prediction points of the i-th point, and the i-th point is determined based on the M prediction points of the i-th point.
  • the weighted average of the attribute information of M predicted points of the i-th point is determined as the attribute prediction value of the i-th point.
  • the attribute prediction value of each of the P points in the j-th prediction point candidate determination mode can be determined.
  • the cost of the j-th prediction point candidate determination mode is determined based on the attribute prediction value of each of the P points in the j-th prediction point candidate determination mode.
  • the method of determining the cost of the j-th prediction point candidate determination mode includes but is not limited to the following examples:
  • Example 1 Since P points are attribute decoded points, their respective attribute prediction values have been determined during attribute decoding. For the convenience of description, the attribute prediction values of P points determined during the attribute decoding process are recorded as Predict the value for the original attribute. In this way, the predicted attribute values of P points in the j-th prediction point candidate determination mode can be compared with the original attribute prediction values, and the cost of the j-th prediction point candidate determination mode can be determined. For example, the sum of the differences between the attribute prediction values of P points in the j-th prediction point candidate determination mode and the original attribute prediction values of the P points is determined as the cost of the j-th prediction point candidate determination mode.
  • Example 2 Determine the attribute reconstruction value of P points in the j-th prediction point candidate determination mode based on the attribute prediction values of P points in the j-th prediction point candidate determination mode; determine the attribute reconstruction value of P points in the j-th prediction point candidate determination mode; The attribute reconstruction value in the point candidate determination mode and the decoded attribute values of P points determine the cost of the jth prediction point candidate determination mode.
  • the code stream is decoded to obtain the attribute residual values of P points, and the attribute prediction values of the P points in the jth prediction point candidate determination mode are added to the attribute residual values of the P points.
  • the attribute reconstruction value of each of the P points in the j-th prediction point candidate determination mode can be obtained. Since the attribute information of P points has been decoded, the j-th prediction point candidate determination mode is determined based on the attribute reconstruction values of P points in the j-th prediction point candidate determination mode and the decoded attribute values of P points. price. For example, cost calculation methods such as SAD, SATD, and SSD are used to determine the cost of the j-th prediction point candidate determination mode. In some embodiments, the maximum attribute difference among the P points may also be determined as the cost of determining the mode for the j-th prediction point candidate.
  • the cost corresponding to each mode in the N prediction point candidate determination modes can be determined, and then the prediction point determination mode is determined based on the costs of the Q prediction point candidate determination modes.
  • the prediction point candidate determination mode with the smallest cost is determined as the prediction point determination mode corresponding to the current point.
  • the first prediction point determination mode is determined as the prediction point determination mode corresponding to the current point, otherwise the second prediction point determination mode is determined as the prediction point determination mode corresponding to the current point. model.
  • the decoder determines the prediction point determination mode corresponding to the current point according to the above method, it executes the above step S103-B to determine M prediction points from the K reference points according to the prediction point determination mode corresponding to the current point.
  • the above S103-B has different implementation processes depending on the prediction point determination mode corresponding to the current point. Examples include but are not limited to the following situations:
  • the first prediction point determination mode determines K reference points as prediction points. Therefore, according to the above steps of S103-A, if the decoder determines that the prediction point determination mode corresponding to the current point is the first prediction point determination mode, then the K reference points are determined as M prediction points, and M is equal to K at this time. .
  • the second prediction point determination mode determines one reference point among the K reference points as the prediction point. Therefore, according to the above steps of S103-A, if the decoder determines that the prediction point determination mode corresponding to the current point is the second prediction point determination mode, then it selects one reference point from the K reference points and determines it as the prediction point. At this time M equals 1.
  • the method of selecting a reference point from K reference points and determining it as a prediction point includes at least the following examples:
  • Example 1 determine the reference point closest to the current point among K reference points as the prediction point.
  • Example 2 Decode the point cloud code stream to obtain the first index corresponding to the current point.
  • the first index is used to indicate the first reference point.
  • the first reference point is the one closest to the attribute information of the current point among the K reference points. point; determine the first reference point corresponding to the first index among the K reference points as the prediction point. That is, the encoding end determines the first reference point whose attribute information is closest to the current point from the K reference points, and determines the first reference point as the prediction point of the current point. At the same time, the encoding end determines the index of the first reference point (first index) is written into the code stream. In this way, the decoding end obtains the first index by decoding the code stream, and then determines the reference point corresponding to the first index among the K reference points as the first reference point, and then determines the first reference point as a prediction point.
  • the code stream may include indication information to indicate whether the prediction point is determined through the method of Example 1 or the method of Example 2.
  • the third prediction point is a prediction point determined based on classification information and distance information. Therefore, according to the above steps of S103-A, if the decoder determines that the prediction point determination mode corresponding to the current point is the third prediction point determination mode, then the classification information of the K reference points is consistent with the current point and is far away from the current point.
  • the nearest M reference points are determined as M prediction points.
  • the decoding end After determining M prediction points from K reference points according to the above method, the decoding end performs the following steps of S103-B.
  • the attribute information of the predicted point is determined as the attribute predicted value of the current point.
  • the above S103-B includes the following steps:
  • the above prediction value calculation method is any one of a first prediction value calculation method, a second prediction value calculation method, and a third prediction value calculation method.
  • the prediction value calculation method corresponding to the current point is first determined.
  • the prediction value calculation method is determined based on the classification information of the M prediction points. That is to say, in the embodiment of this application, different prediction value calculation methods are set for different point cloud categories, which further improves the calculation of attribute prediction values. accuracy.
  • the above-mentioned implementation methods of S103-B1 include at least the following:
  • Method 1 if the number of prediction points with the same category as the current point among the M prediction points is greater than or equal to the second threshold, then the prediction value calculation method is determined to be the first prediction value calculation method; if among the M prediction points, If the number of prediction points with the same category of the current point is less than the second threshold, then the prediction value calculation method is determined to be the second prediction value calculation method, where both the first prediction value calculation method and the second prediction value calculation method are Any one of the first predicted value calculation method, the second predicted value calculation method, and the third predicted value calculation method, and the first predicted value calculation method is different from the second predicted value calculation method.
  • Method 2 if the categories of the M predicted points and the current point are both the first category, then determine the predicted value calculation method as the third predicted value calculation method; if the categories of the M predicted points and the current point are both the second category When , it is determined that the predicted value calculation method is the fourth predicted value calculation method, wherein the third predicted value calculation method and the fourth predicted value calculation method are both the first predicted value calculation method and the second predicted value calculation method and Any one of the third predicted value calculation methods, and the third predicted value calculation method is different from the fourth predicted value calculation method.
  • the decoding end After determining the prediction value calculation method corresponding to the current point according to the above method 1 or method 2, the decoding end executes S103-B2 to determine the attribute prediction value of the current point based on the prediction value calculation method and the attribute information of the M prediction points.
  • the above S103-B2 has different implementation processes depending on the calculation method of the predicted value corresponding to the current point. Examples include but are not limited to the following situations:
  • the first predicted value calculation method is a weighted method.
  • the decoder determines the reciprocal of the distance between each of the M prediction points and the current point as the first weight of each of the M prediction points; according to the first weight of each of the M prediction points Weight, weight the attribute information of M prediction points to obtain the attribute prediction value of the current point.
  • the decoder determines the attribute prediction value of the current point according to the following formula (3):
  • Y is the attribute prediction value of the current point
  • M is the number of prediction points
  • Wi is the first weight of the i-th prediction point among the M prediction points
  • Pi is the attribute information of the i-th prediction point.
  • the second predicted value calculation method is another weighting method.
  • the decoder determines the second weight of the prediction point for each prediction point among the M prediction points based on the position information of the prediction point and the current point and the preset coordinate axis weight; according to each prediction point among the M prediction points The second weight weights the attribute information of the M prediction points to obtain the attribute prediction value of the current point.
  • the above-mentioned first prediction value calculation method uses the reciprocal of the distance as the weight of each prediction point.
  • the Euclidean distance consider that the distribution of point clouds in the three axes of xyz is uneven. Some point clouds have a large spatial distribution span in the xy plane, but a small spatial distribution span in the z direction. Based on this, different weights are set for different direction axes.
  • the second weight of the prediction point is determined according to the following formula (4):
  • i is the current point
  • j is the jth prediction point among M prediction points
  • (x i , y i , z i ) is the coordinate of the current point
  • (x ij , y ij , z ij ) is the j-th of the M predicted points of the current point
  • the coordinates of the prediction point, a, b, c are the weights corresponding to the xyz three axes.
  • a and b are 1.
  • the second weight of each prediction point among the M prediction points is determined according to the above formula (4), and then the attribute information of the M prediction points is weighted according to the second weight of each prediction point among the M prediction points to obtain the current Point attribute prediction value.
  • the attribute prediction value of the current point is determined according to the following formula (5):
  • the third prediction value calculation method is to determine M+1 prediction values based on M prediction points, and then determine the current point from the M+1 prediction values. attribute prediction value.
  • the decoder first determines the attribute weighted average of the M prediction points, and uses the attribute weighted average as a prediction value; based on the attribute information of the M prediction points, determines the M prediction values; based on the determined prediction value and M predicted values, determine the attribute predicted value of the current point.
  • the decoder determines M+1 attribute prediction values, specifically, one attribute prediction value determined by the attribute weighted average of M prediction points, and M determined based on the attribute information of the M prediction points.
  • attribute prediction values for example, the attribute information of M prediction points is determined as M attribute prediction values.
  • the attribute prediction value of the current point is determined.
  • the decoder decodes the point cloud code stream to obtain a second index, which is used to indicate the target prediction value, and then determines the target prediction value corresponding to the second index among the M+1 prediction values as the current point. attribute prediction value.
  • the weighting methods involved in the embodiments of the present application include at least two types shown in case 1 and case 2. Therefore, in case 3, before determining the attribute weighted average of M prediction points, the target first needs to be determined. Weighted average method, and then use the target weighted average method to determine the attribute weighted average of the M prediction points.
  • the target weighted average method is any one of the first weighted average method and the second weighted average method.
  • the first weighted average method is the weighted method in the above case 1
  • the second weighted average method is the weighted method in the above case 2.
  • the above-mentioned target weighted average mode is the default mode.
  • the target weighted average method is determined based on the classification information of M prediction points.
  • the target weighted average method is determined to be the first weighted average method; if among the M prediction points, the same category as the current point is The number of prediction points of the same category is less than the second threshold, then the target weighted average method is determined to be the second weighted average method, where the first weighted average method and the second weighted average method are both the first weighted average method and any one of the second weighted average methods, and the first weighted average method is different from the second weighted average method.
  • the target weighted average method is determined to be the third weighted average method; if the categories of the M predicted points and the current point are both of the second category , then it is determined that the target weighted average method is the fourth weighted average method, where the third weighted average method and the fourth weighted average method are both the first weighted average method and the second weighted average method, and the third weighted average method is The three weighted average methods are different from the fourth weighted average method.
  • the target weight calculation method is the first weighted average method
  • the reciprocal of the distance between each of the M prediction points and the current point is determined as the first of each of the M prediction points.
  • Weight weight the attribute information of the M prediction points according to the first weight of each prediction point among the M prediction points, and obtain the weighted average of the attributes of the M prediction points.
  • the target weighting calculation method is the second weighted average method
  • the prediction point is determined based on the position information of the prediction point and the current point and the preset coordinate axis weight. the second weight; weight the attribute information of the M prediction points according to the second weight of each prediction point among the M prediction points, and obtain the attribute weighted average of the M prediction points.
  • the decoder determines the attribute prediction value of the current point according to the description of S103 above, and then performs the following steps of S104.
  • the decoder decodes the code stream to obtain the attribute residual value of the current point, and then obtains the attribute reconstruction value of the current point based on the attribute residual value and attribute prediction value of the current point. For example, the sum of the attribute residual value and the attribute prediction value of the current point is determined as the attribute reconstruction value of the current point.
  • the point cloud encoding method determines the classification information of the current point and the decoded point in the point cloud, and/or the distance information between the decoded point and the current point.
  • the classification information is used to indicate the category to which the point belongs. ;
  • the embodiment of the present application not only considers the distance information, but also considers the classification information, thereby improving the accuracy of determining the reference point. Based on the accurately determined When using reference points for attribute prediction, the accuracy of attribute prediction can be improved.
  • the above takes the decoding end as an example to introduce the point cloud decoding method provided by the embodiment of the present application in detail.
  • the following takes the encoding end as an example to introduce the point cloud encoding method provided by the embodiment of the present application.
  • Figure 6 is a schematic flow chart of a point cloud encoding method provided by an embodiment of the present application.
  • the point cloud encoding method in the embodiment of the present application can be completed by the point cloud encoding device shown in the above-mentioned Figure 1 or Figure 2.
  • the point cloud decoding method in this embodiment of the present application includes:
  • S201 Determine the classification information of the current point and the coded point in the point cloud, and/or the distance information between the coded point and the current point.
  • the classification information is used to indicate the category to which the points in the point cloud belong.
  • classification information can be understood as the real-world categories to which points in the point cloud belong, such as roads, cars, pedestrians, etc.
  • the classification information of the current point and the coded point, and/or the distance information between the coded point and the current point are determined, and then the current point is determined from the coded points based on the classification information and/or distance information.
  • K reference points Since the attribute information of points of the same category is relatively similar, based on this, when determining the reference point, the embodiment of the present application not only considers the distance information, but also considers the classification information, thereby improving the accuracy of determining the reference point. Based on the accurately determined When using reference points for attribute prediction, the accuracy of attribute prediction can be improved.
  • the methods for determining the classification information of the current point and the coded point in the point cloud in S201 above include but are not limited to the following:
  • Method 1 Before attribute encoding of the point cloud, the geometric encoding of the point cloud (also called position encoding) has been completed, and the geometric information of the points in the point cloud has been obtained. Segment the point cloud according to the geometric information of the points in the point cloud to obtain the classification information of the point cloud, and then determine the classification information of the current point and the coded point.
  • position encoding also called position encoding
  • the point cloud code stream includes indication information of the classification information of the points in the point cloud, so that the encoding end obtains the classification information of the current point and the coded point by encoding the point cloud code stream. For example, the encoding end writes the category identifier of each point in the point cloud into the code stream. The encoding end obtains the category identifier of the current point in the point cloud and the encoded point through the encoding stream, and then determines the classification information based on the category identifier. .
  • Method 3 Use the pre-trained neural network model to predict the classification information of the current point and the encoded point.
  • the encoding end can determine the distance information between the encoded point and the current point based on the position information of the encoded point and the position information of the current point.
  • the embodiment of the present application does not limit the specific method of determining the distance between the encoded point and the current point.
  • a Manhattan distance between the encoded point and the current point is determined according to a Manhattan distance calculation method.
  • the Euclidean distance between the encoded point and the current point is determined based on the Euclidean distance calculation method.
  • the embodiments of this application do not limit the specific number of coded points used to determine classification information and distance information.
  • the L coded points located before the current point in the coding sequence are used as research objects, the classification information of the current point and these L coded points is determined, and/or the classification information of the L coded points is determined.
  • the encoding order in the embodiment of the present application can be any one of the original input order of points in the point cloud, Morton order, Hilbert order, and LOD order.
  • the Morton order can be understood as the order obtained by converting the coordinates of the points in the point cloud into Morton codes, and sorting the point cloud from small to large according to the size of the Morton codes.
  • the Hilbert order can be understood as the order obtained by converting the coordinates of the points in the point cloud into Hilbert codes, and sorting the point clouds from small to large according to the size of the Hilbert codes.
  • the classification information of the current point and the coded point, and/or the distance information between the coded point and the current point can be determined. Then, the following step S202 is performed.
  • the encoding end determines K reference points of the current point from the encoded points based on the classification information of the current point and the encoded points. For example, the coding end determines K coded points that are close to the current point in the coding sequence and have the same category as the current point as the K reference points of the current point.
  • the encoding end determines K reference points of the current point from the encoded points based on the classification information of the current point and the encoded point, and the distance between the encoded point and the current point. For example, the coding end determines the K coded points whose categories are consistent with the current point category and are closest to the current point as the K reference points of the current point.
  • the encoding end determines K reference points of the current point from the encoded points based on the distance between the encoded point and the current point. For example, the coding end determines the K coded points closest to the current point as the K reference points of the current point.
  • the embodiments of the present application include multiple ways of determining the reference point.
  • the above-mentioned S202 includes the following steps of S202-A and S202-B:
  • S202-B Determine K reference points of the current point from the encoded points according to the reference point determination mode and at least one of the classification information and the distance information.
  • the encoding end determines the reference point of the current point, it first needs to determine the reference point determination mode corresponding to the current point, and then determine the mode based on the determination of the reference point, and classify At least one of information and distance information, K reference points of the current point are determined from the encoded points.
  • the reference point determination mode of all points in the point cloud is the same, that is, the encoding end uses a reference point determination mode to determine the reference point of each point in the point cloud.
  • the reference point determination mode may be a default mode.
  • the encoding end determines a reference point determination mode from multiple reference point determination modes, and writes the determined reference point determination mode into the code stream to indicate to the encoding end, so that the decoding end obtains the code stream through the encoding code stream.
  • a reference point determination pattern is used to determine the reference point for all points in the point cloud.
  • the encoding end can also encode an identification bit for each point in the point cloud to indicate the reference point determination mode corresponding to each point.
  • multiple reference point determination modes can be used in the point cloud. For example, some points in the point cloud use one reference point determination mode to determine the reference point, and another reference point uses another reference point determination mode to determine the reference point. Determine the reference point.
  • the reference point determination mode is any one of a first reference point determination mode, a second reference point determination mode, and a third reference point determination mode.
  • at least one of the first reference point determination mode, the second reference point determination mode and the third reference point determination mode determines the reference point based on classification information.
  • the methods for determining the reference point determination mode corresponding to the current point in the above S202-A include but are not limited to the following:
  • Method 1 Determine the reference point determination mode corresponding to the current point based on the classification information of the current point.
  • the reference point determination mode is determined to be the first reference point determination mode.
  • the reference point determination mode is determined to be the second reference point determination mode.
  • the above-mentioned second reference point determination mode and the first reference point determination mode are any one of the above-mentioned first reference point determination mode, second reference point determination mode and third reference point determination mode, and the second reference point determination mode The determination mode is different from the first reference point determination mode.
  • the correspondence between the categories of points in the point cloud and the reference point determination mode is as shown in Table 1.
  • the encoding end can query the above Table 1 according to the classification information of the current point to determine the reference point determination mode corresponding to the current point.
  • the above-mentioned first reference point determination mode and second determination mode are default modes. For example, if the category of the current point is the first category, the coding end determines by default that the reference point corresponding to the current point is determined as The second reference point determination mode, that is, the first reference point determination mode is the second reference point determination mode. If the category of the current point is the second category, the encoding end defaults to the reference point determination mode corresponding to the current point as the third reference point determination mode, that is, the second reference point determination mode is the third reference point determination mode.
  • the above-mentioned first reference point determination mode and second determination mode are indicated by the user.
  • the decoding end indicates the first reference point determination mode and the second determination mode to the decoding end.
  • the encoding end can write the reference point determination modes corresponding to different categories into the code stream, so that the decoding end can determine the reference point determination mode corresponding to the category to which the current point belongs by encoding the code stream.
  • the reference point determination mode corresponding to the current point can also be determined based on the classification information of the current point and the coded point.
  • the reference point determination mode corresponding to the current point is determined to be a reference point determination mode.
  • the reference point determination mode corresponding to the current point is determined to be another reference point determination mode.
  • the encoding end can also use the following method two, three, or four to determine the reference point determination mode corresponding to the current point.
  • the reference point determination mode corresponding to the current point is the default mode. That is to say, both the encoding end and the decoding end use the default mode to determine the reference point of the current point.
  • the above-mentioned default mode may be any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
  • Method 3 The reference point determination mode corresponding to the current point is determined by the encoding end based on the cost, or selected randomly.
  • the code writes a first identifier in the point cloud code stream, and the first identifier is used to indicate the reference point determination mode corresponding to the current point.
  • the first identifier may be an index of a pattern determined for the reference point.
  • the encoding end may encode a first identifier for each point in the point cloud, which is used to indicate the reference point determination mode corresponding to the point.
  • the encoding end can write a first identifier in the code stream, and the first identifier is used for Indicates the reference point determination pattern corresponding to all points in the point cloud.
  • the encoding end can encode different first identifiers for points of different categories, for example, the first type of point cloud corresponds to The first identifier of is B1, and the first identifier corresponding to the second type of point cloud is B2.
  • the decoder can determine the first identifier corresponding to the current point based on the classification information of the current point, and then determine the reference point determination mode corresponding to the current point based on the first identifier. For example, if the current point is a point cloud of the first type, the decoding end determines the reference point determination mode corresponding to the first identifier B1 as the reference point determination mode corresponding to the current point. If the current point is a point cloud of the second type, the decoding end determines the reference point determination mode corresponding to the first identifier B1. The reference point determination mode corresponding to the first identification B2 is determined as the reference point determination mode corresponding to the current point.
  • Method 4 The encoding end uses an adaptive method to determine the reference point determination mode corresponding to the current point.
  • the above S202-A includes the following steps:
  • N is a positive integer
  • the N reference point candidate determination modes are any N modes among the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
  • the above-mentioned N reference point candidate determination modes are encoding defaults.
  • the encoding end determines N reference point candidate determination modes from the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode, and determines the N reference point candidate determination modes Indicated to the encoding end.
  • the encoding end can also obtain the N reference point candidate determination modes through other methods, and the embodiments of the present application do not limit this. After the encoding end obtains N reference point candidate determination modes, it determines the reference point determination mode corresponding to the current point from these N reference point candidate determination modes.
  • the encoding end determines a reference point candidate determination pattern from N reference point candidate determination patterns as the reference point determination pattern corresponding to the current point, including but not limited to the following:
  • Method 1 The encoding end determines the reference point determination mode corresponding to the current point from the N reference point candidate determination modes based on the classification information of the current point.
  • reference point candidate mode a among the N reference point candidate determination modes is determined as the reference point determination mode corresponding to the current point.
  • reference point candidate mode b among the N reference point candidate determination modes is determined as the reference point determination mode corresponding to the current point.
  • Method 2 The encoding end determines the cost of N reference point candidate determination modes; the reference point candidate determination mode with the smallest cost among the N reference point candidate determination modes is determined as the reference point determination mode corresponding to the current point.
  • the above cost can be the sum of squared differences (Sum of Squared Difference, SSD), absolute error (Sum of Absolute Difference, SAD), sum of absolute values after Hadamard transformation (Sum of Absolute Transformed Difference, SATD), etc.
  • the embodiment of the present application does not limit the specific method of determining the cost of the N reference point candidate determination modes.
  • the coding end selects the P points closest to the current point from the coded points according to the coding order, where P is a positive integer; and determines the jth reference point in the pattern based on the N reference point candidates.
  • Candidate determination mode use the jth reference point candidate determination mode to predict P points, and obtain the attribute prediction values of P points in the jth reference point candidate determination mode, j is a positive integer; according to the P points in the jth reference point candidate determination mode
  • the j reference point candidate determines the attribute prediction value in the mode, and determines the cost of the jth reference point candidate mode.
  • the method of determining the cost of the j-th reference point candidate determination mode includes but is not limited to the following examples:
  • Example 1 Since P points are attribute-encoded points, the predicted attribute values of these P points have been determined during attribute encoding. For the convenience of description, the attribute predicted values of P points determined during the attribute encoding process are recorded as Predict the value for the original attribute. In this way, the predicted attribute values of P points in the j-th reference point candidate determination mode can be compared with the original attribute prediction values to determine the cost of the j-th reference point candidate determination mode. For example, the sum of the differences between the attribute prediction values of P points in the j-th reference point candidate determination mode and the original attribute prediction values of the P points is determined as the cost of the j-th reference point candidate determination mode.
  • the cost of the j-th reference point candidate determination mode is determined according to formula (1) as follows.
  • Example 2 Determine the attribute reconstruction values of P points in the j-th reference point candidate determination mode based on the attribute prediction values of P points in the j-th reference point candidate determination mode; based on the attribute prediction values of P points in the j-th reference point candidate determination mode; The attribute reconstruction value in the point candidate determination mode and the encoded attribute values of P points determine the cost of the jth reference point candidate determination mode.
  • the code stream is encoded to obtain the attribute residual values of P points, and the attribute prediction values of the P points in the jth reference point candidate determination mode are added to the attribute residual values of the P points.
  • the attribute reconstruction value of each point in the P points in the j-th reference point candidate determination mode can be obtained. Since the attribute information of the P points has been encoded, the j-th reference point candidate determination mode is determined based on the attribute reconstruction values of the P points in the j-th reference point candidate determination mode and the encoded attribute values of the P points. price. For example, cost calculation methods such as SAD, SATD, and SSD are used to determine the cost of the j-th reference point candidate determination mode.
  • the cost corresponding to each mode in the N reference point candidate determination modes can be determined, and then the reference point candidate determination mode with the smallest cost is determined as the reference point determination mode corresponding to the current point.
  • the encoding end determines the reference point determination mode corresponding to the current point according to the above method, it executes the above-mentioned step S202-B, and based on the reference point determination mode corresponding to the current point and at least one of the classification information and distance information, from the encoded point Determine the K reference points of the current point.
  • the above S202-B has different implementation processes depending on the reference point determination mode corresponding to the current point. Examples include but are not limited to the following situations:
  • the first reference point determination mode uses the K coded points closest to the current point in the coding sequence as reference points. At this time, according to the coding order, the K coded points closest to the current point among the coded points are determined as K reference points.
  • the distance can be Manhattan distance or Euclidean distance.
  • the second reference point determination mode determines K coded points whose classification information is the same as the classification information of the current point as reference points. At this time, according to the coding order, K coded points whose classification information is consistent with the classification information of the current point are selected from the coded points as K reference points. For example, for the current point, search forward according to the coding order. If the found candidate reference point belongs to the same category as the current point, keep it. Otherwise, continue to search until k reference points with the same category as the current point are found.
  • case 2 The actual effect of case 2 is equivalent to dividing the entire point cloud into multiple parts according to the classification information, and then searching each part independently according to the method of case 1.
  • the third reference point is determined based on classification information and distance information. Therefore, if the encoding end determines that the reference point determination mode corresponding to the current point is the third reference point determination mode according to the above steps of S202-A, the encoding end performs the following steps from S202-B1 to S202-B3:
  • the weight of the encoded point is determined based on at least one of the classification information and the distance information, and then based on the weight, Determine the score of the coded points, and then determine K reference points from the coded points based on the scores.
  • the above-mentioned S202-B1 determines the weight of the coded points based on at least one of classification information and distance information, including but not limited to the following:
  • Method 1 Determine the weight of the coded points based on the classification information.
  • the process of determining the weight of each point in the coded points is the same.
  • the i-th point among the coded points as an example.
  • the classification information of the i-th point determine the The weight of the i-th point, i is a positive integer.
  • different weights are configured for points of different categories. For example, if the i-th point belongs to the first category, then the weight of the i-th point is determined to be W1. If the i-th point belongs to For the second category, determine the weight of the i-th point as W2. Among them, W1 and W2 are preset values or default values.
  • the weight of the i-th point is determined based on the classification information of the i-th point and the classification information of the current point.
  • the weight of the i-th point is determined to be the first weight
  • the weight of the i-th point is determined to be the second weight.
  • the weight of each point in the coded points can be determined by referring to the method of determining the weight of the i-th point.
  • the encoding end can also determine the weight of the encoded points based on the classification information and distance information.
  • the weight 1 based on the classification information of the i-th point
  • determine the weight 2 based on the distance between the i-th point and the current point
  • determine the weight 1 and weight 2 based on the distance between the i-th point and the current point.
  • the weight 1 of the i-th point is determined as the first weight.
  • the weight 1 of the i-th point is determined as the second weight.
  • the distance between the i-th point and the current point is reciprocally determined to be the weight 2 of the i-th point.
  • the encoding end can also determine the weight of the encoded points based on the distance information. For example, the reciprocal of the distance from the encoded point to the current point is determined as the weight of the encoded point.
  • the above S202-B2 is executed to determine the score of the encoded points based on the weight.
  • the coding end uses or converts the weight of the coded point determined above as a score of the coded point. In other words, the greater the weight of an encoded point, the higher the corresponding score.
  • the score of the i-th point is determined based on the distance information between the i-th point and the current point, and the weight of the i-th point.
  • the classification information is considered.
  • the weight between the i-th point and the current point can be determined.
  • the distance information, as well as the weight of the i-th point determine the score of the i-th point.
  • the product of the distance information between the i-th point and the current point and the weight of the i-th point is determined as the score of the i-th point.
  • the score of the i-th point is determined according to the above formula (2).
  • the encoding end can also perform other operations on the distance information between the i-th point and the current point, as well as the weight of the i-th point, to obtain the score of the i-th point. This is not done in the embodiment of this application. limit.
  • the classification information of the i-th point and the i-th point can be used.
  • the weight of the point determines the score of the i-th point. For example, a weight is determined based on the classification information of the i-th point, and the product or sum of the weight and the weight of the i-th point is determined as the score of the i-th point.
  • Each point in the coded point can refer to the method of the i-th point to determine the score of each point in the coded point. Then based on the score, from the coded point K parameter points are determined among the points.
  • the K coded points with the largest scores among the coded points are determined as the K reference points of the current point.
  • the weight of the coded point is determined using the above method 1, that is, if the classification information of the i-th point is consistent with the classification information of the current point, then the weight of the i-th point is determined to be the first weight; if If the classification information of the i point is inconsistent with the classification information of the current point, then the weight of the i-th point is determined to be the second weight. If the second weight is greater than the first weight, the K points with the smallest scores among the coded points are determined as K reference points.
  • the first weight is a positive number less than 1, and the second weight is a positive number greater than 1.
  • the encoding end determines K reference points of the current point according to the above method. From the above, it can be seen that when determining the reference points, the embodiment of this application not only considers distance information, but also considers classification information, thereby improving The accuracy of the determination of the reference point can improve the accuracy of the attribute prediction when performing attribute prediction based on the accurately determined reference point.
  • the encoding end After the encoding end determines the K reference points of the current point, it performs the following steps of S203.
  • the encoding end directly determines the attribute prediction value of the current point based on the attribute information of the K reference points. For example, the weighted average of the attribute information of K reference points is determined as the attribute prediction value of the current point.
  • the above S203 includes the following steps S203-A and S203-B.
  • S203-A Determine M prediction points from K reference points, where M is a positive integer less than or equal to K.
  • M prediction points are determined from K reference points, and based on the attribute information of these M prediction points, the attribute prediction value of the current point is determined.
  • the above S203-A includes the following steps:
  • S203-A2 Determine M prediction points from K reference points according to the prediction point determination mode.
  • the encoding end first determines the prediction point determination mode corresponding to the current point from a plurality of M prediction points from K reference points, and then determines the mode from the K reference points based on the prediction point. Determine M prediction points.
  • the prediction point determination mode of all points in the point cloud is the same, that is, the encoding end uses a prediction point determination mode to determine the prediction point of each point in the point cloud.
  • multiple prediction point determination modes can be used in the point cloud. For example, some points in the point cloud use one prediction point determination mode to determine the prediction point, and another prediction point uses another prediction point determination mode. to determine the prediction point.
  • the embodiment of the present application does not limit the prediction point determination mode.
  • the prediction point determination mode is any one of a first prediction point determination mode, a second prediction point determination mode, and a third prediction point determination mode.
  • at least one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode determines the prediction point based on the classification information.
  • the methods for determining the prediction point determination mode corresponding to the current point in the above S203-A include but are not limited to the following:
  • Method 1 Determine the prediction point determination mode corresponding to the current point based on the classification information of the current point.
  • the prediction point determination mode is determined to be the first prediction point determination mode.
  • the prediction point determination mode is determined to be the second prediction point determination mode.
  • the above-mentioned second prediction point determination mode and the first prediction point determination mode are any one of the above-mentioned first prediction point determination mode, second prediction point determination mode and third prediction point determination mode, and the second prediction point determination mode The determination mode is different from the first prediction point determination mode.
  • the correspondence between the categories of points in the point cloud and the prediction point determination mode is as shown in Table 2.
  • the encoding end can query the above Table 2 according to the classification information of the current point to determine the prediction point determination mode corresponding to the current point.
  • first prediction point determination mode and second determination mode are default modes.
  • the above-mentioned first prediction point determination mode and second determination mode are randomly selected by the encoding end or determined based on cost.
  • the encoding end indicates the first prediction point determination mode and the second determination mode to the decoding end.
  • the encoding end can write prediction point determination modes corresponding to different categories into the code stream, so that the decoding end can determine the prediction point determination mode corresponding to the category to which the current point belongs by encoding the code stream.
  • the prediction point determination mode corresponding to the current point can also be determined based on the classification information of the current point and the encoded point.
  • the prediction point determination mode corresponding to the current point is determined to be a prediction point determination mode.
  • the prediction point determination mode corresponding to the current point is determined to be another prediction point determination mode.
  • the encoding end can also use the following method two, three, four or five to determine the prediction point determination mode corresponding to the current point.
  • Method 2 Determine the prediction point determination mode based on the classification information of K reference points.
  • the number of points belonging to different categories among the K reference points is determined, and the prediction point determination mode corresponding to the category with the largest number is determined as the prediction point determination mode corresponding to the current point.
  • the number of points belonging to the first category is the largest.
  • the first category corresponds to the first prediction point determination mode, and then the first prediction point determination mode is determined as the current point.
  • the corresponding prediction points determine the mode.
  • the prediction point determination mode corresponding to the current point is determined based on the classification information of the K reference points and the current point.
  • the prediction point determination mode is determined to be the third prediction point determination mode
  • the prediction point determination mode is determined to be the fourth prediction point determination mode, and the fourth prediction point determination mode is the same as the third prediction point determination mode.
  • Each of the three prediction point determination modes is any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode, and the fourth prediction point determination mode is different from the third prediction point determination mode.
  • the prediction point determination mode corresponding to the current point is the default mode. That is to say, both the encoding end and the encoding end use the default mode to determine the prediction point of the current point.
  • the above default mode may be any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
  • Method 4 The encoding end selects a prediction point determination mode based on cost or randomly as the prediction point determination mode corresponding to the current point.
  • the encoding end writes a second identifier in the point cloud code stream, and the second identifier is used to indicate the prediction point determination mode corresponding to the current point.
  • the prediction point determination mode is indicated to the encoding end. Specifically, a second identifier is written in the code stream, and the second identifier is used to determine the prediction point determination mode. Indicates the prediction point determination mode corresponding to the current point.
  • the second identification may determine the index of the mode for the prediction point.
  • the encoding end may encode a second identifier for each point in the point cloud, which is used to indicate the prediction point determination mode corresponding to the point.
  • the encoding end can write a second identifier in the code stream, and the second identifier is used for Indicates the prediction point determination mode corresponding to all points in the point cloud.
  • the encoding end can encode different second identifiers for points of different categories, for example, corresponding to point clouds of the first category
  • the second identifier is B1
  • the second identifier corresponding to the second type of point cloud is B2.
  • Method 5 The encoding end uses an adaptive method to determine the prediction point determination mode corresponding to the current point.
  • the above S203-A includes the following steps:
  • the Q prediction point candidate determination modes are any Q modes among the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
  • the above-mentioned Q prediction point candidate determination modes are encoding defaults.
  • the encoding end determines Q prediction point candidate determination modes from the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode. Further, the encoding end indicates the Q prediction point candidate determination mode to the encoding end.
  • the encoding end can also obtain the Q prediction point candidate determination modes through other methods, and the embodiments of the present application do not limit this. After the encoding end obtains Q prediction point candidate determination modes, it determines the prediction point determination mode corresponding to the current point from these Q prediction point candidate determination modes.
  • the encoding end determines one prediction point candidate determination mode from Q prediction point candidate determination modes as the prediction point determination mode corresponding to the current point, including but not limited to the following:
  • Method 1 The encoding end determines the prediction point determination mode corresponding to the current point from the Q prediction point candidate determination modes based on the classification information of the current point.
  • the prediction point candidate mode a among the Q prediction point candidate determination modes is determined as the prediction point determination mode corresponding to the current point.
  • the prediction point candidate mode b among the Q prediction point candidate determination modes is determined as the prediction point determination mode corresponding to the current point.
  • Method 2 The encoding end determines the cost of the Q prediction point candidate determination modes; and determines the prediction point determination mode corresponding to the current point based on the costs of the Q prediction point candidate determination modes.
  • the above cost can be the sum of squared differences (Sum of Squared Difference, SSD), absolute error (Sum of Absolute Difference, SAD), sum of absolute values after Hadamard transformation (Sum of Absolute Transformed Difference, SATD), etc.
  • the maximum attribute difference may also be determined as the cost.
  • the embodiment of the present application does not limit the specific method of determining the cost of the Q prediction point candidate determination modes.
  • the coding end selects the P points closest to the current point from the coded points according to the coding order, where P is a positive integer; the jth prediction point in the pattern is determined for the Q prediction point candidates.
  • Candidate determination mode use the jth prediction point candidate determination mode to predict P points, and obtain the attribute prediction values of P points in the jth prediction point candidate determination mode, j is a positive integer; according to the P points in the jth prediction point candidate determination mode
  • the j prediction point candidate determines the attribute prediction value in the mode, and determines the cost of the jth prediction point candidate mode.
  • the coding end selects P points closest to the current point from the coded points according to the coding order, and uses Q prediction point candidate determination modes to predict the P points respectively, and obtain Q
  • the attribute prediction values of P points corresponding to each prediction point candidate determination mode in the prediction point candidate determination mode are then determined, and the cost of each prediction point candidate determination mode is determined based on the attribute prediction values of the P points.
  • the method of determining the cost of the j-th prediction point candidate determination mode includes but is not limited to the following examples:
  • Example 1 Since P points are attribute-encoded points, the predicted attribute values of these P points have been determined during attribute encoding. For the convenience of description, the attribute predicted values of P points determined during the attribute encoding process are recorded as Predict the value for the original attribute. In this way, the predicted attribute values of P points in the j-th prediction point candidate determination mode can be compared with the original attribute prediction values, and the cost of the j-th prediction point candidate determination mode can be determined. For example, the sum of the differences between the attribute prediction values of P points in the j-th prediction point candidate determination mode and the original attribute prediction values of the P points is determined as the cost of the j-th prediction point candidate determination mode.
  • Example 2 Determine the attribute reconstruction value of P points in the j-th prediction point candidate determination mode based on the attribute prediction values of P points in the j-th prediction point candidate determination mode; determine the attribute reconstruction value of P points in the j-th prediction point candidate determination mode; The attribute reconstruction value in the point candidate determination mode and the encoded attribute values of P points determine the cost of the jth prediction point candidate determination mode.
  • the cost corresponding to each mode in the N prediction point candidate determination modes can be determined, and then the prediction point determination mode is determined based on the costs of the Q prediction point candidate determination modes.
  • the prediction point candidate determination mode with the smallest cost is determined as the prediction point determination mode corresponding to the current point.
  • the first prediction point determination mode is determined as the prediction point determination mode corresponding to the current point, otherwise the second prediction point determination mode is determined as the prediction point determination mode corresponding to the current point. model.
  • the encoding end determines the prediction point determination mode corresponding to the current point according to the above method, it executes the above step S203-B to determine M prediction points from the K reference points according to the prediction point determination mode corresponding to the current point.
  • the above S203-B has different implementation processes depending on the prediction point determination mode corresponding to the current point. Examples include but are not limited to the following situations:
  • the first prediction point determination mode determines K reference points as prediction points. At this time, K reference points are determined as M prediction points, and M is equal to K at this time.
  • the second prediction point determination mode determines one reference point among the K reference points as the prediction point. At this time, one reference point is selected from K reference points and determined as the prediction point. At this time, M is equal to 1.
  • the method of selecting a reference point from K reference points and determining it as a prediction point includes at least the following examples:
  • Example 1 determine the reference point closest to the current point among K reference points as the prediction point.
  • Example 2 The first reference point among the K reference points that is closest to the attribute information of the current point is determined as the prediction point.
  • the encoding writes the first index in the point cloud code stream.
  • the first index is used to indicate the first reference point.
  • the first reference point is the one closest to the attribute information of the current point among the K reference points. A reference point.
  • the code stream may include indication information to indicate whether the prediction point is determined through the method of Example 1 or the method of Example 2.
  • the third prediction point is a prediction point determined based on classification information and distance information. Therefore, according to the above steps of S203-A, if the encoding end determines that the prediction point determination mode corresponding to the current point is the third prediction point determination mode, the classification information of the K reference points is consistent with the current point and is far away from the current point.
  • the nearest M reference points are determined as M prediction points.
  • the encoding end After determining M prediction points from the K reference points according to the above method, the encoding end performs the following steps of S203-B.
  • the attribute information of the predicted point is determined as the attribute predicted value of the current point.
  • the above S203-B includes the following steps:
  • S203-B2. Determine the attribute prediction value of the current point according to the prediction value calculation method and the attribute information of the M prediction points.
  • the above prediction value calculation method is any one of a first prediction value calculation method, a second prediction value calculation method, and a third prediction value calculation method.
  • the prediction value calculation method corresponding to the current point is first determined.
  • the prediction value calculation method is determined based on the classification information of the M prediction points. That is to say, in the embodiment of this application, different prediction value calculation methods are set for different point cloud categories, which further improves the calculation of attribute prediction values. accuracy.
  • S203-B1 implementation methods include at least the following:
  • Method 1 if the number of prediction points with the same category as the current point among the M prediction points is greater than or equal to the second threshold, then the prediction value calculation method is determined to be the first prediction value calculation method; if among the M prediction points, If the number of prediction points with the same category of the current point is less than the second threshold, then the prediction value calculation method is determined to be the second prediction value calculation method, where both the first prediction value calculation method and the second prediction value calculation method are Any one of the first predicted value calculation method, the second predicted value calculation method, and the third predicted value calculation method, and the first predicted value calculation method is different from the second predicted value calculation method.
  • Method 2 if the categories of the M predicted points and the current point are both the first category, then determine the predicted value calculation method as the third predicted value calculation method; if the categories of the M predicted points and the current point are both the second category When , it is determined that the predicted value calculation method is the fourth predicted value calculation method, wherein the third predicted value calculation method and the fourth predicted value calculation method are both the first predicted value calculation method and the second predicted value calculation method and Any one of the third predicted value calculation methods, and the third predicted value calculation method is different from the fourth predicted value calculation method.
  • S203-B2 is executed to determine the attribute prediction value of the current point based on the prediction value calculation method and the attribute information of the M prediction points.
  • the above S203-B2 has different implementation processes depending on the calculation method of the predicted value corresponding to the current point. Examples include but are not limited to the following situations:
  • the first predicted value calculation method is a weighted method.
  • the encoding end determines the reciprocal of the distance between each of the M prediction points and the current point as the first weight of each of the M prediction points; according to the first weight of each of the M prediction points Weight, weight the attribute information of M prediction points to obtain the attribute prediction value of the current point.
  • the encoding end determines the attribute prediction value of the current point according to the above formula (3).
  • the second predicted value calculation method is another weighting method.
  • the encoding end determines the second weight of the prediction point for each prediction point among the M prediction points based on the position information of the prediction point and the current point and the preset coordinate axis weight; according to each prediction point among the M prediction points The second weight weights the attribute information of the M prediction points to obtain the attribute prediction value of the current point.
  • the above-mentioned first prediction value calculation method uses the reciprocal of the distance as the weight of each prediction point.
  • the Euclidean distance consider that the distribution of point clouds in the three axes of xyz is uneven. Some point clouds have a large spatial distribution span in the xy plane, but a small spatial distribution span in the z direction. Based on this, different weights are set for different direction axes.
  • the second weight of the prediction point is determined according to the above formula (4).
  • the second weight of each prediction point among the M prediction points is determined according to the above formula (4), and then the attribute information of the M prediction points is weighted according to the second weight of each prediction point among the M prediction points to obtain the current Point attribute prediction value.
  • the attribute prediction value of the current point is determined according to the above formula (5).
  • the third prediction value calculation method is to determine M+1 prediction values based on M prediction points, and then determine the current point from the M+1 prediction values. attribute prediction value.
  • the encoding end first determines the attribute weighted average of the M prediction points, and uses the attribute weighted average as a prediction value; based on the attribute information of the M prediction points, determines the M prediction values; based on the determined prediction value and M predicted values, determine the attribute predicted value of the current point.
  • the encoding end determines M+1 attribute prediction values, specifically, one attribute prediction value determined by the attribute weighted average of M prediction points, and M determined based on the attribute information of the M prediction points.
  • attribute prediction values for example, the attribute information of M prediction points is determined as M attribute prediction values.
  • the attribute prediction value of the current point is determined.
  • the encoding end encodes the point cloud code stream to obtain a second index, which is used to indicate the target prediction value, and then determines the target prediction value corresponding to the second index among the M+1 prediction values as the current point attribute prediction value.
  • the weighting methods involved in the embodiments of the present application include at least two types shown in case 1 and case 2. Therefore, in case 3, before determining the attribute weighted average of M prediction points, the target first needs to be determined. Weighted average method, and then use the target weighted average method to determine the attribute weighted average of the M prediction points.
  • the target weighted average method is any one of the first weighted average method and the second weighted average method.
  • the first weighted average method is the weighted method in the above case 1
  • the second weighted average method is the weighted method in the above case 2.
  • the above-mentioned target weighted average mode is the default mode.
  • the target weighted average method is determined based on the classification information of M prediction points.
  • the target weighted average method is determined to be the first weighted average method; if among the M prediction points, the same category as the current point is The number of prediction points of the same category is less than the second threshold, then the target weighted average method is determined to be the second weighted average method, where the first weighted average method and the second weighted average method are both the first weighted average method and any one of the second weighted average methods, and the first weighted average method is different from the second weighted average method.
  • the target weighted average method is determined to be the third weighted average method; if the categories of the M predicted points and the current point are both of the second category , then it is determined that the target weighted average method is the fourth weighted average method, where the third weighted average method and the fourth weighted average method are both the first weighted average method and the second weighted average method, and the third weighted average method is The three weighted average methods are different from the fourth weighted average method.
  • the target weight calculation method is the first weighted average method
  • the reciprocal of the distance between each of the M prediction points and the current point is determined as the first of each of the M prediction points.
  • Weight weight the attribute information of the M prediction points according to the first weight of each prediction point among the M prediction points, and obtain the weighted average of the attributes of the M prediction points.
  • the target weighting calculation method is the second weighted average method
  • the prediction point is determined based on the position information of the prediction point and the current point and the preset coordinate axis weight. the second weight; weight the attribute information of the M prediction points according to the second weight of each prediction point among the M prediction points, and obtain the attribute weighted average of the M prediction points.
  • the encoding end determines the attribute prediction value of the current point according to the description of S203 above, and then performs the following steps of S204.
  • the attribute residual value of the current point is determined based on the attribute information and attribute predicted value of the current point.
  • the attribute residual value of the current point is determined by taking the difference between the attribute information and the attribute predicted value of the current point.
  • the attribute residual value of the current point is quantized to obtain a quantized coefficient, and the quantized coefficient is encoded to obtain a point cloud attribute code stream.
  • the point cloud coding method determines the classification information of the current point and the coded point in the point cloud, and/or the distance information between the coded point and the current point.
  • the classification information is used to indicate the category to which the point belongs. ;
  • the attribute prediction value of the point determines the attribute reconstruction value of the current point. That is to say, the embodiment of the present application not only considers distance information, but also considers classification information, thereby improving the accuracy of determining the reference point.
  • attribute prediction is performed based on the accurately determined reference point, the accuracy of attribute prediction can be improved, thereby improving Attribute encoding efficiency.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be used in this application.
  • the implementation of the examples does not constitute any limitations.
  • the term "and/or" is only an association relationship describing associated objects, indicating that three relationships can exist. Specifically, A and/or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
  • the character "/" in this article generally indicates that the related objects are an "or" relationship.
  • Figure 7 is a schematic block diagram of a point cloud decoding device provided by an embodiment of the present application.
  • the point cloud decoding device 10 may include:
  • Information determination unit 11 used to determine the classification information of the current point and the decoded point in the point cloud, and/or the distance information between the decoded point and the current point, the classification information is used to indicate the point to which the point belongs. category;
  • Reference point determination unit 12 configured to determine K reference points of the current point from the decoded points according to at least one of the classification information and distance information, where K is a positive integer;
  • the predicted value determination unit 13 is configured to determine the attribute predicted value of the current point based on the attribute information of the K reference points;
  • the reconstruction unit 14 is configured to determine the attribute reconstruction value of the current point according to the attribute prediction value of the current point.
  • the reference point determination unit 12 is specifically configured to determine the reference point determination mode corresponding to the current point; based on the reference point determination mode and at least one of the classification information and distance information, from the Determine the K reference points of the current point among the decoded points.
  • the reference point determination mode is any one of a first reference point determination mode, a second reference point determination mode, and a third reference point determination mode.
  • the reference point determination unit 12 is specifically configured to determine the reference point determination mode corresponding to the current point according to the classification information of the current point.
  • the reference point determination unit 12 is specifically configured to determine the reference point determination mode to be the first reference point determination mode if the category of the current point is the first category; if the category of the current point is the first category, The category is the second category, then the reference point determination mode is determined to be the second reference point determination mode, and both the second reference point determination mode and the first reference point determination mode are the first reference point Any one of the determination mode, the second reference point determination mode and the third reference point determination mode, and the second reference point determination mode is different from the first reference point determination mode.
  • the reference point determination unit 12 is specifically used to decode the point cloud code stream to obtain a first identifier, and the first identifier is used to indicate the reference point determination mode corresponding to the current point; according to the first Identifies the reference point determination mode.
  • the reference point determination mode is a default mode.
  • the reference point determination unit 12 is specifically configured to obtain N reference point candidate determination modes, where the N reference point candidate determination modes are the first reference point determination mode, the second reference point determination mode, and Any N modes in the third reference point determination mode, where N is a positive integer greater than 1; determine a reference point candidate determination mode from the N reference point candidate determination modes as the reference point determination mode.
  • the reference point determination unit 12 is specifically configured to determine the cost of the N reference point candidate determination modes; determine the reference point candidate determination mode with the lowest cost among the N reference point candidate determination modes as The reference point determines the pattern.
  • the reference point determination unit 12 is specifically configured to select the P points closest to the current point from the decoded points according to the decoding order, where the P is a positive integer; for the N
  • the jth reference point candidate determination mode in the reference point candidate determination mode uses the jth reference point candidate determination mode to predict the P points, and obtains that the P points are at the jth reference point.
  • the attribute prediction value in the candidate determination mode, the j is a positive integer; according to the attribute prediction value of the P points in the j-th reference point candidate determination mode, determine the j-th reference point candidate mode cost.
  • the reference point determination unit 12 is specifically configured to determine, based on the attribute prediction values of the P points in the j-th reference point candidate determination mode, the P points in the j-th reference point candidate determination mode.
  • the attribute reconstruction value in the reference point candidate determination mode determine the attribute reconstruction value of the P points in the jth reference point candidate determination mode and the decoded attribute value of the P point.
  • j reference point candidates determine the cost of the pattern.
  • the reference point determination unit 12 is specifically configured to determine the decoded points closest to the current point in the decoding order.
  • the K decoded points are determined as the K reference points.
  • the reference point determination unit 12 is specifically configured to select the classification information and the decoded points from the decoded points according to the decoding order.
  • the K decoded points whose classification information is consistent with the current point are used as the K reference points.
  • the reference point determination unit 12 is specifically configured to determine that the reference point has been determined based on at least one of the classification information and the distance information.
  • the reference point determination unit 12 is specifically configured to determine the weight of the i-th point among the decoded points according to the classification information of the i-th point, so Let i be a positive integer.
  • the reference point determination unit 12 is specifically configured to determine the weight of the i-th point based on the classification information of the i-th point and the classification information of the current point.
  • the reference point determination unit 12 is specifically configured to determine the weight of the i-th point as the first weight if the classification information of the i-th point is consistent with the classification information of the current point; If the classification information of the i-th point is inconsistent with the classification information of the current point, the weight of the i-th point is determined to be the second weight.
  • the reference point determination unit 12 is specifically configured to determine the i-th point based on the distance information between the i-th point and the current point, and the weight of the i-th point. score.
  • the reference point determination unit 12 is specifically configured to determine the product of the distance information between the i-th point and the current point and the weight of the i-th point as the product of the distance information between the i-th point and the current point and the weight of the i-th point. The score of i points.
  • the reference point determination unit 12 is specifically configured to determine the K points with the smallest scores among the decoded points as the K reference points. point.
  • the prediction value determination unit 13 is specifically configured to determine M prediction points from the K reference points, where M is a positive integer less than or equal to K; according to the attributes of the M prediction points information to determine the attribute prediction value of the current point.
  • the prediction value determination unit 13 is specifically configured to determine the prediction point determination mode corresponding to the current point; and determine M prediction points from the K reference points according to the prediction point determination mode.
  • the prediction point determination mode is any one of a first prediction point determination mode, a second prediction point determination mode, and a third prediction point determination mode.
  • the prediction value determination unit 13 is specifically configured to determine the prediction point determination mode according to the classification information of the current point.
  • the prediction value determination unit 13 is specifically configured to determine that the prediction point determination mode is the first prediction point determination mode if the category of the current point is the first category; if the category of the current point is the first category, The category is the second category, then the prediction point determination mode is determined to be the second prediction point determination mode, and both the second prediction point determination mode and the first prediction point determination mode are the first prediction point Any one of the determination mode, the second prediction point determination mode, and the third prediction point determination mode, and the second prediction point determination mode is different from the first prediction point determination mode.
  • the prediction value determination unit 13 is specifically configured to determine the prediction point determination mode according to the classification information of the K reference points.
  • the prediction value determination unit 13 is specifically configured to determine whether the prediction point is determined if the number of reference points belonging to the same category as the current point among the K reference points is greater than or equal to a first threshold.
  • the mode is the third prediction point determination mode; if the number of reference points belonging to the same category as the current point among the K reference points is less than the first threshold, then the prediction point determination mode is determined to be the fourth prediction point Determination mode, the fourth prediction point determination mode and the third prediction point determination mode are any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode , and the fourth prediction point determination mode is different from the third prediction point determination mode.
  • the prediction value determination unit 13 is specifically used to decode the point cloud code stream to obtain a second identification, and the second identification is used to indicate the prediction point determination mode corresponding to the current point; according to the second Identify and determine the prediction point determination mode.
  • the prediction point determination mode is a default mode.
  • the prediction value determination unit 13 is specifically configured to obtain Q prediction point candidate determination modes, where the Q prediction point candidate determination modes are the first prediction point determination mode, the second prediction point determination mode, and Any Q modes in the third prediction point determination mode, the Q is a positive integer greater than 1; from the Q prediction point candidate determination modes, a prediction point candidate determination mode is determined as the prediction point determination mode.
  • the prediction value determination unit 13 is specifically configured to determine the cost of the Q prediction point candidate determination modes; determine the prediction point determination mode according to the costs of the Q prediction point candidate determination modes. .
  • the prediction value determination unit 13 is specifically configured to select the P points closest to the current point from the decoded points according to the decoding order, where the P is a positive integer; for the Q points
  • the jth prediction point candidate determination mode in the prediction point candidate determination mode uses the jth prediction point candidate determination mode to predict the P points, and obtains that the P points are at the jth prediction point
  • the attribute prediction value in the candidate determination mode, the j is a positive integer; according to the attribute prediction value of the P points in the jth prediction point candidate determination mode, determine the jth prediction point candidate mode cost.
  • the predicted value determination unit 13 is specifically configured to determine, based on the attribute prediction values of the P points in the j-th predicted point candidate determination mode, the P points in the j-th predicted point candidate determination mode.
  • the attribute reconstruction value in the prediction point candidate determination mode according to the attribute reconstruction value of the P points in the jth prediction point candidate determination mode and the decoded attribute value of the P point, determine the j prediction point candidates determine the cost of the pattern.
  • the prediction value determination unit 13 is specifically configured to determine the K reference points as the M prediction points, where M equals K.
  • the prediction value determination unit 13 is specifically configured to select one reference point from the K reference points and determine it as a prediction point. , where M equals 1.
  • the predicted value determining unit 13 is specifically configured to determine a reference point closest to the current point among the K reference points as the predicted point.
  • the prediction value determination unit 13 is specifically used to decode the point cloud code stream to obtain the first index corresponding to the current point.
  • the first index is used to indicate the first reference point.
  • the first reference A point is a reference point among the K reference points that is closest to the attribute information of the current point; the first reference point corresponding to the first index among the K reference points is determined as the prediction point .
  • the prediction value determination unit 13 is specifically configured to match the classification information of the K reference points with the current point. , and the M reference points closest to the current point are determined as the M predicted points.
  • the predicted value determination unit 13 is specifically configured to determine a prediction value calculation method according to the classification information of the M prediction points; according to the prediction value calculation method, and the attribute information of the M predicted points to determine the attribute predicted value of the current point.
  • the predicted value calculation method is any one of a first predicted value calculation method, a second predicted value calculation method, and a third predicted value calculation method.
  • the prediction value determination unit 13 is specifically configured to determine the prediction value if the number of prediction points of the same category as the current point among the M prediction points is greater than or equal to a second threshold.
  • the calculation method is the first prediction value calculation method; if the number of prediction points with the same category as the current point among the M prediction points is less than the second threshold, it is determined that the prediction value calculation method is the third prediction value calculation method.
  • Two prediction value calculation methods, the first prediction value calculation method and the second prediction value calculation method are both the first prediction value calculation method, the second prediction value calculation method and the third prediction value calculation method. Any one of them, and the first predicted value calculation method is different from the second predicted value calculation method.
  • the predicted value determination unit 13 is specifically configured to determine that the predicted value calculation method is the third predicted value if the categories of the M predicted points and the current point are both of the first category. Calculation method; if the categories of the M predicted points and the current point are both in the second category, then the predicted value calculation method is determined to be the fourth predicted value calculation method, and the third predicted value calculation method is The fourth predicted value calculation method is any one of the first predicted value calculation method, the second predicted value calculation method, and the third predicted value calculation method, and the third predicted value calculation method It is different from the fourth predicted value calculation method.
  • the predicted value determination unit 13 is specifically configured to compare each of the M predicted points with the current point. The reciprocal of the distance between the M prediction points is determined as the first weight of each prediction point among the M prediction points; the attribute information of the M prediction points is weighted according to the first weight of each prediction point among the M prediction points. , obtain the attribute prediction value of the current point.
  • the predicted value determination unit 13 is specifically configured to calculate, for each of the M prediction points, according to the prediction point and the position information of the current point and the preset coordinate axis weight, determine the second weight of the prediction point; according to the second weight of each prediction point in the M prediction points, the M prediction points The attribute information is weighted to obtain the attribute prediction value of the current point.
  • the predicted value determination unit 13 is specifically configured to determine the attribute weighted average of the M prediction points, and calculate the The attribute weighted average is used as a predicted value; M predicted values are determined based on the attribute information of the M predicted points; and the attribute predicted value of the current point is determined based on the one predicted value and the M predicted values.
  • the prediction value determination unit 13 is specifically configured to determine a target weighted average method according to the classification information of the M prediction points; use the target weighted average method to determine the attribute weighting of the M prediction points. average value.
  • the target weighted average method is any one of a first weighted average method and a second weighted average method.
  • the prediction value determination unit 13 is specifically configured to determine the target weight if the number of prediction points of the same category as the current point among the M prediction points is greater than or equal to a second threshold.
  • the average method is the first weighted average method; if the number of prediction points with the same category as the current point among the M prediction points is less than the second threshold, then the target weighted average method is determined to be the second A weighted average method, the first weighted average method and the second weighted average method are any one of the first weighted average method and the second weighted average method, and the first weighted average method The first weighted average method is different from the second weighted average method.
  • the predicted value determination unit 13 is specifically configured to determine that the target weighted average method is the third weighted average if the categories of the M predicted points and the current point are both of the first category. method; if the categories of the M predicted points and the current point are both of the second category, then the target weighted average method is determined to be the fourth weighted average method, and the third weighted average method is the same as the The fourth weighted average method is any one of the first weighted average method and the second weighted average method, and the third weighted average method is different from the fourth weighted average method.
  • the prediction value determination unit 13 is specifically configured to calculate the distance between each prediction point among the M prediction points and the current point. The reciprocal of the distance is determined as the first weight of each prediction point among the M prediction points; the attribute information of the M prediction points is weighted according to the first weight of each prediction point among the M prediction points, Obtain the attribute weighted average of the M prediction points.
  • the predicted value determination unit 13 is specifically configured to calculate, for each of the M prediction points, according to the prediction point and the position information of the current point and the preset coordinate axis weight to determine the second weight of the prediction point; according to the second weight of each prediction point in the M prediction points, the M prediction points are The attribute information is weighted to obtain an attribute weighted average of the M prediction points.
  • the prediction value determination unit 13 is specifically used to decode the point cloud code stream to obtain a second index, the second index is used to indicate the target prediction value; the one prediction value and the M predictions are Among the values, the target predicted value corresponding to the second index is determined as the attribute predicted value of the current point.
  • the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be repeated here.
  • the point cloud decoding device 10 shown in FIG. 7 may correspond to the corresponding subject in performing the point cloud decoding method of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the point cloud decoding device 10 In order to implement the corresponding processes in the point cloud decoding method, for the sake of simplicity, they will not be described again here.
  • Figure 8 is a schematic block diagram of a point cloud encoding device provided by an embodiment of the present application.
  • the point cloud encoding device 20 includes:
  • Information determination unit 21 used to determine the classification information of the current point and the coded point in the point cloud, and/or the distance information between the coded point and the current point, the classification information is used to indicate the point to which the point belongs. category;
  • the reference point determination unit 22 is configured to determine K reference points of the current point from the encoded points according to at least one of the classification information and distance information, where the K is a positive integer;
  • the predicted value determination unit 23 is configured to determine the attribute predicted value of the current point based on the attribute information of the K reference points;
  • the encoding unit 24 is configured to determine the attribute residual value of the current point according to the attribute prediction value of the current point.
  • the reference point determination unit 22 is specifically configured to determine the reference point determination mode corresponding to the current point; based on the reference point determination mode and at least one of the classification information and the distance information, from the Determine the K reference points of the current point among the encoded points.
  • the reference point determination mode is any one of a first reference point determination mode, a second reference point determination mode, and a third reference point determination mode.
  • the reference point determination unit 22 is specifically configured to determine the reference point determination mode corresponding to the current point according to the classification information of the current point.
  • the reference point determination unit 22 is specifically configured to determine the reference point determination mode to be the first reference point determination mode if the category of the current point is the first category; if the category of the current point is the first category, The category is the second category, then the reference point determination mode is determined to be the second reference point determination mode, and both the second reference point determination mode and the first reference point determination mode are the first reference point Any one of the determination mode, the second reference point determination mode and the third reference point determination mode, and the second reference point determination mode is different from the first reference point determination mode.
  • the reference point determination mode is a default mode.
  • the reference point determination unit 22 is specifically configured to obtain N reference point candidate determination modes, where the N reference point candidate determination modes are the first reference point determination mode, the second reference point determination mode, and Any N modes in the third reference point determination mode, where N is a positive integer; from the N reference point candidate determination modes, a reference point candidate determination mode is determined as the reference point determination mode.
  • the reference point determination unit 22 is specifically configured to determine the cost of the N reference point candidate determination modes; determine the reference point candidate determination mode with the lowest cost among the N reference point candidate determination modes as The reference point determines the pattern.
  • the reference point determination unit 22 is specifically configured to select the P points closest to the current point from the encoded points according to the encoding order, where the P is a positive integer; for the N
  • the jth reference point candidate determination mode in the reference point candidate determination mode uses the jth reference point candidate determination mode to predict the P points, and obtains that the P points are at the jth reference point.
  • the attribute prediction value in the candidate determination mode, the j is a positive integer; according to the attribute prediction value of the P points in the j-th reference point candidate determination mode, determine the j-th reference point candidate mode cost.
  • the reference point determination unit 22 is specifically configured to determine, based on the attribute prediction values of the P points in the j-th reference point candidate determination mode, the P points in the j-th reference point candidate determination mode.
  • j reference point candidates determine the cost of the pattern.
  • the encoding unit 24 is also configured to write a first identifier in the point cloud code stream, where the first identifier is used to indicate the reference point determination mode corresponding to the current point.
  • the reference point determination unit 22 is specifically configured to select the encoded points from the current Point the nearest K coded points as the K reference points.
  • the reference point determination unit 22 is specifically configured to select classification information and the coded points from the coded points according to the coding sequence.
  • the K coded points whose classification information is consistent with the current point are used as the K reference points.
  • the reference point determination unit 22 is specifically configured to determine that the reference point has been determined based on at least one of the classification information and the distance information.
  • the reference point determination unit 22 is specifically configured to determine the weight of the i-th point according to the classification information of the i-th point among the encoded points, so Let i be a positive integer.
  • the reference point determination unit 22 is specifically configured to determine the weight of the i-th point based on the classification information of the i-th point and the classification information of the current point.
  • the reference point determination unit 22 is specifically configured to determine the weight of the i-th point as the first weight if the classification information of the i-th point is consistent with the classification information of the current point; If the classification information of the i-th point is inconsistent with the classification information of the current point, the weight of the i-th point is determined to be the second weight.
  • the reference point determination unit 22 is specifically configured to determine the i-th point based on the distance information between the i-th point and the current point, and the weight of the i-th point. score.
  • the reference point determination unit 22 is specifically configured to determine the product of the distance information between the i-th point and the current point and the weight of the i-th point as the product of the distance information between the i-th point and the current point and the weight of the i-th point. The score of i points.
  • the reference point determination unit 22 is specifically configured to determine the K points with the smallest scores among the coded points as the K reference points. point.
  • the prediction value determination unit 23 is specifically configured to determine M prediction points from the K reference points, where M is a positive integer less than or equal to K; according to the attributes of the M prediction points information to determine the attribute prediction value of the current point.
  • the prediction value determination unit 23 is specifically configured to determine the prediction point determination mode corresponding to the current point; and determine M prediction points from the K reference points according to the prediction point determination mode.
  • the prediction point determination mode is any one of a first prediction point determination mode, a second prediction point determination mode, and a third prediction point determination mode.
  • the prediction value determination unit 23 is specifically configured to determine the prediction point determination mode according to the classification information of the current point.
  • the prediction value determination unit 23 is specifically configured to determine that the prediction point determination mode is the first prediction point determination mode if the category of the current point is the first category; if the category of the current point is the first category, The category is the second category, then the prediction point determination mode is determined to be the second prediction point determination mode, and both the second prediction point determination mode and the first prediction point determination mode are the first prediction point Any one of the determination mode, the second prediction point determination mode, and the third prediction point determination mode, and the second prediction point determination mode is different from the first prediction point determination mode.
  • the prediction value determination unit 23 is specifically configured to determine the prediction point determination mode according to the classification information of the K reference points.
  • the prediction value determination unit 23 is specifically configured to determine whether the prediction point is determined if the number of reference points belonging to the same category as the current point among the K reference points is greater than or equal to a first threshold.
  • the mode is the third prediction point determination mode; if the number of reference points belonging to the same category as the current point among the K reference points is less than the first threshold, then the prediction point determination mode is determined to be the fourth prediction point Determination mode, the fourth prediction point determination mode and the third prediction point determination mode are any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode , and the fourth prediction point determination mode is different from the third prediction point determination mode.
  • the prediction point determination mode is a default mode.
  • the prediction value determination unit 23 is specifically configured to obtain Q prediction point candidate determination modes, where N is a positive integer; and determine a prediction point candidate determination mode from the Q prediction point candidate determination modes. The pattern is determined as the predicted point.
  • the prediction value determination unit 23 is specifically configured to determine the cost of the Q prediction point candidate determination modes; determine the prediction point candidate with the smallest cost among the Q prediction point candidate determination modes. mode, determine the mode for the prediction point.
  • the prediction value determination unit 23 is specifically configured to select the P points closest to the current point from the encoded points according to the encoding order, where the P is a positive integer; for the Q points
  • the jth prediction point candidate determination mode in the prediction point candidate determination mode uses the jth prediction point candidate determination mode to predict the P points, and obtains that the P points are at the jth prediction point
  • the attribute prediction value in the candidate determination mode, the j is a positive integer; according to the attribute prediction value of the P points in the jth prediction point candidate determination mode, determine the jth prediction point candidate mode cost.
  • the predicted value determination unit 23 is specifically configured to determine, based on the attribute prediction values of the P points in the j-th predicted point candidate determination mode, the P points in the j-th predicted point candidate determination mode.
  • the attribute reconstruction value in the prediction point candidate determination mode according to the attribute reconstruction value of the P points in the jth prediction point candidate determination mode and the encoded attribute value of the P point, determine the j prediction point candidates determine the cost of the pattern.
  • the encoding unit 24 is also configured to write a second identifier in the point cloud code stream, where the second identifier is used to indicate the prediction point determination mode corresponding to the current point.
  • the prediction value determination unit 23 is specifically configured to determine the K reference points as the M prediction points, where M equals K.
  • the prediction value determination unit 23 is specifically configured to select one reference point from the K reference points and determine it as a prediction point. , where M equals 1.
  • the predicted value determining unit 23 is specifically configured to determine a reference point closest to the current point among the K reference points as the predicted point.
  • the prediction value determination unit 23 is specifically configured to determine the first reference point among the K reference points that is closest to the attribute information of the current point as the prediction point.
  • the encoding unit 24 is also configured to write a first index in the point cloud code stream, where the first index is used to indicate the first reference point.
  • the prediction value determination unit 23 is specifically configured to match the classification information of the K reference points with the current point. , and the M reference points closest to the current point are determined as the M predicted points.
  • the predicted value determination unit 23 is specifically configured to determine the prediction value calculation method according to the classification information of the M prediction points; according to the prediction value calculation method, and the The attribute information of the M predicted points is used to determine the attribute predicted value of the current point.
  • the predicted value calculation method is any one of a first predicted value calculation method, a second predicted value calculation method, and a third predicted value calculation method.
  • the predicted value determination unit 23 is specifically configured to determine the predicted value if the number of predicted points among the M predicted points that are of the same category as the current point is greater than or equal to a second threshold.
  • the calculation method is the first prediction value calculation method; if the number of prediction points with the same category as the current point among the M prediction points is less than the second threshold, it is determined that the prediction value calculation method is the third prediction value calculation method.
  • Two prediction value calculation methods, the first prediction value calculation method and the second prediction value calculation method are both the first prediction value calculation method, the second prediction value calculation method and the third prediction value calculation method. Any one of them, and the first predicted value calculation method is different from the second predicted value calculation method.
  • the predicted value determination unit 23 is specifically configured to determine that the predicted value calculation method is the third predicted value calculation if the categories of the M predicted points and the current point are both of the first category. method; if the categories of the M predicted points and the current point are both of the second category, then the predicted value calculation method is determined to be the fourth predicted value calculation method, and the third predicted value calculation method is the same as The fourth prediction value calculation method is any one of the first prediction value calculation method, the second prediction value calculation method, and the third prediction value calculation method, and the third prediction value calculation method is the same as The fourth prediction value calculation method is different.
  • the predicted value determination unit 23 is specifically configured to compare each predicted point among the M predicted points with the current point. The reciprocal of the distance between the M prediction points is determined as the first weight of each prediction point among the M prediction points; the attribute information of the M prediction points is weighted according to the first weight of each prediction point among the M prediction points. , obtain the attribute prediction value of the current point.
  • the predicted value determination unit 23 is specifically configured to calculate, for each of the M prediction points, according to the prediction point and the position information of the current point and the preset coordinate axis weight, determine the second weight of the prediction point; according to the second weight of each prediction point in the M prediction points, the M prediction points The attribute information is weighted to obtain the attribute prediction value of the current point.
  • the predicted value determination unit 23 is specifically configured to determine the attribute weighted average of the M prediction points, and calculate the The attribute weighted average is used as a predicted value; M predicted values are determined based on the attribute information of the M predicted points; and the attribute predicted value of the current point is determined based on the one predicted value and the M predicted values.
  • the prediction value determination unit 23 is specifically configured to determine a target weighted average method according to the classification information of the M prediction points; use the target weighted average method to determine the attribute weighting of the M prediction points. average value.
  • the target weighted average method is any one of a first weighted average method and a second weighted average method.
  • the prediction value determination unit 23 is specifically configured to determine the target weight if the number of prediction points of the same category as the current point among the M prediction points is greater than or equal to a second threshold.
  • the average method is the first weighted average method; if the number of prediction points with the same category as the current point among the M prediction points is less than the second threshold, then the target weighted average method is determined to be the second A weighted average method, the first weighted average method and the second weighted average method are any one of the first weighted average method and the second weighted average method, and the first weighted average method The first weighted average method is different from the second weighted average method.
  • the predicted value determination unit 23 is specifically configured to determine that the target weighted average method is the third weighted average if the categories of the M predicted points and the current point are both of the first category. method; if the categories of the M predicted points and the current point are both of the second category, then the target weighted average method is determined to be the fourth weighted average method, and the third weighted average method is the same as the The fourth weighted average method is any one of the first weighted average method and the second weighted average method, and the third weighted average method is different from the fourth weighted average method.
  • the prediction value determination unit 23 is specifically configured to calculate the distance between each prediction point among the M prediction points and the current point. The reciprocal of the distance is determined as the first weight of each prediction point among the M prediction points; the attribute information of the M prediction points is weighted according to the first weight of each prediction point among the M prediction points, Obtain the attribute weighted average of the M prediction points.
  • the prediction value determination unit 23 is specifically configured to calculate, for each prediction point among the M prediction points, according to the prediction point and the position information of the current point and the preset coordinate axis weight to determine the second weight of the prediction point; according to the second weight of each prediction point in the M prediction points, the M prediction points are The attribute information is weighted to obtain an attribute weighted average of the M prediction points.
  • the predicted value determination unit 23 is specifically configured to determine the one predicted value and the target predicted value among the M predicted values as the attribute predicted value of the current point.
  • the encoding determination unit 24 is also configured to write a second index in the point cloud code stream, where the second index is used to indicate the target prediction value.
  • the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be repeated here.
  • the point cloud encoding device 20 shown in FIG. 8 may correspond to the corresponding subject in performing the point cloud encoding method of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the point cloud encoding device 20 In order to implement the corresponding processes in the point cloud encoding method, for the sake of simplicity, they will not be described again here.
  • the software unit may be located in a mature storage medium in this field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.
  • Figure 9 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 30 may be a point cloud decoding device or a point cloud encoding device described in the embodiment of the present application.
  • the electronic device 30 may include:
  • Memory 33 and processor 32 the memory 33 is used to store the computer program 34 and transmit the program code 34 to the processor 32.
  • the processor 32 can call and run the computer program 34 from the memory 33 to implement the method in the embodiment of the present application.
  • the processor 32 may be configured to perform the steps in the above method 200 according to instructions in the computer program 34 .
  • the processor 32 may include but is not limited to:
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the memory 33 includes but is not limited to:
  • Non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM Random Access Memory
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the computer program 34 can be divided into one or more units, and the one or more units are stored in the memory 33 and executed by the processor 32 to complete the tasks provided by this application.
  • the one or more units may be a series of computer program instruction segments capable of completing specific functions. The instruction segments are used to describe the execution process of the computer program 34 in the electronic device 30 .
  • the electronic device 30 may also include:
  • Transceiver 33 the transceiver 33 can be connected to the processor 32 or the memory 33 .
  • the processor 32 can control the transceiver 33 to communicate with other devices. Specifically, it can send information or data to other devices, or receive information or data sent by other devices.
  • Transceiver 33 may include a transmitter and a receiver.
  • the transceiver 33 may further include an antenna, and the number of antennas may be one or more.
  • bus system where in addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.
  • Figure 10 is a schematic block diagram of a point cloud encoding and decoding system provided by an embodiment of the present application.
  • the point cloud encoding and decoding system 40 may include: a point cloud encoder 41 and a point cloud decoder 42, where the point cloud encoder 41 is used to perform the point cloud encoding method involved in the embodiment of the present application.
  • the decoder 42 is used to execute the point cloud decoding method involved in the embodiment of the present application.
  • This application also provides a code stream, which is generated according to the above encoding method.
  • This application also provides a computer storage medium on which a computer program is stored.
  • the computer program When the computer program is executed by a computer, the computer can perform the method of the above method embodiment.
  • embodiments of the present application also provide a computer program product containing instructions, which when executed by a computer causes the computer to perform the method of the above method embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted over a wired connection from a website, computer, server, or data center (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available media can be magnetic media (such as floppy disks, hard disks, tapes), optical media (such as digital video discs (DVD)), or semiconductor media (such as solid state disks (SSD)), etc. .
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separate.
  • a component shown as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

Landscapes

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

Abstract

本申请提供一种点云编解码方法、装置、设备及存储介质,该方法包括:确定点云中当前点和已解码点的分类信息,和/或已解码点与当前点之间的距离信息,分类信息用于指示点所属的类别;根据分类信息和距离信息中的至少一个,从已解码点中确定当前点的K个参考点,K为正整数;根据K个参考点的属性信息,确定当前点的属性预测值;根据当前点的属性预测值,确定当前点的属性重建值。由于相同类别的点的属性信息比较相近,基于此本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。

Description

点云编解码方法、装置、设备及存储介质 技术领域
本申请涉及点云技术领域,尤其涉及一种点云编解码方法、装置、设备及存储介质。
背景技术
通过采集设备对物体表面进行采集,形成点云数据,点云数据包括几十万甚至更多的点。在视频制作过程中,将点云数据以点云媒体文件的形式在点云编码设备和点云解码设备之间传输。但是,如此庞大的点给传输带来了挑战,因此,点云编码设备需要对点云数据进行压缩后传输。
点云编码包括几何编码和属性编码,在属性编码过程中,通过属性预测来减少数据冗余。但是,目前在属性预测时,参考点的选择不够准确,造成属性预测准确率不高。
发明内容
本申请实施例提供了一种点云编解码方法、装置、设备及存储介质,提高了参考点的选择准确性,进而提升了属性预测的准确性。
第一方面,本申请实施例提供一种点云解码方法,包括:
确定点云中当前点和已解码点的分类信息,和/或所述已解码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
根据所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,所述K为正整数;
根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
根据所述当前点的属性预测值,确定所述当前点的属性重建值。
第二方面,本申请提供了一种点云编码方法,包括:
确定点云中当前点和已编码点的分类信息,和/或所述已编码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
根据所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,所述K为正整数;
根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
根据所述当前点的属性预测值,确定所述当前点的属性残差值。
第三方面,本申请提供了一种点云解码装置,用于执行上述第一方面或其各实现方式中的方法。具体地,该装置包括用于执行上述第一方面或其各实现方式中的方法的功能单元。
第四方面,本申请提供了一种点云编码装置,用于执行上述第二方面或其各实现方式中的方法。具体地,该装置包括用于执行上述第二方面或其各实现方式中的方法的功能单元。
第五方面,提供了一种点云解码器,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,以执行上述第一方面或其各实现方式中的方法。
第六方面,提供了一种点云编码器,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,以执行上述第二方面或其各实现方式中的方法。
第七方面,提供了一种点云编解码系统,包括点云编码器和点云解码器。点云解码器用于执行上述第一方面或其各实现方式中的方法,点云编码器用于执行上述第二方面或其各实现方式中的方法。
第八方面,提供了一种芯片,用于实现上述第一方面至第二方面中的任一方面或其各实现方式中的方法。具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述第一方面至第二方面中的任一方面或其各实现方式中的方法。
第九方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面至第二方面中的任一方面或其各实现方式中的方法。
第十方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第一方面至第二方面中的任一方面或其各实现方式中的方法。
第十一方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面至第二方面中的任一方面或其各实现方式中的方法。
第十二方面,提供了一种码流,码流是基于上述第二方面的方法生成的,可选的,上述码流包括第一参数和第二参数中的至少一个。
基于以上技术方案,通过确定点云中当前点和已解码点的分类信息,和/或已解码点与当前点之间的距离信息,分类信息用于指示点所属的类别;根据分类信息和距离信息中的至少一个,从已解码点中确定当前点的K个参考点,K为正整数;根据K个参考点的属性信息,确定当前点的属性预测值;根据当前点的属性预测值,确定当前点的属性重建值。由于相同类别的点的属性信息比较相近,基于此本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
附图说明
图1为本申请实施例涉及的一种点云编解码系统的示意性框图;
图2是本申请实施例提供的点云编码器的示意性框图;
图3是本申请实施例提供的点云解码器的示意性框图;
图4为本申请一实施例提供的点云解码方法流程示意图;
图5为本申请实施例涉及的点云直方图;
图6为本申请一实施例提供的点云编码方法流程示意图;
图7是本申请实施例提供的点云解码装置的示意性框图;
图8是本申请实施例提供的点云编码装置的示意性框图;
图9是本申请实施例提供的电子设备的示意性框图;
图10是本申请实施例提供的点云编解码系统的示意性框图。
具体实施方式
本申请可应用于点云上采样技术领域,例如可以应用于点云压缩技术领域。
为了便于理解本申请的实施例,首先对本申请实施例涉及到的相关概念进行如下简单介绍:
点云(Point Cloud)是指空间中一组无规则分布的、表达三维物体或三维场景的空间结构及表面属性的离散点集。
点云数据(Point Cloud Data)是点云的具体记录形式,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息。点的位置信息也可称为点的几何信息。例如,点的属性信息可包括颜色信息、反射率信息、法向量信息等等。例如,所述颜色信息可以是任意一种色彩空间上的信息。例如,所述颜色信息可以是(RGB)。再如,所述颜色信息可以是于亮度色度(YcbCr,YUV)信息。例如,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色,U和V表示为色度(Chroma)用于描述色差信息。例如,根据激光测量原理得到的点云,所述点云中的点可以包括点的三维坐标信息和点的激光反射强度(reflectance)。再如,根据摄影测量原理得到的点云,所述点云中的点可以可包括点的三维坐标信息和点的颜色信息。再如,结合激光测量和摄影测量原理得到点云,所述点云中的点可以可包括点的三维坐标信息、点的激光反射强度(reflectance)和点的颜色信息。
点云数据的获取途径可以包括但不限于以下至少一种:(1)计算机设备生成。计算机设备可以根据虚拟三维物体及虚拟三维场景的生成点云数据。(2)3D(3-Dimension,三维)激光扫描获取。通过3D激光扫描可以获取静态现实世界三维物体或三维场景的点云数据,每秒可以获取百万级点云数据;(3)3D摄影测量获取。通过3D摄影设备(即一组摄像机或具有多个镜头和传感器的摄像机设备)对现实世界的视觉场景进行采集以获取现实世界的视觉场景的点云数据,通过3D摄影可以获得动态现实世界三维物体或三维场景的点云数据。(4)通过医学设备获取生物组织器官的点云数据。在医学领域可以通过磁共振成像(Magnetic Resonance Imaging,MRI)、电子计算机断层扫描(Computed Tomography,CT)、电磁定位信息等医学设备获取生物组织器官的点云数据。
点云可以按获取的途径分为:密集型点云和稀疏性点云。
点云按照数据的时序类型划分为:
第一类静态点云:即物体是静止的,获取点云的设备也是静止的;
第二类动态点云:物体是运动的,但获取点云的设备是静止的;
第三类动态获取点云:获取点云的设备是运动的。
按点云的用途分为两大类:
类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;
类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。
随着三维重建和三维成像技术的发展,点云被广泛应用于虚拟现实、沉浸式远程呈现、三维打印等领域。但由于三维点云往往具有庞大数量的点,且点的分布在空间中具有无序性;同时,每个点又往往具有丰富的属性信息,导致一个点云具有庞大的数据量,给点云的存储和传输都带来了巨大的挑战。因此,点云压缩编码技术是点云处理和应用的关键技术之一。
下面对点云编解码的相关知识进行介绍。
图1为本申请实施例涉及的一种点云编解码系统的示意性框图。需要说明的是,图1只是一种示例,本申请实施例的点云编解码系统包括但不限于图1所示。如图1所示,该点云编解码系统100包含编码设备110和解码设备120。其中编码设备用于对点云数据进行编码(可以理解成压缩)产生码流,并将码流传输给解码设备。解码设备对编码设备编码产生的码流进行解码,得到解码后的点云数据。
本申请实施例的编码设备110可以理解为具有点云编码功能的设备,解码设备120可以理解为具有点云解码功能的设备,即本申请实施例对编码设备110和解码设备120包括更广泛的装置,例如包含智能手机、台式计算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、电视、相机、显示装置、数字媒体播放器、点云游戏控制台、车载计算机等。
在一些实施例中,编码设备110可以经由信道130将编码后的点云数据(如码流)传输给解码设备120。信道130可以包括能够将编码后的点云数据从编码设备110传输到解码设备120的一个或多个媒体和/或装置。
在一个实例中,信道130包括使编码设备110能够实时地将编码后的点云数据直接发射到解码设备120的一个或多个通信媒体。在此实例中,编码设备110可根据通信标准来调制编码后的点云数据,且将调制后的点云数据发射到解码设备120。其中通信媒体包含无线通信媒体,例如射频频谱,可选的,通信媒体还可以包含有线通信媒体,例如一根或多根物理传输线。
在另一实例中,信道130包括存储介质,该存储介质可以存储编码设备110编码后的点云数据。存储介质包含多种本地存取式数据存储介质,例如光盘、DVD、快闪存储器等。在该实例中,解码设备120可从该存储介质中获取编码后的点云数据。
在另一实例中,信道130可包含存储服务器,该存储服务器可以存储编码设备110编码后的点云数据。在此实例中,解码设备120可以从该存储服务器中下载存储的编码后的点云数据。可选的,该存储服务器可以存储编码后的点云数据且可以将该编码后的点云数据发射到解码设备120,例如web服务器(例如,用于网站)、文件传送协议(FTP)服务器等。
一些实施例中,编码设备110包含点云编码器112及输出接口113。其中,输出接口113可以包含调制器/解调器(调制解调器)和/或发射器。
在一些实施例中,编码设备110除了包括点云编码器112和输入接口113外,还可以包括点云源111。
点云源111可包含点云采集装置(例如,扫描仪)、点云存档、点云输入接口、计算机图形系统中的至少一个,其中,点云输入接口用于从点云内容提供者处接收点云数据,计算机图形系统用于产生点云数据。
点云编码器112对来自点云源111的点云数据进行编码,产生码流。点云编码器112经由输出接口113将编码后的点云数据直接传输到解码设备120。编码后的点云数据还可存储于存储介质或存储服务器上,以供解码设备120后续读取。
在一些实施例中,解码设备120包含输入接口121和点云解码器122。
在一些实施例中,解码设备120除包括输入接口121和点云解码器122外,还可以包括显示装置123。
其中,输入接口121包含接收器及/或调制解调器。输入接口121可通过信道130接收编码后的点云数据。
点云解码器122用于对编码后的点云数据进行解码,得到解码后的点云数据,并将解码后的点云数据传输至显示装置123。
显示装置123显示解码后的点云数据。显示装置123可与解码设备120整合或在解码设备120外部。显示装置123可包括多种显示装置,例如液晶显示器(LCD)、等离子体显示器、有机发光二极管(OLED)显示器或其它类型的显示装置。
此外,图1仅为实例,本申请实施例的技术方案不限于图1,例如本申请的技术还可以应用于单侧的点云编码或单侧的点云解码。
目前的点云编码器可以采用国际标准组织运动图像专家组(Moving Picture Experts Group,MPEG)提出了两种点云压缩编码技术路线,分别是基于投影的点云压缩(Video-based Point Cloud Compression,VPCC)和基于几何的点云压缩(Geometry-based Point Cloud Compression,GPCC)。VPCC通过将三维点云投影到二维,利用现有的二维编码工具对投影后的二维图像进行编码,GPCC利用层级化的结构将点云逐级划分为多个单元,通过编码记录划分过程编码整个点云。
下面以GPCC编解码框架为例,对本申请实施例可适用的点云编码器和点云解码器进行说明。
图2是本申请实施例提供的点云编码器的示意性框图。
由上述可知点云中的点可以包括点的位置信息和点的属性信息,因此,点云中的点的编码主要包括位置编码和属性编码。在一些示例中点云中点的位置信息又称为几何信息,对应的点云中点的位置编码也可以称为几何编码。
在GPCC编码框架中,点云的几何信息和对应的属性信息是分开编码的。
位置编码的过程包括:首先建立包围点云所有点的最小正方体,该正方体称为最小包围盒。对最小包围盒进行八叉树划分,即将包围盒八等分为8个子立方体,对非空的(包含点云中的点)的子立方体继续进行八等分,直到划分得到的叶子结点为1×1×1的单位立方体时停止划分,在此过程中用8位二进制数编码每次划分产生的8个子立方体的占用情况,生成二进制的几何比特流,即几何码流。具体是,对点云中的点进行预处理,例如坐标变换、量化和移除重复点等;接着,对预处理后的点云进行几何编码,例如构建八叉树,基于构建的八叉树进行几何编码形成几何码流。同时,基于构建的八叉树输出的位置信息,对点云数据中各点的位置信息进行重建,得到各点的位置信息的重建值。
属性编码过程包括:通过给定输入点云的位置信息的重建信息和属性信息的原始值,选择三种预测模式的一种进行点云预测,对预测后的结果进行量化,并进行算术编码形成属性码流。
如图2所示,位置编码可通过以下单元实现:
坐标转换(Tanmsform coordinates)单元201、体素(Voxelize)单元202、八叉树划分(Analyze octree)单元203、几何重建(Reconstruct geometry)单元204、第一算术编码(Arithmetic enconde)单元205以及表面拟合单元(Analyze surface approximation)206。
坐标转换单元201可用于将点云中点的世界坐标变换为相对坐标。例如,点的几何坐标分别减去xyz坐标轴的最小值,相当于去直流操作,以实现将点云中的点的坐标从世界坐标转换为相对坐标。
体素(Voxelize)单元202也称为量化和移除重复点(Quantize and remove points)单元,可通过量化减少坐标的数目;量化后原先不同的点可能被赋予相同的坐标,基于此,可通过去重操作将重复的点删除;例如,具有相同量化位置和不同属性信息的多个云可通过属性转换合并到一个云中。在本申请的一些实施例中,体素单元202为可选的单元模块。
八叉树划分单元203可利用八叉树(octree)编码方式,编码量化的点的位置信息。例如,将点云按照八叉树的形式进行划分,由此,点的位置可以和八叉树的位置一一对应,通过统计八叉树中有点的位置,并将其标识(flag)记为1,以进行几何编码。
在一些实施例中,在基于三角面片集(trianglesoup,trisoup)的几何信息编码过程中,同样也要通过八叉树划分单元 203对点云进行八叉树划分,但区别于基于八叉树的几何信息编码,该trisoup不需要将点云逐级划分到边长为1x1x1的单位立方体,而是划分到block(子块)边长为W时停止划分,基于每个block中点云的分布所形成的表面,得到该表面与block的十二条边所产生的至多十二个vertex(交点),通过表面拟合单元206对交点进行表面拟合,对拟合后的交点进行几何编码。
几何重建单元204可以基于八叉树划分单元203输出的位置信息或表面拟合单元206拟合后的交点进行位置重建,得到点云数据中各点的位置信息的重建值。
算术编码单元205可以采用熵编码方式对八叉树分析单元203输出的位置信息或对表面拟合单元206拟合后的交点进行算术编码,例如将八叉树分析单元203输出的位置信息利用算术编码方式生成几何码流;几何码流也可称为几何比特流(geometry bitstream)。
属性编码可通过以下单元实现:
颜色转换(Transform colors)单元210、重着色(Transfer attributes)单元211、区域自适应分层变换(Region Adaptive Hierarchical Transform,RAHT)单元212、生成LOD(Generate LOD)单元213以及提升(lifting transform)单元214、量化系数(Quantize coefficients)单元215以及算术编码单元216。
需要说明的是,点云编码器200可包含比图2更多、更少或不同的功能组件。
颜色转换单元210可用于将点云中点的RGB色彩空间变换为YCbCr格式或其他格式。
重着色单元211利用重建的几何信息,对颜色信息进行重新着色,使得未编码的属性信息与重建的几何信息对应起来。
经过重着色单元211转换得到点的属性信息的原始值后,可选择任一种变换单元,对点云中的点进行变换。变换单元可包括:RAHT变换212和提升(lifting transform)单元214。其中,提升变化依赖生成细节层(level of detail,LOD)。
RAHT变换和提升变换中的任一项可以理解为用于对点云中点的属性信息进行预测,以得到点的属性信息的预测值,进而基于点的属性信息的预测值得到点的属性信息的残差值。例如,点的属性信息的残差值可以是点的属性信息的原始值减去点的属性信息的预测值。
在本申请的一实施例中,生成LOD单元生成LOD的过程包括:根据点云中点的位置信息,获取点与点之间的欧式距离;根据欧式距离,将点分为不同的细节表达层。在一个实施例中,可以将欧式距离进行排序后,将不同范围的欧式距离划分为不同的细节表达层。例如,可以随机挑选一个点,作为第一细节表达层。然后计算剩余点与该点的欧式距离,并将欧式距离符合第一阈值要求的点,归为第二细节表达层。获取第二细节表达层中点的质心,计算除第一、第二细节表达层以外的点与该质心的欧式距离,并将欧式距离符合第二阈值的点,归为第三细节表达层。以此类推,将所有的点都归到细节表达层中。通过调整欧式距离的阈值,可以使得每层LOD层的点的数量是递增的。应理解,LOD划分的方式还可以采用其它方式,本申请对此不进行限制。
需要说明的是,可以直接将点云划分为一个或多个细节表达层,也可以先将点云划分为多个点云切块(slice),再将每一个点云切块划分为一个或多个LOD层。
例如,可将点云划分为多个点云切块,每个点云切块的点的个数可以在55万-110万之间。每个点云切块可看成单独的点云。每个点云切块又可以划分为多个细节表达层,每个细节表达层包括多个点。在一个实施例中,可根据点与点之间的欧式距离,进行细节表达层的划分。
量化单元215可用于量化点的属性信息的残差值。例如,若量化单元215和RAHT变换单元212相连,则量化单元215可用于量化RAHT变换单元212输出的点的属性信息的残差值。
算术编码单元216可使用零行程编码(Zero run length coding)对点的属性信息的残差值进行熵编码,以得到属性码流。所述属性码流可以是比特流信息。
图3是本申请实施例提供的点云解码器的示意性框图。
如图3所示,解码器300可以从编码设备获取点云码流,通过解析码得到点云中的点的位置信息和属性信息。点云的解码包括位置解码和属性解码。
位置解码的过程包括:对几何码流进行算术解码;构建八叉树后进行合并,对点的位置信息进行重建,以得到点的位置信息的重建信息;对点的位置信息的重建信息进行坐标变换,得到点的位置信息。点的位置信息也可称为点的几何信息。
属性解码过程包括:通过解析属性码流,获取点云中点的属性信息的残差值;通过对点的属性信息的残差值进行反量化,得到反量化后的点的属性信息的残差值;基于位置解码过程中获取的点的位置信息的重建信息,选择如下RAHT逆变换和提升逆变换中的一种进行点云预测,得到预测值,预测值与残差值相加得到点的属性信息的重建值;对点的属性信息的重建值进行颜色空间逆转换,以得到解码点云。
如图3所示,位置解码可通过以下单元实现:
算数解码单元301、八叉树合成(synthesize octree)单元302、表面拟合单元(Synthesize suface approximation)303、几何重建(Reconstruct geometry)单元304以及逆坐标变换(inverse transform coordinates)单元305。
属性编码可通过以下单元实现:
算数解码单元310、反量化(inverse quantize)单元311、RAHT逆变换单元312、生成LOD(Generate LOD)单元313、提升逆变换(Inverselifting)单元314以及逆颜色转换(inverse trasform colors)单元315。
需要说明的是,解压缩是压缩的逆过程,类似的,解码器300中的各个单元的功能可参见编码器200中相应的单元的功能。另外,点云解码器300可包含比图3更多、更少或不同的功能组件。
例如,解码器300可根据点云中点与点之间的欧式距离将点云划分为多个LOD;然后,依次对LOD中点的属性 信息进行解码;例如,计算零行程编码技术中零的数量(zero_cnt),以基于zero_cnt对残差进行解码;接着,解码框架200可基于解码出的残差值进行反量化,并基于反量化后的残差值与当前点的预测值相加得到该点云的重建值,直到解码完所有的点云。当前点将会作为后续LOD中点的最邻近点,并利用当前点的重建值对后续点的属性信息进行预测。
上述是基于GPCC编解码框架下的点云编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请适用于该基于GPCC编解码框架下的点云编解码器的基本流程,但不限于该框架及流程。
本申请实施例主要涉及属性编解码,具体是属性预测。
在属性预测时,需要确定当前点的K个参考点,根据K个参考点的属性信息,预测当前点的属性信息。但是,目前确定的K个参考点不够准确,例如以距离为依据确定参考点,未考虑其他参考信息,使得属性编码准确率低。
为了解决上述技术问题,本申请实施例基于分类信息和距离信息中的至少一个,确定K个参考点,也就是说,本申请实施例在确定参考点时,不仅考虑了距离信息还考虑了分类信息,其中分类信息可以理解为点云中点所属的类别,这样基于分类信息和距离信息中的至少一个,确定参考点时可以提高参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性,进而提升了编解码性能。
下面结合具体的实施例,对本申请实施例涉及的点云编解码方法进行介绍。
首先,以解码端为例,对本申请实施例提供的点云解码方法进行介绍。
图4为本申请一实施例提供的点云解码方法流程示意图。本申请实施例的点云解码方法可以由上述图1或图3所示的点云解码设备完成。
如图4所示,本申请实施例的点云解码方法包括:
S101、确定点云中当前点和已解码点的分类信息,和/或已解码点与当前点之间的距离信息。
其中分类信息用于指示点云中点所属的类别。
在一些实施例中,分类信息可以理解为点云中的点所属的现实世界的类别,例如道路、汽车、行人等。
本申请实施例中,确定当前点和已解码点的分类信息,和/或已解码点与当前点之间的距离信息,进而根据分类信息和/或距离信息,从已解码点中确定当前点的K个参考点。由于相同类别的点的属性信息比较相近,基于此本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
本申请实施例对确定点云中当前点和已解码点的分类信息的具体过程相同。
上述S101中确定点云中当前点和已解码点的分类信息的方式包括但不限于如下几种:
方式1,在对点云进行属性解码之前,已完成对点云的几何解码(也称为位置解码),得到了点云中点的几何信息。根据点云中点的几何信息对点云进行分割,得到点云的分类信息,进而确定出当前点以及已解码点的分类信息。
在实际场景中,不同物体的运动可能不同,示例性的,以移动车辆上的激光雷达传感器捕获的点云数据为例,在该点云数据中,道路和物体通常具有不同的运动。由于道路和雷达传感器之间的距离相对恒定,并且道路从一个车辆位置到下一个车辆位置发生微小变化,因此表示道路的点相对于雷达传感器位置的移动很小。相比之下,建筑物、路标、植被或其他车辆等物体具有较大的运动。
基于此,在该方式1的一种可能实现方式中,图5所示,使用直方图对点云中点的高度值进行统计,直方图的横轴是点云中点的高度值,直方图的纵轴为在该高度值下的点数。图5是以雷达点云为例进行统计,以雷达所在高度为高度零点,因此大部分点的高度值为负值。接着,获取直方图的峰值对应的高度值,并计算高度值的标准差,则以峰值对应高度为中心,高于中心a倍(例如1.5倍)标准差的阈值记为第一高度阈值Top_thr,低于中心b倍(例如1.5倍)标准差的阈值记为第二高度阈值Bottom_thr。根据上述第一高度阈值和第二高度阈值将点云划分为不同的类别。例如,将点云中高度值位于第一高度阈值和第二高度阈值之间的点云记为第一类点云(例如为道路点云),将高度值大于第一高度阈值,以及高度值小于第二高度阈值的点云记为第二类点云(例如非道路点云)。
方式2,点云码流中包括点云中点的分类信息的指示信息,这样解码端通过解码点云码流,得到当前点以及已解码点的分类信息。例如,编码端将点云中每个点的类别标识写入码流中,解码端通过解码码流,得到点云中当前点以及已解码点的类别标识,进而根据类别标识,确定出分类信息。
方式3,通过预先训练好的神经网络模型,预测当前点以及已解码点的分类信息。
在方式3的一种示例中,假设后一个待解码点的分类信息是基于前面已解码点的分类信息预测得到的,则本申请实施例中,在解码当前点时,已解码点的分类信息已预测出。此时,确定当前点的分类信息时,从已解码点中选择出至少一个已解码点,这至少一个解码点可以为距离当前点最近的已解码点。接着,将至少一个已解码点的分类信息输入神经网络模型中,以使该神经网络模型基于至少一个已解码点的分类信息,预测当前点的分类信息。
在该方式3的另一种示例中,将点云中点的位置信息输入神经网络模型,以使该神经网络模型基于点云中点的位置信息,将点云划分为多个类别,进而确定出当前点以及已解码点的分类信息。
需要说明的是,确定点云中当前点和已解码点的分类信息的方法除了上述几种方式外,还可以采用其他的方式确定,本申请实施例对此不做限制。
由于在属性解码之前,已完成点云的几何解码,因此,解码端可以根据已解码点的位置信息和当前点的位置信息,确定为已解码点与当前点之间的距离信息。
本申请实施例对确定已解码点与当前点之间的距离的具体方式不做限制。
在一种示例中,根据曼哈顿距离计算方法,确定已解码点与当前点之间的曼哈顿距离。
在另一种示例中,根据欧几里得距离计算方法,确定已解码点与当前点之间的欧几里得距离。
本申请实施例对确定分类信息和距离信息的已解码点的具体数量不做限制。
在一些实施例中,将解码顺序中,位于当前点之前的L个已解码点作为研究对象,确定当前点和这L个已解码点的分类信息,和/或确定这L个已解码点中每个已解码点到当前点的距离,其中L为正整数。
可选的,上述L为预设的一固定值,也就是说,除了解码顺序的前几个点外,其他点对应的L已解码点的个数相同。
可选的,上述L不是固定值。例如,可以根据当前点的类别,确定不同的L值,作为一种示例,若当前点属于第一类点云,则确定L为A1,若当前点属于第二类点云,则确定L为A2,其中A1和A2均为正整数,且A1与A2的取值不同。
本申请实施例的解码顺序可以是点云中点的原始输入顺序、莫顿顺序、希尔伯特顺序、LOD顺序中的任意一种。其中莫顿顺序可以理解为将点云中点的坐标转换为莫顿码,根据莫顿码大小,按照从小到大排序对点云进行排序得到的顺序。其中希尔伯特顺序可以理解为将点云中点的坐标转换为希尔伯特码,根据希尔伯特码大小,按照从小到大排序对点云进行排序得到的顺序。
根据上述方法可以确定出当前点以及已解码点的分类信息,和/或已解码点与当前点之间的距离信息,接着,执行如下S102的步骤。
S102、根据分类信息和距离信息中的至少一个,从已解码点中确定当前点的K个参考点。
其中,K为正整数。可选的,K的具体取值可以为默认值,也可以解码得到,还可以自适应地计算得出,本申请不作限制。
本申请实施在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
在一些实施例中,解码端根据当前点和已解码点的分类信息,从已解码点中确定出当前点的K个参考点。例如,解码端将解码顺序中靠近当前点、且类别与当前点的类别相同的K个已解码点,确定为当前点的K个参考点。
在一些实施例中,解码端根据当前点和已解码点的分类信息,以及已解码点与当前点之间的距离,从已解码点中确定出当前点的K个参考点。例如,解码端将类别与当前点类别一致,且距离当前点最近的K个已解码点,确定为当前点的K个参考点。
在一些实施例中,解码端根据已解码点与当前点之间的距离,从已解码点中确定出当前点的K个参考点。例如,解码端将距离当前点最近的K个已解码点,确定为当前点的K个参考点。
在一些实施例中,本申请实施例包括多种确定参考点的方式,此时,上述S102包括如下S102-A和S102-B的步骤:
S102-A、确定当前点对应的参考点确定模式。
S102-B、根据参考点确定模式,以及分类信息和距离信息中的至少一个,从已解码点中确定当前点的K个参考点。
在该实施例中,若存在多种确定参考点的方式时,解码端在确定当前点的参考点时,首先需要确定当前点对应的参考点确定模式,进而根据确定参考点确定模式,以及分类信息和距离信息中的至少一个,从已解码点中确定当前点的K个参考点。
在一些实施例中,点云中所有点的参考点确定模式相同,即解码端采用一种参考点确定模式,确定点云中每一个点的参考点。可选的,该参考点确定模式可以为默认模式。可选的,编码端从多个参考点确定模式确定出一个参考点确定模式,并将确定出的该参考点确定模式写入码流指示给解码端,这样解码端通过解码码流,得到该参考点确定模式,进而使用该参考点确定模式确定点云中所有点的参考点。可选的,编码端还可以为点云中每个点编码一个标识位,来指示每个点对应的参考点确定模式。
在一些实施例中,点云中可以使用多种参考点确定模式,例如点云中某一些点使用一种参考点确定模式确定参考点,另一种参考点使用另一种参考点确定模式来确定参考点。
本申请实施例对参考点确定模式不做限制。
在一些实施例中,参考点确定模式为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。可选的,第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中至少一个模式基于分类信息确定参考点。
下面对上述S102-A中确定当前点对应的参考点确定模式的具体方式进行介绍。
上述S102-A中确定当前点对应的参考点确定模式的方式包括但不限于如下几种:
方式一,根据当前点的分类信息,确定当前点对应的参考点确定模式。
在该方式一的一种可能的实现方式中,点云中不同类别的点对应不同的参考点确定模式。
例如,若当前点的类别为第一类别,则确定参考点确定模式为第一种参考点确定模式。
再例如,若当前点的类别为第二类别,则确定参考点确定模式为第二种参考点确定模式。
上述第二种参考点确定模式与第一种参考点确定模式均为上述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个,且第二种参考点确定模式与第一种参考点确定模式不同。
在一种示例中,点云中点的类别与参考点确定模式的对应关系如表1所示:
表1
点的分类信息 参考点确定模式
第一类别 第一种参考点确定模式
第二类别 第二种参考点确定模式
由上述表1可知,不同的类别的点对应不同的参考点确定模式,这样解码端可以根据当前点的分类信息,查询上 述表1,确定出当前点对应的参考点确定模式。
在另一种示例中,上述第一种参考点确定模式和第二种确定模式为默认模式,例如,若当前点的类别为第一类别时,则解码端默认当前点对应的参考点确定为第二参考点确定模式,即第一种参考点确定模式为第二参考点确定模式。若当前点的类别为第二类别时,则编码端默认当前点对应的参考点确定模式为第三参考点确定模式,即第二种参考点确定模式为第三参考点确定模式。
在另一种示例中,编码端可以将不同类别对应的参考点确定模式写入码流,这样解码端可以通过解码码流,可以确定出当前点所属的类别所对应的参考点确定模式。例如,解码端从码流中解码出第一类别对应第二参考点确定模式,第二类别对应第三参考点确定模式。这样,若确定出当前点的类别为第一类别时,则将第二参考点确定模式确定为当前点对应的参考点确定模式,即第一种参考点确定模式为第二参考点确定模式。若确定出当前点的类别为第二类别时,则将第三参考点确定模式确定为当前点对应的参考点确定模式,即第二种参考点确定模式为第三参考点确定模式。
在该方式一的另一种可能的实现方式中,还可以根据当前点和已解码点的分类信息,确定当前点对应的参考点确定模式。
例如,若已解码点中与当前点的类别相同的已解码点的个数大于或等于某一预设值,则确定当前点对应的参考点确定模式为一种参考点确定模式。
再例如,若已解码点中与当前点的类别相同的已解码点的个数小于某一预设值,则确定当前点对应的参考点确定模式为另一种参考点确定模式。
解码端除了使用上述方式一确定当前点对应的参考点确定模式外,还可以采用下面的方式二、方式三或方式四,确定当前点对应的参考点确定模式。
方式二,当前点对应的参考点确定模式为默认模式。也就是说,解码端和编码端均采用默认模式确定当前点的参考点。
可选的,上述默认模式可以为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。
方式三,解码点云码流,得到第一标识,该第一标识用于指示当前点对应的参考点确定模式;根据所述第一标识,确定所述参考点确定模式。
在该方式三中,编码端将确定的当前点对应的参考点确定模式后,将该参考点确定模式指示给解码端,具体是,在码流中写入第一标识,通过该第一标识指示当前点对应的参考点确定模式。这样解码端可以通过解码码流,得到第一标识,进而根据第一标识确定出当前点对应的参考点确定模式。
可选的,该第一标识可以为该参考点确定模式的索引。
在该方式三的一种可能的实现方式中,编码端可以为点云中每一个点编码一个第一标识,用于指示该点对应的参考点确定模式。
在该方式三的一种可能的实现方式中,若点云中每个点对应的参考点确定模式相同时,则编码端可以在码流中写入一个第一标识,该第一标识用于指示点云中所有点对应的参考点确定模式。
在该方式三的一种可能的实现方式中,若不同类别的点对应的参考点确定模式不同时,则编码端可以为不同类别的点编码不同的第一标识,例如第一类点云对应的第一标识为B1,第二类点云对应的第一标识为B2。这样解码端可以根据当前点的分类信息,确定当前点对应的第一标识,进而根据第一标识确定出当前点对应的参考点确定模式。例如,若当前点为第一类点云,则解码端将第一标识B1对应的参考点确定模式确定为当前点对应的参考点确定模式,若当前点为第二类点云,则解码端将第一标识B2对应的参考点确定模式确定为当前点对应的参考点确定模式。
方式四,解码端通过自适应方法,确定出当前点对应的参考点确定模式。此时,上述S102-A包括如下步骤:
S102-A1、获取N个参考点候选确定模式,N为正整数;
S102-A2、从N个参考点候选确定模式中,确定一参考点候选确定模式作为当前点对应的参考点确定模式。
上述N个参考点候选确定模式为上述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意N个模式。
在一些实施例中,上述N个参考点候选确定模式为编解码默认的。
在一些实施例中,编码端从第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中确定出N个参考点候选确定模式,并将确定N个参考点候选确定模式指示给解码端。
在一些实施例中,解码端还可以通过其他的方式,获取N个参考点候选确定模式,本申请实施例对此不做限制。解码端获取N个参考点候选确定模式后,从这N个参考点候选确定模式中,确定当前点对应的参考点确定模式。
解码端从N个参考点候选确定模式中,确定一参考点候选确定模式作为当前点对应的参考点确定模式的方式包括但不限于如下几种:
方式1,解码端根据当前点的分类信息,从这N个参考点候选确定模式中,确定出当前点对应的参考点确定模式。
例如,若当前点的类别为第一类别,则将N个参考点候选确定模式中的参考点候选模式a确定为当前点对应的参考点确定模式。
再例如,若当前点的类别为第二类别,则将N个参考点候选确定模式中的参考点候选模式b确定为当前点对应的参考点确定模式。
方式2,解码端确定N个参考点候选确定模式的代价;将N个参考点候选确定模式中代价最小的参考点候选确定模式,确定为当前点对应的参考点确定模式。
上述代价可以为差值的平方和(Sum of Squared Difference,SSD)、绝对误差(Sum of Absolute Difference,SAD)、经hadamard变换后再绝对值求和(Sum of Absolute Transformed Difference,SATD)等代价。
本申请实施例对确定N个参考点候选确定模式的代价的具体方式不做限制。
在一种可能的实现方式中,解码端按照解码顺序,从已解码点中选择距离当前点最近的P个点,P为正整数;针 对N个参考点候选确定模式中的第j个参考点候选确定模式,使用第j个参考点候选确定模式对P个点进行预测,得到P个点在第j个参考点候选确定模式下的属性预测值,j为正整数;根据P个点在第j个参考点候选确定模式下的属性预测值,确定第j个参考点候选模式的代价。
也就是说,在该实现方式中,解码端按照解码顺序,从已解码点中选择距离当前点最近的P个点,使用N个参考点候选确定模式分别对P个点进行预测,得到N个参考点候选确定模式中每一个参考点候选确定模式对应的P个点的属性预测值,进而根据P个点的属性预测值,确定每个参考点候选确定模式的代价。
例如,以N个参考点候选确定模式中的第j个参考点候选确定模式为例,使用第j个参考点候选确定模式对P个点中的每一个点进行属性预测,得到P个点中每个点在第j个参考点候选确定模式下的属性预测值。具体的,针对P个点中的第i个点,使用第j个参考点候选确定模式确定出第i个点的K个参考点,根据第i个点的K个参考点确定第i个点的属性预测值,例如将第i个点的K个参考点的属性信息的加权平均值,确定为第i个点的属性预测值。参照第i个点的属性预测值的确定方法,可以确定出P个点中每一个点在该第j个参考点候选确定模式下的属性预测值。接着,根据P个点中每一个点在该第j个参考点候选确定模式下的属性预测值,确定第j个参考点候选确定模式的代价。
其中,根据P个点中每一个点在该第j个参考点候选确定模式下的属性预测值,确定第j个参考点候选确定模式的代价的方式包括但不限于如下几种示例:
示例1,由于P个点为属性已解码点,这P个点在属性解码时,已经确定出各自的属性预测值,为了便于描述,将P个点在属性解码过程中确定的属性预测值记为原始属性预测值。这样可以将P个点在该第j个参考点候选确定模式下的属性预测值与原始属性预测值进行比较,确定出第j个参考点候选确定模式的代价。例如,将P个点在该第j个参考点候选确定模式下的属性预测值与这P个点的原始属性预测值的差值和,确定为第j个参考点候选确定模式的代价。
在一些示例中,根据如下如公式(1)确定第j个参考点候选确定模式的代价:
Figure PCTCN2022109891-appb-000001
其中,D为第j个参考点候选确定模式的代价,ai为P个点中第i个点的原始属性预测值,aij为第i个点在第j个参考点候选确定模式下的属性预测值。
示例2,根据P个点在第j个参考点候选确定模式下的属性预测值,确定P个点在第j个参考点候选确定模式下的属性重建值;根据P个点在第j个参考点候选确定模式下的属性重建值,以及P个点的已解码属性值,确定第j个参考点候选确定模式的代价。
在该示例2中,解码码流,得到P个点的属性残差值,将P个点在第j个参考点候选确定模式下的属性预测值与P个点的属性残差值进行相加,可以得到P个点中每个点在第j个参考点候选确定模式下的属性重建值。由于P个点的属性信息已解码,因此,根据P个点在第j个参考点候选确定模式下的属性重建值,以及P个点的已解码属性值,确定第j个参考点候选确定模式的代价。例如,使用SAD、SATD、SSD等代价计算方式,确定出第j个参考点候选确定模式的代价。
根据上述方法,可以确定出N个参考点候选确定模式中每一个模式对应的代价,进而将代价最小的一个参考点候选确定模式,确定为当前点对应的参考点确定模式。
解码端根据上述方式确定出当前点对应的参考点确定模式后,执行上述S102-B的步骤,根据当前点对应的参考点确定模式,以及分类信息和距离信息中的至少一个,从已解码点中确定所述当前点的K个参考点。
下面对S102-B的具体实现过程进行介绍。
上述S102-B中根据当前点对应的参考点确定模式的不同,具有不同的实现过程,示例性的包括但不限于如下几种情况:
情况1,若参考点确定模式为第一参考点确定模式,该第一参考点确定模式为将解码顺序中,距离当前点最近的K个已解码点作为参考点。因此,解码端根据上述S102-A的步骤,若确定当前点对应的参考点确定模式为第一参考点确定模式时,则按照解码顺序,将已解码点中距离当前点最近的K个已解码点,确定为K个参考点。可选的,该距离可以为曼哈顿距离或欧几里得距离等。
情况2,若参考点确定模式为第二参考点确定模式,该第二参考点确定模式为将已解码点中分类信息与当前点的分类信息相同的K个已解码点确定为参考点。因此,解码端根据上述S102-A的步骤,若确定当前点对应的参考点确定模式为第二参考点确定模式时,则按照解码顺序,从已解码点中选出分类信息与当前点的分类信息一致的K个已解码点,作为K个参考点。例如,对于当前点,按照解码顺序向前查找,如果查找到的候选参考点与当前点属于同一类别,则保留,否则,继续查找,直至查找到k个与当前点类别相同的参考点为止。
该情况2的实际效果,等同于将整个点云先按照分类信息分割为多个部分,然后对每个部分独立的按照情况1的方式查找。
情况3,若参考点确定模式为第三参考点确定模式,该第三参考点为基于分类信息和距离信息来确定参考点。因此,解码端根据上述S102-A的步骤,若确定当前点对应的参考点确定模式为第三参考点确定模式时,则解码端执行如下S102-B1至S102-B3的步骤:
S102-B1、根据分类信息和距离信息中的至少一个,确定已解码点的权重;
S102-B2、根据权重,确定已解码点的得分;
S102-B3、根据得分,从已解码点中确定K个参考点。
在该情况3中,若确定的当前点对应的参考点确定模式为第三参考点确定模式时,则根据分类信息和距离信息中 的至少一个,确定已解码点的权重,接着根据该权重,确定已解码点的得分,进而根据得分从已解码点中确定K个参考点。
其中上述S102-B1根据分类信息和距离信息中的至少一个,确定已解码点的权重的方式包括但不限于如下几种:
方式1,根据分类信息,确定已解码点的权重。在该方式1中,确定已解码点中每个点的权重过程相同,为了便于描述,在此以已解码点中的第i个点为例,根据该第i个点的分类信息,确定该第i个点的权重,i为正整数。
在方式1的一种实现方式中,为不同类别的点配置一不同的权重,例如,若第i个点属于第一类别,则确定第i个点的权重为W1,若第i个点属于第二类别,则确定第i个点的权重为W2。其中,W1和W2为预设值或默认值。
在该方式1的另一种实现方式中,根据第i个点的分类信息和当前点的分类信息,确定第i个点的权重。
例如,若第i个点的分类信息与当前点的分类信息一致,则确定第i个点的权重为第一权重;
再例如,若第i个点的分类信息与当前点的分类信息不一致,则确定第i个点的权重为第二权重。
本申请实施例对第一权重和第二权重的具体取值不做限制。在一些实施例中,第一权重和第二权重为预设值或默认值,在一些实施例中,第一权重和第二权重通过编码端指示给解码端。
在该方式1中,可以参照确定第i个点的权重的方式,确定出已解码点中每一个点的权重。
方式2,解码端还可以根据分类信息和距离信息,确定已解码点的权重。
继续以已解码点中的第i个点为例,根据第i个点的分类信息确定出权重1,根据第i个点与当前点之间的距离确定出权重2,根据权重1和权重2,确定出该第i个点的权重。
在一种示例中,若第i个点的分类信息与当前点的分类信息一致,则确定第i个点的权重1为第一权重。再例如,若第i个点的分类信息与当前点的分类信息不一致,则确定第i个点的权重1为第二权重。
在一种示例中,将第i个点与当前点之间的距离倒数,确定为第i个点的权重2。
接着,根据权重1和权重2,确定出该第i个点的权重,例如将第i个点的权重1与权重2的和值,确定为第i个点的权重,或者,将第i个点的权重1与权重2的乘积,确定为第i个点的权重。
方式3,解码端还可以根据距离信息,确定已解码点的权重。例如将已解码点到当前点的距离倒数,确定为已解码点的权重。
参照上述方法,解码端根据分类信息和距离信息中的至少一个,确定已解码点中每一个点的权重后,执行上述S102-B2根据权重,确定已解码点的得分。
本申请实施例对上述S102-B2的具体实现方式不做限制。
在一些实施例中,解码端将上述确定的已解码点的权重作为或转换为该已解码点的得分。也就是说,已解码点的权重越大,对应的得分越高。
在一些实施例中,根据第i个点与当前点之间的距离信息,以及第i个点的权重,确定第i个点的得分。
例如,若采用上述方式1或方式2确定第i个点的权重,即在确定第i个点的权重时,考虑了分类信息,此时,可以将根据第i个点与当前点之间的距离信息,以及第i个点的权重,确定第i个点的得分。例如将第i个点与当前点之间的距离信息、与第i个点的权重的乘积,确定为第i个点的得分。
示例性的,根据如下公式(2)确定第i个点的得分:
score=weight*dist   (2)
其中,weight为第i个点的权重,dist为第i个点与当前点之间的距离。
可选的,解码端还可以将第i个点与当前点之间的距离信息,以及第i个点的权重进行其他运算处理,得到第i个点的得分,本申请实施例对此不做限制。
在一些实施例中,若上述在确定第i个点的权重时,未考虑分类信息,例如使用上述方式3确定第i个点的权重时,则可以第i个点的分类信息和第i个点的权重,确定第i个点的得分。示例性的,根据第i个点的分类信息确定一个权值,将该权值与第i个点的权重的乘积或和值,确定为第i个点的得分。
上述以确定第i个点的得分为例进行说明,已解码点中的每一个点可以参照第i个点的方法,确定出已解码点中每一个点的得分,进而根据得分,从已解码点中确定出K个参数点。
例如,将已解码点中得分最大的K个已解码点,确定为当前点的K个参考点。
在一些实施例中,若已解码点的权重采用上述方式1确定,即若第i个点的分类信息与当前点的分类信息一致,则确定第i个点的权重为第一权重;若第i个点的分类信息与当前点的分类信息不一致,则确定第i个点的权重为第二权重。若第二权重大于第一权重,则将已解码点中得分最小的K个点,确定为K个参考点。
在该实施例中,可选的,第一权重为小于1的正数,第二权重为大于1的正数。
本申请实施中,解码端根据上述方法,确定出当前点的K个参考点,由上述可知,本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
解码端确定出当前点的K个参考点后,执行如下S103的步骤。
S103、根据K个参考点的属性信息,确定当前点的属性预测值。
在一些实施例中,解码端直接根据K个参考点的属性信息,确定当前点的属性预测值。例如将K个参考点的属性信息的加权平均值,确定为当前点的属性预测值。
在一些实施例中,上述S103包括如下步骤S103-A和S103-B的步骤。
S103-A、从K个参考点中确定M个预测点,M为小于或等于K的正整数。
在该实施例中,为了提升解码效率,则从K个参考点中确定出M个预测点,根据这M个预测点的属性信息,确定当前点的属性预测值。
下面对S103-A的具体实现过程进行介绍。
本申请实施例中,存在多种从K个参考点确定M个预测点的方式,基于此,上述S103-A包括如下步骤:
S103-A1、确定当前点对应的预测点确定模式;
S103-A2、根据预测点确定模式,从K个参考点中确定M个预测点。
在该实施例中,解码端首先从多个从K个参考点确定M个预测点的方式中,确定当前点对应的预测点确定模式,进而根据该预测点确定模式,从K个参考点中确定M个预测点。
在一些实施例中,点云中所有点的预测点确定模式相同,即解码端采用一种预测点确定模式,确定点云中每一个点的预测点。可选的,该预测点确定模式可以为默认模式。可选的,编码端从多个预测点确定模式确定出一个预测点确定模式,并将确定出的该预测点确定模式写入码流指示给解码端,这样解码端通过解码码流,得到该预测点确定模式,进而使用该预测点确定模式确定点云中所有点的预测点。可选的,编码端还可以为点云中每个点编码一个标识位,来指示每个点对应的预测点确定模式。
在一些实施例中,点云中可以使用多种预测点确定模式,例如点云中某一些点使用一种预测点确定模式来确定预测点,另一种预测点使用另一种预测点确定模式来确定预测点。
本申请实施例对预测点确定模式不做限制。
在一些实施例中,预测点确定模式为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个。可选的,第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个中至少一个模式基于分类信息确定预测点。
下面对上述S103-A中确定当前点对应的预测点确定模式的具体方式进行介绍。
上述S103-A中确定当前点对应的预测点确定模式的方式包括但不限于如下几种:
方式一,根据当前点的分类信息,确定当前点对应的预测点确定模式。
在该方式一的一种可能的实现方式中,点云中不同类别的点对应不同的预测点确定模式。
例如,若当前点的类别为第一类别,则确定预测点确定模式为第一种预测点确定模式。
再例如,若当前点的类别为第二类别,则确定预测点确定模式为第二种预测点确定模式。
上述第二种预测点确定模式与第一种预测点确定模式均为上述第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意一个,且第二种预测点确定模式与第一种预测点确定模式不同。
在一种示例中,点云中点的类别与预测点确定模式的对应关系如表2所示:
表2
点的分类信息 预测点确定模式
第一类别 第一种预测点确定模式
第二类别 第二种预测点确定模式
由上述表2可知,不同的类别的点对应不同的预测点确定模式,这样解码端可以根据当前点的分类信息,查询上述表2,确定出当前点对应的预测点确定模式。
在另一种示例中,上述第一种预测点确定模式和第二种确定模式为默认模式,例如,若当前点的类别为第一类别时,则解码端默认当前点对应的预测点确定模式为第二预测点确定模式,即第一种预测点确定模式为第二预测点确定模式。若当前点的类别为第二类别时,则编码端默认当前点对应的预测点确定模式为第三预测点确定模式,即第二种预测点确定模式为第三预测点确定模式。
在另一种示例中,编码端可以将不同类别对应的预测点确定模式写入码流,这样解码端可以通过解码码流,可以确定出当前点所属的类别所对应的预测点确定模式。例如,解码端从码流中解码出第一类别对应第二预测点确定模式,第二类别对应第三预测点确定模式。这样,若确定出当前点的类别为第一类别时,则将第二预测点确定模式确定为当前点对应的预测点确定模式,即第一种预测点确定模式为第二预测点确定模式。若确定出当前点的类别为第二类别时,则将第三预测点确定模式确定为当前点对应的预测点确定模式,即第二种预测点确定模式为第三预测点确定模式。
在该方式一的另一种可能的实现方式中,还可以根据当前点和已解码点的分类信息,确定当前点对应的预测点确定模式。
例如,若已解码点中与当前点的类别相同的已解码点的个数大于或等于某一预设值,则确定当前点对应的预测点确定模式为一种预测点确定模式。
再例如,若已解码点中与当前点的类别相同的已解码点的个数小于某一预设值,则确定当前点对应的预测点确定模式为另一种预测点确定模式。
解码端除了使用上述方式一确定当前点对应的预测点确定模式外,还可以采用下面的方式二、方式三、方式四或方式五,确定当前点对应的预测点确定模式。
方式二,根据K个参考点的分类信息,确定预测点确定模式。
在方式二中的一种实现方式中,确定K个参考点中属于不同类别的点的个数,将个数最多的类别对应的预测点确定模式,确定为当前点对应的预测点确定模式。例如,K个参考点中,属于第一类别的点的数量最多,如表示2所示,第一类别对应第一种预测点确定模式,进而将第一种预测点确定模式,确定为当前点对应的预测点确定模式。
在方式二的另一种实现方式中,根据K个参考点和当前点的分类信息,确定当前点对应的预测点确定模式。
例如,若K个参考点中与当前点属于同一类别的参考点的数量大于或等于第一阈值,则确定预测点确定模式为第三种预测点确定模式;
再例如,若K个参考点中与当前点属于同一类别的参考点的数量小于第一阈值,则确定预测点确定模式为第四种 预测点确定模式,第四种预测点确定模式与第三种预测点确定模式均为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且第四种预测点确定模式与第三种预测点确定模式不同。
方式三,当前点对应的预测点确定模式为默认模式。也就是说,解码端和编码端均采用默认模式确定当前点的预测点。
可选的,上述默认模式可以为第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意一个。
方式四,解码点云码流,得到第二标识,该第二标识用于指示当前点对应的预测点确定模式;根据第二标识,确定当前点对应的预测点确定模式。
在该方式四中,编码端将确定出当前点对应的预测点确定模式后,将该预测点确定模式指示给解码端,具体是,在码流中写入第二标识,通过该第二标识指示当前点对应的预测点确定模式。这样解码端可以通过解码码流,得到第二标识,进而根据第二标识确定出当前点对应的预测点确定模式。
可选的,该第二标识可以为该预测点确定模式的索引。
在该方式四的一种可能的实现方式中,编码端可以为点云中每一个点编码一个第二标识,用于指示该点对应的预测点确定模式。
在该方式四的一种可能的实现方式中,若点云中每个点对应的预测点确定模式相同时,则编码端可以在码流中写入一个第二标识,该第二标识用于指示点云中所有点对应的预测点确定模式。
在该方式四的一种可能的实现方式中,若不同类别的点对应的预测点确定模式不同时,则编码端可以为不同类别的点编码不同的第二标识,例如第一类点云对应的第二标识为B1,第二类点云对应的第二标识为B2。这样解码端可以根据当前点的分类信息,确定当前点对应的第二标识,进而根据第二标识确定出当前点对应的预测点确定模式。例如,若当前点为第一类点云,则解码端将第二标识B1对应的预测点确定模式确定为当前点对应的预测点确定模式,若当前点为第二类点云,则解码端将第二标识B2对应的预测点确定模式确定为当前点对应的预测点确定模式。
方式五,解码端通过自适应方法,确定出当前点对应的预测点确定模式。此时,上述S103-A包括如下步骤:
S103-A1、获取Q个预测点候选确定模式,Q为大于1的正整数;
S103-A2、从Q个预测点候选确定模式中,确定一预测点候选确定模式作为当前点对应的预测点确定模式。
上述Q个预测点候选确定模式为上述第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意Q个模式。
在一些实施例中,上述Q个预测点候选确定模式为编解码默认的。
在一些实施例中,编码端从第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中确定出Q个预测点候选确定模式,并将确定Q个预测点候选确定模式指示给解码端。
在一些实施例中,解码端还可以通过其他的方式,获取Q个预测点候选确定模式,本申请实施例对此不做限制。解码端获取Q个预测点候选确定模式后,从这Q个预测点候选确定模式中,确定当前点对应的预测点确定模式。
解码端从Q个预测点候选确定模式中,确定一预测点候选确定模式作为当前点对应的预测点确定模式的方式包括但不限于如下几种:
方式1,解码端根据当前点的分类信息,从这Q个预测点候选确定模式中,确定出当前点对应的预测点确定模式。
例如,若当前点的类别为第一类别,则将Q个预测点候选确定模式中的预测点候选模式a确定为当前点对应的预测点确定模式。
再例如,若当前点的类别为第二类别,则将Q个预测点候选确定模式中的预测点候选模式b确定为当前点对应的预测点确定模式。
方式2,解码端确定Q个预测点候选确定模式的代价;根据Q个预测点候选确定模式的代价,确定当前点对应的预测点确定模式。
上述代价可以为差值的平方和(Sum of Squared Difference,SSD)、绝对误差(Sum of Absolute Difference,SAD)、经hadamard变换后再绝对值求和(Sum of Absolute Transformed Difference,SATD)等代价。
在一些实施例中,还可以将属性最大差值确定为代价。
本申请实施例对确定Q个预测点候选确定模式的代价的具体方式不做限制。
在一种可能的实现方式中,解码端按照解码顺序,从已解码点中选择距离当前点最近的P个点,P为正整数;针对Q个预测点候选确定模式中的第j个预测点候选确定模式,使用第j个预测点候选确定模式对P个点进行预测,得到P个点在第j个预测点候选确定模式下的属性预测值,j为正整数;根据P个点在第j个预测点候选确定模式下的属性预测值,确定第j个预测点候选模式的代价。
也就是说,在该实现方式中,解码端按照解码顺序,从已解码点中选择距离当前点最近的P个点,使用Q个预测点候选确定模式分别对P个点进行预测,得到Q个预测点候选确定模式中每一个预测点候选确定模式对应的P个点的属性预测值,进而根据P个点的属性预测值,确定每个预测点候选确定模式的代价。
例如,以Q个预测点候选确定模式中的第j个预测点候选确定模式为例,使用第j个预测点候选确定模式对P个点中的每一个点进行属性预测,得到P个点中每个点在第j个预测点候选确定模式下的属性预测值。具体的,针对P个点中的第i个点,使用第j个预测点候选确定模式确定出第i个点的M个预测点,根据第i个点的M个预测点确定第i个点的属性预测值,例如将第i个点的M个预测点的属性信息的加权平均值,确定为第i个点的属性预测值。参照第i个点的属性预测值的确定方法,可以确定出P个点中每一个点在该第j个预测点候选确定模式下的属性预测值。接着,根据P个点中每一个点在该第j个预测点候选确定模式下的属性预测值,确定第j个预测点候选确定模式的代价。
其中,根据P个点中每一个点在该第j个预测点候选确定模式下的属性预测值,确定第j个预测点候选确定模式的代价的方式包括但不限于如下几种示例:
示例1,由于P个点为属性已解码点,这P个点在属性解码时,已经确定出各自的属性预测值,为了便于描述,将P个点在属性解码过程中确定的属性预测值记为原始属性预测值。这样可以将P个点在该第j个预测点候选确定模式下的属性预测值与原始属性预测值进行比较,确定出第j个预测点候选确定模式的代价。例如,将P个点在该第j个预测点候选确定模式下的属性预测值与这P个点的原始属性预测值的差值和,确定为第j个预测点候选确定模式的代价。
示例2,根据P个点在第j个预测点候选确定模式下的属性预测值,确定P个点在第j个预测点候选确定模式下的属性重建值;根据P个点在第j个预测点候选确定模式下的属性重建值,以及P个点的已解码属性值,确定第j个预测点候选确定模式的代价。
在该示例2中,解码码流,得到P个点的属性残差值,将P个点在第j个预测点候选确定模式下的属性预测值与P个点的属性残差值进行相加,可以得到P个点中每个点在第j个预测点候选确定模式下的属性重建值。由于P个点的属性信息已解码,因此,根据P个点在第j个预测点候选确定模式下的属性重建值,以及P个点的已解码属性值,确定第j个预测点候选确定模式的代价。例如,使用SAD、SATD、SSD等代价计算方式,确定出第j个预测点候选确定模式的代价。在一些实施例中,还可以将P个点中属性最大差值,确定为第j个预测点候选确定模式的代价。
根据上述方法,可以确定出N个预测点候选确定模式中每一个模式对应的代价,进而根据Q个预测点预测点候选确定模式的代价,确定预测点确定模式。
例如,将代价最小的一个预测点候选确定模式,确定为当前点对应的预测点确定模式。
再例如,若代价小于某一预设值,则将第一种预测点确定模式确定为当前点对应的预测点确定模式,否则将第二种预测点确定模式确定为当前点对应的预测点确定模式。
解码端根据上述方式确定出当前点对应的预测点确定模式后,执行上述S103-B的步骤,根据当前点对应的预测点确定模式,从所述K个参考点中确定M个预测点。
下面对S103-B的具体实现过程进行介绍。
上述S103-B中根据当前点对应的预测点确定模式的不同,具有不同的实现过程,示例性的包括但不限于如下几种情况:
情况1,若预测点确定模式为第一预测点确定模式,该第一预测点确定模式为将K个参考点确定为预测点。因此,解码端根据上述S103-A的步骤,若确定当前点对应的预测点确定模式为第一预测点确定模式时,则将K个参考点,确定为M个预测点,此时M等于K。
情况2,若预测点确定模式为第二预测点确定模式,该第二预测点确定模式为将K个参考点中的一个参考点确定为预测点。因此,解码端根据上述S103-A的步骤,若确定当前点对应的预测点确定模式为第二预测点确定模式时,则从K个参考点中选择一个参考点,确定为预测点,此时M等于1。
其中,从K个参考点中选择一个参考点,确定为预测点的方式至少包括如下几种示例:
示例1,将K个参考点中距离当前点最近的一个参考点,确定为预测点。
示例2,解码点云码流,得到当前点对应的第一索引,第一索引用于指示第一参考点,第一参考点为K个参考点中与当前点的属性信息最接近的一个参考点;将K个参考点中第一索引对应的第一参考点,确定为预测点。即编码端从K个参考点中确定出属性信息与当前点最近的第一参考点,将该第一参考点确定为当前点的预测点,同时,编码端将该第一参考点的索引(第一索引)写入码流。这样解码端通过解码码流,得到该第一索引,进而将K个参考点中该第一索引对应的参考点,确定为第一参考点,进而将该第一参考点确定为一个预测点。
在一些实施例中,码流中可以包括指示信息,用于指示该预测点是通过示例1的方式确定,还是通过示例2的方式确定。
情况3,若预测点确定模式为第三预测点确定模式,该第三预测点为基于分类信息和距离信息来确定预测点。因此,解码端根据上述S103-A的步骤,若确定当前点对应的预测点确定模式为第三预测点确定模式时,则将K个参考点中与当前点的分类信息一致,且距离当前点最近的M个参考点,确定为M个预测点。
解码端根据上述方法,从K个参考点中,确定出M个预测点后,执行如下S103-B的步骤。
S103-B、根据M个预测点的属性信息,确定当前点的属性预测值。
在一些实施例中,若根据上述步骤,确定M=1,即预测点为1个时,则将该预测点的属性信息,确定为当前点的属性预测值。
在一些实施例中,若M大于1,即当前点包括多个预测点时,则上述S103-B包括如下步骤:
S103-B1、根据M个预测点的分类信息,确定预测值计算方式;
S103-B2、根据预测值计算方式,以及M个预测点的属性信息,确定当前点的属性预测值。
本申请实施例对预测值计算方式的具体方式不做限制。
在一些实施例中,上述预测值计算方式为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种。
在该实施例中,若当前点包括多个预测点时,在根据预测点确定当前点的属性预测值之前,首先确定当前点对应的预测值计算方式。
具体的,根据M个预测点的分类信息,确定预测值计算方式,也就是说,本申请实施例,针对不同的点云类别,设置不同的预测值计算方式,进一步提高了属性预测值的计算准确性。
上述S103-B1的实现方式,至少包括如下几种:
方式1,若M个预测点中与当前点的类别相同的预测点的个数大于或等于第二阈值,则确定预测值计算方式为第一种预测值计算方式;若M个预测点中与当前点的类别相同的预测点的个数小于第二阈值,则确定预测值计算方式为 第二种预测值计算方式,其中,第一种预测值计算方式与第二种预测值计算方式均为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且第一种预测值计算方式与第二种预测值计算方式不同。
方式2,若M个预测点和当前点的类别均为第一类别时,则确定预测值计算方式为第三种预测值计算方式;若M个预测点和当前点的类别均为第二类别时,则确定预测值计算方式为第四种预测值计算方式,其中,第三种预测值计算方式与第四种预测值计算方式均为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且第三种预测值计算方式与第四种预测值计算方式不同。
解码端根据上述方式1或方式2,确定出当前点对应的预测值计算方式后,执行S103-B2,根据预测值计算方式,以及M个预测点的属性信息,确定当前点的属性预测值。
上述S103-B2中根据当前点对应的预测值计算方式的不同,具有不同的实现过程,示例性的包括但不限于如下几种情况:
情况1,若预测值计算方式为第一预测值计算方式,该第一预测值计算方式为一种加权方式。此时,解码端将M个预测点中各预测点与当前点之间距离的倒数,确定为M个预测点中各预测点的第一权重;根据M个预测点中各预测点的第一权重,对M个预测点的属性信息进行加权,得到当前点的属性预测值。
示例性的,解码端根据如下公式(3)确定当前点的属性预测值:
Figure PCTCN2022109891-appb-000002
其中,Y为当前点的属性预测值,M为预测点的个数,W i为M个预测点中第i个预测点的第一权重,P i为第i个预测点的属性信息。
情况2,若预测值计算方式为第二预测值计算方式,该第二预测值计算方式为另一种加权方式。此时,解码端针对M个预测点中的各预测点,根据预测点和当前点的位置信息以及预设的坐标轴权重,确定预测点的第二权重;根据M个预测点中各预测点的第二权重,对M个预测点的属性信息进行加权,得到当前点的属性预测值。
上述第一预测值计算方式,以距离的倒数作为每个预测点的权重。该在欧几里得距离时,考虑到点云在xyz三个轴方向的分布是不均匀的,一些点云在xy平面空间分布跨度大,而在z方向空间分布跨度小。基于此,对不同的方向轴设置不同的权重。
在一种示例中,根据如下公式(4)确定预测点的第二权重:
Figure PCTCN2022109891-appb-000003
其中,i为当前点,j为M个预测点中的第j个预测点,
Figure PCTCN2022109891-appb-000004
为第j个预测点的第二权重,(x i,y i,z i)为当前点的坐标,(x ij,y ij,z ij)为当前点的M个预测点中的第j个预测点的坐标,a、b、c为xyz三轴对应的权重。
本申请实施例对a、b、c的具体取值不做限制,在一种示例中,a和b为1。
根据上述公式(4)确定出M个预测点中每个预测点的第二权重,进而根据M个预测点中各预测点的第二权重,对M个预测点的属性信息进行加权,得到当前点的属性预测值。
在一种示例中,根据如下公式(5)确定当前点的属性预测值:
Figure PCTCN2022109891-appb-000005
其中,
Figure PCTCN2022109891-appb-000006
为当前点的属性预测值,
Figure PCTCN2022109891-appb-000007
为M个预测点中第j个预测点的属性信息。
情况3,若预测值计算方式为第三预测值计算方式,该第三预测值计算方式为根据M个预测点,确定M+1个预测值,进而从M+1个预测值中确定当前点的属性预测值。此时,解码端首先确定M个预测点的属性加权平均值,并将属性加权平均值作为一个预测值;根据M个预测点的属性信息,确定M个预测值;根据确定的一个预测值和M个预测值,确定当前点的属性预测值。
在情况3中,解码端确定出M+1个属性预测值,具体是,由M个预测点的属性加权平均值确定的一个属性预测值,以及根据M个预测点的属性信息,确定的M个属性预测值,例如将M个预测点的属性信息,确定为M个属性预测值。接着,从这M+1个属性预测值,确定出当前点的属性预测值。例如,解码端解码点云码流,得到第二索引,该第二索引用于指示目标预测值,进而将M+1个预测值中,该第二索引对应的目标预测值,确定为当前点的属性预测值。
由上述可知,本申请实施例涉及的加权方式至少包括情况1和情况2所示的2种,因此,在该情况3中,确定确定M个预测点的属性加权平均值之前,首先需要确定目标加权平均方式,进而使用该目标加权平均方式,确定M个预测点的属性加权平均值。
本申请实施例对目标加权平均方式的具体方式不做限制。
在一些实施例中,目标加权平均方式为第一加权平均方式和第二加权平均方式中的任意一种方式。可选的,上述第一加权平均方式为上述情况1中的加权方式,第二加权平均方式为上述情况2中的加权方式。
在一些实施例中,上述目标加权平均方式为默认方式。
在一些实施例中,根据M个预测点的分类信息,确定目标加权平均方式。
例如,若M个预测点中与当前点的类别相同的预测点的个数大于或等于第二阈值,则确定目标加权平均方式为第一种加权平均方式;若M个预测点中与当前点的类别相同的预测点的个数小于第二阈值,则确定目标加权平均方式为第二种加权平均方式,其中,第一种加权平均方式与第二种加权平均方式均为第一加权平均方式和第二加权平均方式中的任意一种,且第一种加权平均方式与第二种加权平均方式不同。
再例如,若M个预测点和当前点的类别均为第一类别时,则确定目标加权平均方式为第三种加权平均方式;若M个预测点和当前点的类别均为第二类别时,则确定目标加权平均方式为第四种加权平均方式,其中第三种加权平均方式与第四种加权平均方式均为第一加权平均方式和第二加权平均方式中的任意一种,且第三种加权平均方式与第四种 加权平均方式不同。
在一些实施例中,若目标加权计算方式为第一加权平均方式,则将M个预测点中各预测点与当前点之间距离的倒数,确定为M个预测点中各预测点的第一权重;根据M个预测点中各预测点的第一权重,对M个预测点的属性信息进行加权,得到M个预测点的属性加权平均值。具体的,可以参照上述公式(3)的描述。
在一些实施例中,若目标加权计算方式为第二加权平均方式,则针对M个预测点中的各预测点,根据预测点和当前点的位置信息以及预设的坐标轴权重,确定预测点的第二权重;根据M个预测点中各预测点的第二权重,对M个预测点的属性信息进行加权,得到M个预测点的属性加权平均值。具体的,可以参照上述公式(4)和公式(5)的描述。
解码端根据上述S103的描述,确定出当前点的属性预测值,接着,执行如下S104的步骤。
S104、根据当前点的属性预测值,确定当前点的属性重建值。
示例性的,解码端解码码流,得到当前点的属性残差值,进而根据当前点的属性残差值和属性预测值,得到当前点的属性重建值。例如,将当前点的属性残差值和属性预测值的和,确定为当前点的属性重建值。
本申请实施例提供的点云编码方法,通过确定点云中当前点和已解码点的分类信息,和/或已解码点与当前点之间的距离信息,分类信息用于指示点所属的类别;根据分类信息和距离信息中的至少一个,从已解码点中确定当前点的K个参考点,K为正整数;根据K个参考点的属性信息,确定当前点的属性预测值;根据当前点的属性预测值,确定当前点的属性重建值。由于相同类别的点的属性信息比较相近,基于此本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
上文以解码端为例,对本申请实施例提供的点云解码方法进行详细介绍,下面以编码端为例,对本申请实施例提供的点云编码方法进行介绍。
图6为本申请一实施例提供的点云编码方法流程示意图。本申请实施例的点云编码方法可以由上述图1或图2所示的点云编码设备完成。
如图6所示,本申请实施例的点云解码方法包括:
S201、确定点云中当前点和已编码点的分类信息,和/或已编码点与当前点之间的距离信息。
其中分类信息用于指示点云中点所属的类别。
在一些实施例中,分类信息可以理解为点云中的点所属的现实世界的类别,例如道路、汽车、行人等。
本申请实施例中,确定当前点和已编码点的分类信息,和/或已编码点与当前点之间的距离信息,进而根据分类信息和/或距离信息,从已编码点中确定当前点的K个参考点。由于相同类别的点的属性信息比较相近,基于此本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
本申请实施例对确定点云中当前点和已编码点的分类信息的具体过程相同。
上述S201中确定点云中当前点和已编码点的分类信息的方式包括但不限于如下几种:
方式1,在对点云进行属性编码之前,已完成对点云的几何编码(也称为位置编码),得到了点云中点的几何信息。根据点云中点的几何信息对点云进行分割,得到点云的分类信息,进而确定出当前点以及已编码点的分类信息。
方式2,点云码流中包括点云中点的分类信息的指示信息,这样编码端通过编码点云码流,得到当前点以及已编码点的分类信息。例如,编码端将点云中每个点的类别标识写入码流中,编码端通过编码码流,得到点云中当前点以及已编码点的类别标识,进而根据类别标识,确定出分类信息。
方式3,通过预先训练好的神经网络模型,预测当前点以及已编码点的分类信息。
由于在属性编码之前,已完成点云的几何编码,因此,编码端可以根据已编码点的位置信息和当前点的位置信息,确定为已编码点与当前点之间的距离信息。
本申请实施例对确定已编码点与当前点之间的距离的具体方式不做限制。
在一种示例中,根据曼哈顿距离计算方法,确定已编码点与当前点之间的曼哈顿距离。
在另一种示例中,根据欧几里得距离计算方法,确定已编码点与当前点之间的欧几里得距离。
本申请实施例对确定分类信息和距离信息的已编码点的具体数量不做限制。
在一些实施例中,将编码顺序中,位于当前点之前的L个已编码点作为研究对象,确定当前点和这L个已编码点的分类信息,和/或确定这L个已编码点中每个已编码点到当前点的距离,其中L为正整数。
本申请实施例的编码顺序可以是点云中点的原始输入顺序、莫顿顺序、希尔伯特顺序、LOD顺序中的任意一种。其中莫顿顺序可以理解为将点云中点的坐标转换为莫顿码,根据莫顿码大小,按照从小到大排序对点云进行排序得到的顺序。其中希尔伯特顺序可以理解为将点云中点的坐标转换为希尔伯特码,根据希尔伯特码大小,按照从小到大排序对点云进行排序得到的顺序。
根据上述方法可以确定出当前点以及已编码点的分类信息,和/或已编码点与当前点之间的距离信息,接着,执行如下S202的步骤。
S202、根据分类信息和距离信息中的至少一个,从已编码点中确定当前点的K个参考点。
在一些实施例中,编码端根据当前点和已编码点的分类信息,从已编码点中确定出当前点的K个参考点。例如,编码端将编码顺序中靠近当前点、且类别与当前点的类别相同的K个已编码点,确定为当前点的K个参考点。
在一些实施例中,编码端根据当前点和已编码点的分类信息,以及已编码点与当前点之间的距离,从已编码点中确定出当前点的K个参考点。例如,编码端将类别与当前点类别一致,且距离当前点最近的K个已编码点,确定为当 前点的K个参考点。
在一些实施例中,编码端根据已编码点与当前点之间的距离,从已编码点中确定出当前点的K个参考点。例如,编码端将距离当前点最近的K个已编码点,确定为当前点的K个参考点。
在一些实施例中,本申请实施例包括多种确定参考点的方式,此时,上述S202包括如下S202-A和S202-B的步骤:
S202-A、确定当前点对应的参考点确定模式。
S202-B、根据参考点确定模式,以及分类信息和距离信息中的至少一个,从已编码点中确定当前点的K个参考点。
在该实施例中,若存在多种确定参考点的方式时,编码端在确定当前点的参考点时,首先需要确定当前点对应的参考点确定模式,进而根据确定参考点确定模式,以及分类信息和距离信息中的至少一个,从已编码点中确定当前点的K个参考点。
在一些实施例中,点云中所有点的参考点确定模式相同,即编码端采用一种参考点确定模式,确定点云中每一个点的参考点。可选的,该参考点确定模式可以为默认模式。可选的,编码端从多个参考点确定模式确定出一个参考点确定模式,并将确定出的该参考点确定模式写入码流指示给编码端,这样解码端通过编码码流,得到该参考点确定模式,进而使用该参考点确定模式确定点云中所有点的参考点。可选的,编码端还可以为点云中每个点编码一个标识位,来指示每个点对应的参考点确定模式。
在一些实施例中,点云中可以使用多种参考点确定模式,例如点云中某一些点使用一种参考点确定模式确定参考点,另一种参考点使用另一种参考点确定模式来确定参考点。
本申请实施例对参考点确定模式不做限制。
在一些实施例中,参考点确定模式为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。可选的,第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中至少一个模式基于分类信息确定参考点。
下面对上述S202-A中确定当前点对应的参考点确定模式的具体方式进行介绍。
上述S202-A中确定当前点对应的参考点确定模式的方式包括但不限于如下几种:
方式一,根据当前点的分类信息,确定当前点对应的参考点确定模式。
在该方式一的一种可能的实现方式中,点云中不同类别的点对应不同的参考点确定模式。
例如,若当前点的类别为第一类别,则确定参考点确定模式为第一种参考点确定模式。
再例如,若当前点的类别为第二类别,则确定参考点确定模式为第二种参考点确定模式。
上述第二种参考点确定模式与第一种参考点确定模式均为上述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个,且第二种参考点确定模式与第一种参考点确定模式不同。
在一种示例中,点云中点的类别与参考点确定模式的对应关系如表1所示。这样编码端可以根据当前点的分类信息,查询上述表1,确定出当前点对应的参考点确定模式。
在另一种示例中,上述第一种参考点确定模式和第二种确定模式为默认模式,例如,若当前点的类别为第一类别时,则编码端默认当前点对应的参考点确定为第二参考点确定模式,即第一种参考点确定模式为第二参考点确定模式。若当前点的类别为第二类别时,则编码端默认当前点对应的参考点确定模式为第三参考点确定模式,即第二种参考点确定模式为第三参考点确定模式。
在一些实施例中,上述第一种参考点确定模式和第二种确定模式为用户指示的。此时,解码端将第一种参考点确定模式和第二种确定模式指示给解码端。
在一些实施例中,编码端可以将不同类别对应的参考点确定模式写入码流,这样解码端可以通过编码码流,可以确定出当前点所属的类别所对应的参考点确定模式。
在该方式一的另一种可能的实现方式中,还可以根据当前点和已编码点的分类信息,确定当前点对应的参考点确定模式。
例如,若已编码点中与当前点的类别相同的已编码点的个数大于或等于某一预设值,则确定当前点对应的参考点确定模式为一种参考点确定模式。
再例如,若已编码点中与当前点的类别相同的已编码点的个数小于某一预设值,则确定当前点对应的参考点确定模式为另一种参考点确定模式。
编码端除了使用上述方式一确定当前点对应的参考点确定模式外,还可以采用下面的方式二、方式三或方式四,确定当前点对应的参考点确定模式。
方式二,当前点对应的参考点确定模式为默认模式。也就是说,编码端和解码端均采用默认模式确定当前点的参考点。
可选的,上述默认模式可以为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。
方式三,当前点对应的参考点确定模式为编码端根据代价确定的,或者随机选取的。
在该方式三中,编码在点云码流中写入第一标识,该第一标识用于指示当前点对应的参考点确定模式。
可选的,该第一标识可以为该参考点确定模式的索引。
在该方式三的一种可能的实现方式中,编码端可以为点云中每一个点编码一个第一标识,用于指示该点对应的参考点确定模式。
在该方式三的一种可能的实现方式中,若点云中每个点对应的参考点确定模式相同时,则编码端可以在码流中写入一个第一标识,该第一标识用于指示点云中所有点对应的参考点确定模式。
在该方式三的一种可能的实现方式中,若不同类别的点对应的参考点确定模式不同时,则编码端可以为不同类别的点编码不同的第一标识,例如第一类点云对应的第一标识为B1,第二类点云对应的第一标识为B2。这样解码端可 以根据当前点的分类信息,确定当前点对应的第一标识,进而根据第一标识确定出当前点对应的参考点确定模式。例如,若当前点为第一类点云,则解码端将第一标识B1对应的参考点确定模式确定为当前点对应的参考点确定模式,若当前点为第二类点云,则解码端将第一标识B2对应的参考点确定模式确定为当前点对应的参考点确定模式。
方式四,编码端通过自适应方法,确定出当前点对应的参考点确定模式。此时,上述S202-A包括如下步骤:
S202-A1、获取N个参考点候选确定模式,N为正整数;
S202-A2、从N个参考点候选确定模式中,确定一参考点候选确定模式作为当前点对应的参考点确定模式。
上述N个参考点候选确定模式为上述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意N个模式。
在一些实施例中,上述N个参考点候选确定模式为编编码默认的。
在一些实施例中,编码端从第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中确定出N个参考点候选确定模式,并将确定N个参考点候选确定模式指示给编码端。
在一些实施例中,编码端还可以通过其他的方式,获取N个参考点候选确定模式,本申请实施例对此不做限制。编码端获取N个参考点候选确定模式后,从这N个参考点候选确定模式中,确定当前点对应的参考点确定模式。
编码端从N个参考点候选确定模式中,确定一参考点候选确定模式作为当前点对应的参考点确定模式的方式包括但不限于如下几种:
方式1,编码端根据当前点的分类信息,从这N个参考点候选确定模式中,确定出当前点对应的参考点确定模式。
例如,若当前点的类别为第一类别,则将N个参考点候选确定模式中的参考点候选模式a确定为当前点对应的参考点确定模式。
再例如,若当前点的类别为第二类别,则将N个参考点候选确定模式中的参考点候选模式b确定为当前点对应的参考点确定模式。
方式2,编码端确定N个参考点候选确定模式的代价;将N个参考点候选确定模式中代价最小的参考点候选确定模式,确定为当前点对应的参考点确定模式。
上述代价可以为差值的平方和(Sum of Squared Difference,SSD)、绝对误差(Sum of Absolute Difference,SAD)、经hadamard变换后再绝对值求和(Sum of Absolute Transformed Difference,SATD)等代价。
本申请实施例对确定N个参考点候选确定模式的代价的具体方式不做限制。
在一种可能的实现方式中,编码端按照编码顺序,从已编码点中选择距离当前点最近的P个点,P为正整数;针对N个参考点候选确定模式中的第j个参考点候选确定模式,使用第j个参考点候选确定模式对P个点进行预测,得到P个点在第j个参考点候选确定模式下的属性预测值,j为正整数;根据P个点在第j个参考点候选确定模式下的属性预测值,确定第j个参考点候选模式的代价。
其中,根据P个点中每一个点在该第j个参考点候选确定模式下的属性预测值,确定第j个参考点候选确定模式的代价的方式包括但不限于如下几种示例:
示例1,由于P个点为属性已编码点,这P个点在属性编码时,已经确定出各自的属性预测值,为了便于描述,将P个点在属性编码过程中确定的属性预测值记为原始属性预测值。这样可以将P个点在该第j个参考点候选确定模式下的属性预测值与原始属性预测值进行比较,确定出第j个参考点候选确定模式的代价。例如,将P个点在该第j个参考点候选确定模式下的属性预测值与这P个点的原始属性预测值的差值和,确定为第j个参考点候选确定模式的代价。
在一些示例中,根据如下如公式(1)确定第j个参考点候选确定模式的代价。
示例2,根据P个点在第j个参考点候选确定模式下的属性预测值,确定P个点在第j个参考点候选确定模式下的属性重建值;根据P个点在第j个参考点候选确定模式下的属性重建值,以及P个点的已编码属性值,确定第j个参考点候选确定模式的代价。
在该示例2中,编码码流,得到P个点的属性残差值,将P个点在第j个参考点候选确定模式下的属性预测值与P个点的属性残差值进行相加,可以得到P个点中每个点在第j个参考点候选确定模式下的属性重建值。由于P个点的属性信息已编码,因此,根据P个点在第j个参考点候选确定模式下的属性重建值,以及P个点的已编码属性值,确定第j个参考点候选确定模式的代价。例如,使用SAD、SATD、SSD等代价计算方式,确定出第j个参考点候选确定模式的代价。
根据上述方法,可以确定出N个参考点候选确定模式中每一个模式对应的代价,进而将代价最小的一个参考点候选确定模式,确定为当前点对应的参考点确定模式。
编码端根据上述方式确定出当前点对应的参考点确定模式后,执行上述S202-B的步骤,根据当前点对应的参考点确定模式,以及分类信息和距离信息中的至少一个,从已编码点中确定所述当前点的K个参考点。
下面对S202-B的具体实现过程进行介绍。
上述S202-B中根据当前点对应的参考点确定模式的不同,具有不同的实现过程,示例性的包括但不限于如下几种情况:
情况1,若参考点确定模式为第一参考点确定模式,该第一参考点确定模式为将编码顺序中,距离当前点最近的K个已编码点作为参考点。此时按照编码顺序,将已编码点中距离当前点最近的K个已编码点,确定为K个参考点。可选的,该距离可以为曼哈顿距离或欧几里得距离等。
情况2,若参考点确定模式为第二参考点确定模式,该第二参考点确定模式为将已编码点中分类信息与当前点的分类信息相同的K个已编码点确定为参考点。此时按照编码顺序,从已编码点中选出分类信息与当前点的分类信息一致的K个已编码点,作为K个参考点。例如,对于当前点,按照编码顺序向前查找,如果查找到的候选参考点与当前点属于同一类别,则保留,否则,继续查找,直至查找到k个与当前点类别相同的参考点为止。
该情况2的实际效果,等同于将整个点云先按照分类信息分割为多个部分,然后对每个部分独立的按照情况1的方式查找。
情况3,若参考点确定模式为第三参考点确定模式,该第三参考点为基于分类信息和距离信息来确定参考点。因此,编码端根据上述S202-A的步骤,若确定当前点对应的参考点确定模式为第三参考点确定模式时,则编码端执行如下S202-B1至S202-B3的步骤:
S202-B1、根据分类信息和距离信息中的至少一个,确定已编码点的权重;
S202-B2、根据权重,确定已编码点的得分;
S202-B3、根据得分,从已编码点中确定K个参考点。
在该情况3中,若确定的当前点对应的参考点确定模式为第三参考点确定模式时,则根据分类信息和距离信息中的至少一个,确定已编码点的权重,接着根据该权重,确定已编码点的得分,进而根据得分从已编码点中确定K个参考点。
其中上述S202-B1根据分类信息和距离信息中的至少一个,确定已编码点的权重的方式包括但不限于如下几种:
方式1,根据分类信息,确定已编码点的权重。在该方式1中,确定已编码点中每个点的权重过程相同,为了便于描述,在此以已编码点中的第i个点为例,根据该第i个点的分类信息,确定该第i个点的权重,i为正整数。
在方式1的一种实现方式中,为不同类别的点配置一不同的权重,例如,若第i个点属于第一类别,则确定第i个点的权重为W1,若第i个点属于第二类别,则确定第i个点的权重为W2。其中,W1和W2为预设值或默认值。
在该方式1的另一种实现方式中,根据第i个点的分类信息和当前点的分类信息,确定第i个点的权重。
例如,若第i个点的分类信息与当前点的分类信息一致,则确定第i个点的权重为第一权重;
再例如,若第i个点的分类信息与当前点的分类信息不一致,则确定第i个点的权重为第二权重。
本申请实施例对第一权重和第二权重的具体取值不做限制。
在该方式1中,可以参照确定第i个点的权重的方式,确定出已编码点中每一个点的权重。
方式2,编码端还可以根据分类信息和距离信息,确定已编码点的权重。
继续以已编码点中的第i个点为例,根据第i个点的分类信息确定出权重1,根据第i个点与当前点之间的距离确定出权重2,根据权重1和权重2,确定出该第i个点的权重。
在一种示例中,若第i个点的分类信息与当前点的分类信息一致,则确定第i个点的权重1为第一权重。再例如,若第i个点的分类信息与当前点的分类信息不一致,则确定第i个点的权重1为第二权重。
在一种示例中,将第i个点与当前点之间的距离倒数,确定为第i个点的权重2。
接着,根据权重1和权重2,确定出该第i个点的权重,例如将第i个点的权重1与权重2的和值,确定为第i个点的权重,或者,将第i个点的权重1与权重2的乘积,确定为第i个点的权重。
方式3,编码端还可以根据距离信息,确定已编码点的权重。例如将已编码点到当前点的距离倒数,确定为已编码点的权重。
参照上述方法,编码端根据分类信息和距离信息中的至少一个,确定已编码点中每一个点的权重后,执行上述S202-B2根据权重,确定已编码点的得分。
本申请实施例对上述S202-B2的具体实现方式不做限制。
在一些实施例中,编码端将上述确定的已编码点的权重作为或转换为该已编码点的得分。也就是说,已编码点的权重越大,对应的得分越高。
在一些实施例中,根据第i个点与当前点之间的距离信息,以及第i个点的权重,确定第i个点的得分。
例如,若采用上述方式1或方式2确定第i个点的权重,即在确定第i个点的权重时,考虑了分类信息,此时,可以将根据第i个点与当前点之间的距离信息,以及第i个点的权重,确定第i个点的得分。例如将第i个点与当前点之间的距离信息、与第i个点的权重的乘积,确定为第i个点的得分。
示例性的,根据上述公式(2)确定第i个点的得分。
可选的,编码端还可以将第i个点与当前点之间的距离信息,以及第i个点的权重进行其他运算处理,得到第i个点的得分,本申请实施例对此不做限制。
在一些实施例中,若上述在确定第i个点的权重时,未考虑分类信息,例如使用上述方式3确定第i个点的权重时,则可以第i个点的分类信息和第i个点的权重,确定第i个点的得分。示例性的,根据第i个点的分类信息确定一个权值,将该权值与第i个点的权重的乘积或和值,确定为第i个点的得分。
上述以确定第i个点的得分为例进行说明,已编码点中的每一个点可以参照第i个点的方法,确定出已编码点中每一个点的得分,进而根据得分,从已编码点中确定出K个参数点。
例如,将已编码点中得分最大的K个已编码点,确定为当前点的K个参考点。
在一些实施例中,若已编码点的权重采用上述方式1确定,即若第i个点的分类信息与当前点的分类信息一致,则确定第i个点的权重为第一权重;若第i个点的分类信息与当前点的分类信息不一致,则确定第i个点的权重为第二权重。若第二权重大于第一权重,则将已编码点中得分最小的K个点,确定为K个参考点。
在该实施例中,可选的,第一权重为小于1的正数,第二权重为大于1的正数。
本申请实施中,编码端根据上述方法,确定出当前点的K个参考点,由上述可知,本申请实施例在确定参考点时,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性。
编码端确定出当前点的K个参考点后,执行如下S203的步骤。
S203、根据K个参考点的属性信息,确定当前点的属性预测值。
在一些实施例中,编码端直接根据K个参考点的属性信息,确定当前点的属性预测值。例如将K个参考点的属性信息的加权平均值,确定为当前点的属性预测值。
在一些实施例中,上述S203包括如下步骤S203-A和S203-B的步骤。
S203-A、从K个参考点中确定M个预测点,M为小于或等于K的正整数。
在该实施例中,为了提升编码效率,则从K个参考点中确定出M个预测点,根据这M个预测点的属性信息,确定当前点的属性预测值。
下面对S203-A的具体实现过程进行介绍。
本申请实施例中,存在多种从K个参考点确定M个预测点的方式,基于此,上述S203-A包括如下步骤:
S203-A1、确定当前点对应的预测点确定模式;
S203-A2、根据预测点确定模式,从K个参考点中确定M个预测点。
在该实施例中,编码端首先从多个从K个参考点确定M个预测点的方式中,确定当前点对应的预测点确定模式,进而根据该预测点确定模式,从K个参考点中确定M个预测点。
在一些实施例中,点云中所有点的预测点确定模式相同,即编码端采用一种预测点确定模式,确定点云中每一个点的预测点。
在一些实施例中,点云中可以使用多种预测点确定模式,例如点云中某一些点使用一种预测点确定模式来确定预测点,另一种预测点使用另一种预测点确定模式来确定预测点。
本申请实施例对预测点确定模式不做限制。
在一些实施例中,预测点确定模式为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个。可选的,第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个中至少一个模式基于分类信息确定预测点。
下面对上述S203-A中确定当前点对应的预测点确定模式的具体方式进行介绍。
上述S203-A中确定当前点对应的预测点确定模式的方式包括但不限于如下几种:
方式一,根据当前点的分类信息,确定当前点对应的预测点确定模式。
在该方式一的一种可能的实现方式中,点云中不同类别的点对应不同的预测点确定模式。
例如,若当前点的类别为第一类别,则确定预测点确定模式为第一种预测点确定模式。
再例如,若当前点的类别为第二类别,则确定预测点确定模式为第二种预测点确定模式。
上述第二种预测点确定模式与第一种预测点确定模式均为上述第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意一个,且第二种预测点确定模式与第一种预测点确定模式不同。
在一种示例中,点云中点的类别与预测点确定模式的对应关系如表2所示。这样编码端可以根据当前点的分类信息,查询上述表2,确定出当前点对应的预测点确定模式。
在另一种示例中,上述第一种预测点确定模式和第二种确定模式为默认模式。
在另一种示例中,上述第一种预测点确定模式和第二种确定模式为编码端随机选取的,或者根据代价确定的。
在该示例中,编码端将第一种预测点确定模式和第二种确定模式指示给解码端。
在一些实施例中,编码端可以将不同类别对应的预测点确定模式写入码流,这样解码端可以通过编码码流,可以确定出当前点所属的类别所对应的预测点确定模式。
在该方式一的另一种可能的实现方式中,还可以根据当前点和已编码点的分类信息,确定当前点对应的预测点确定模式。
例如,若已编码点中与当前点的类别相同的已编码点的个数大于或等于某一预设值,则确定当前点对应的预测点确定模式为一种预测点确定模式。
再例如,若已编码点中与当前点的类别相同的已编码点的个数小于某一预设值,则确定当前点对应的预测点确定模式为另一种预测点确定模式。
编码端除了使用上述方式一确定当前点对应的预测点确定模式外,还可以采用下面的方式二、方式三、方式四或方式五,确定当前点对应的预测点确定模式。
方式二,根据K个参考点的分类信息,确定预测点确定模式。
在方式二中的一种实现方式中,确定K个参考点中属于不同类别的点的个数,将个数最多的类别对应的预测点确定模式,确定为当前点对应的预测点确定模式。例如,K个参考点中,属于第一类别的点的数量最多,如表示2所示,第一类别对应第一种预测点确定模式,进而将第一种预测点确定模式,确定为当前点对应的预测点确定模式。
在方式二的另一种实现方式中,根据K个参考点和当前点的分类信息,确定当前点对应的预测点确定模式。
例如,若K个参考点中与当前点属于同一类别的参考点的数量大于或等于第一阈值,则确定预测点确定模式为第三种预测点确定模式;
再例如,若K个参考点中与当前点属于同一类别的参考点的数量小于第一阈值,则确定预测点确定模式为第四种预测点确定模式,第四种预测点确定模式与第三种预测点确定模式均为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且第四种预测点确定模式与第三种预测点确定模式不同。
方式三,当前点对应的预测点确定模式为默认模式。也就是说,编码端和编码端均采用默认模式确定当前点的预测点。
可选的,上述默认模式可以为第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意一个。
方式四,编码端根据代价或随机选择一预测点确定模式作为当前点对应的预测点确定模式。
在该方式四中,编码端在点云码流中写入第二标识,该第二标识用于指示当前点对应的预测点确定模式。
在该方式四中,编码端将确定出当前点对应的预测点确定模式后,将该预测点确定模式指示给编码端,具体是, 在码流中写入第二标识,通过该第二标识指示当前点对应的预测点确定模式。
可选的,该第二标识可以为该预测点确定模式的索引。
在该方式四的一种可能的实现方式中,编码端可以为点云中每一个点编码一个第二标识,用于指示该点对应的预测点确定模式。
在该方式四的一种可能的实现方式中,若点云中每个点对应的预测点确定模式相同时,则编码端可以在码流中写入一个第二标识,该第二标识用于指示点云中所有点对应的预测点确定模式。
在该方式四的一种可能的实现方式中,若不同类别的点对应的预测点确定模式不同时,则编码端可以为不同类别的点编码不同的第二标识,例如第一类点云对应的第二标识为B1,第二类点云对应的第二标识为B2。
方式五,编码端通过自适应方法,确定出当前点对应的预测点确定模式。此时,上述S203-A包括如下步骤:
S203-A1、获取Q个预测点候选确定模式,Q为大于1的正整数;
S203-A2、从Q个预测点候选确定模式中,确定一预测点候选确定模式作为当前点对应的预测点确定模式。
上述Q个预测点候选确定模式为上述第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意Q个模式。
在一些实施例中,上述Q个预测点候选确定模式为编编码默认的。
在一些实施例中,编码端从第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中确定出Q个预测点候选确定模式。进一步的,编码端将确定Q个预测点候选确定模式指示给编码端。
在一些实施例中,编码端还可以通过其他的方式,获取Q个预测点候选确定模式,本申请实施例对此不做限制。编码端获取Q个预测点候选确定模式后,从这Q个预测点候选确定模式中,确定当前点对应的预测点确定模式。
编码端从Q个预测点候选确定模式中,确定一预测点候选确定模式作为当前点对应的预测点确定模式的方式包括但不限于如下几种:
方式1,编码端根据当前点的分类信息,从这Q个预测点候选确定模式中,确定出当前点对应的预测点确定模式。
例如,若当前点的类别为第一类别,则将Q个预测点候选确定模式中的预测点候选模式a确定为当前点对应的预测点确定模式。
再例如,若当前点的类别为第二类别,则将Q个预测点候选确定模式中的预测点候选模式b确定为当前点对应的预测点确定模式。
方式2,编码端确定Q个预测点候选确定模式的代价;根据Q个预测点候选确定模式的代价,确定当前点对应的预测点确定模式。
上述代价可以为差值的平方和(Sum of Squared Difference,SSD)、绝对误差(Sum of Absolute Difference,SAD)、经hadamard变换后再绝对值求和(Sum of Absolute Transformed Difference,SATD)等代价。
在一些实施例中,还可以将属性最大差值确定为代价。
本申请实施例对确定Q个预测点候选确定模式的代价的具体方式不做限制。
在一种可能的实现方式中,编码端按照编码顺序,从已编码点中选择距离当前点最近的P个点,P为正整数;针对Q个预测点候选确定模式中的第j个预测点候选确定模式,使用第j个预测点候选确定模式对P个点进行预测,得到P个点在第j个预测点候选确定模式下的属性预测值,j为正整数;根据P个点在第j个预测点候选确定模式下的属性预测值,确定第j个预测点候选模式的代价。
也就是说,在该实现方式中,编码端按照编码顺序,从已编码点中选择距离当前点最近的P个点,使用Q个预测点候选确定模式分别对P个点进行预测,得到Q个预测点候选确定模式中每一个预测点候选确定模式对应的P个点的属性预测值,进而根据P个点的属性预测值,确定每个预测点候选确定模式的代价。
其中,根据P个点中每一个点在该第j个预测点候选确定模式下的属性预测值,确定第j个预测点候选确定模式的代价的方式包括但不限于如下几种示例:
示例1,由于P个点为属性已编码点,这P个点在属性编码时,已经确定出各自的属性预测值,为了便于描述,将P个点在属性编码过程中确定的属性预测值记为原始属性预测值。这样可以将P个点在该第j个预测点候选确定模式下的属性预测值与原始属性预测值进行比较,确定出第j个预测点候选确定模式的代价。例如,将P个点在该第j个预测点候选确定模式下的属性预测值与这P个点的原始属性预测值的差值和,确定为第j个预测点候选确定模式的代价。
示例2,根据P个点在第j个预测点候选确定模式下的属性预测值,确定P个点在第j个预测点候选确定模式下的属性重建值;根据P个点在第j个预测点候选确定模式下的属性重建值,以及P个点的已编码属性值,确定第j个预测点候选确定模式的代价。
根据上述方法,可以确定出N个预测点候选确定模式中每一个模式对应的代价,进而根据Q个预测点预测点候选确定模式的代价,确定预测点确定模式。
例如,将代价最小的一个预测点候选确定模式,确定为当前点对应的预测点确定模式。
再例如,若代价小于某一预设值,则将第一种预测点确定模式确定为当前点对应的预测点确定模式,否则将第二种预测点确定模式确定为当前点对应的预测点确定模式。
编码端根据上述方式确定出当前点对应的预测点确定模式后,执行上述S203-B的步骤,根据当前点对应的预测点确定模式,从所述K个参考点中确定M个预测点。
下面对S203-B的具体实现过程进行介绍。
上述S203-B中根据当前点对应的预测点确定模式的不同,具有不同的实现过程,示例性的包括但不限于如下几种情况:
情况1,若预测点确定模式为第一预测点确定模式,该第一预测点确定模式为将K个参考点确定为预测点。此时 将K个参考点,确定为M个预测点,此时M等于K。
情况2,若预测点确定模式为第二预测点确定模式,该第二预测点确定模式为将K个参考点中的一个参考点确定为预测点。此时从K个参考点中选择一个参考点,确定为预测点,此时M等于1。
其中,从K个参考点中选择一个参考点,确定为预测点的方式至少包括如下几种示例:
示例1,将K个参考点中距离当前点最近的一个参考点,确定为预测点。
示例2,将K个参考点中与当前点的属性信息最接近的第一参考点,确定为预测点。
在该实例2中,编码在点云码流中写入第一索引,该第一索引用于指示第一参考点,第一参考点为K个参考点中与当前点的属性信息最接近的一个参考点。
在一些实施例中,码流中可以包括指示信息,用于指示该预测点是通过示例1的方式确定,还是通过示例2的方式确定。
情况3,若预测点确定模式为第三预测点确定模式,该第三预测点为基于分类信息和距离信息来确定预测点。因此,编码端根据上述S203-A的步骤,若确定当前点对应的预测点确定模式为第三预测点确定模式时,则将K个参考点中与当前点的分类信息一致,且距离当前点最近的M个参考点,确定为M个预测点。
编码端根据上述方法,从K个参考点中,确定出M个预测点后,执行如下S203-B的步骤。
S203-B、根据M个预测点的属性信息,确定当前点的属性预测值。
在一些实施例中,若根据上述步骤,确定M=1,即预测点为1个时,则将该预测点的属性信息,确定为当前点的属性预测值。
在一些实施例中,若M大于1,即当前点包括多个预测点时,则上述S203-B包括如下步骤:
S203-B1、根据M个预测点的分类信息,确定预测值计算方式;
S203-B2、根据预测值计算方式,以及M个预测点的属性信息,确定当前点的属性预测值。
本申请实施例对预测值计算方式的具体方式不做限制。
在一些实施例中,上述预测值计算方式为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种。
在该实施例中,若当前点包括多个预测点时,在根据预测点确定当前点的属性预测值之前,首先确定当前点对应的预测值计算方式。
具体的,根据M个预测点的分类信息,确定预测值计算方式,也就是说,本申请实施例,针对不同的点云类别,设置不同的预测值计算方式,进一步提高了属性预测值的计算准确性。
上述S203-B1的实现方式,至少包括如下几种:
方式1,若M个预测点中与当前点的类别相同的预测点的个数大于或等于第二阈值,则确定预测值计算方式为第一种预测值计算方式;若M个预测点中与当前点的类别相同的预测点的个数小于第二阈值,则确定预测值计算方式为第二种预测值计算方式,其中,第一种预测值计算方式与第二种预测值计算方式均为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且第一种预测值计算方式与第二种预测值计算方式不同。
方式2,若M个预测点和当前点的类别均为第一类别时,则确定预测值计算方式为第三种预测值计算方式;若M个预测点和当前点的类别均为第二类别时,则确定预测值计算方式为第四种预测值计算方式,其中,第三种预测值计算方式与第四种预测值计算方式均为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且第三种预测值计算方式与第四种预测值计算方式不同。
编码端根据上述方式1或方式2,确定出当前点对应的预测值计算方式后,执行S203-B2,根据预测值计算方式,以及M个预测点的属性信息,确定当前点的属性预测值。
上述S203-B2中根据当前点对应的预测值计算方式的不同,具有不同的实现过程,示例性的包括但不限于如下几种情况:
情况1,若预测值计算方式为第一预测值计算方式,该第一预测值计算方式为一种加权方式。此时,编码端将M个预测点中各预测点与当前点之间距离的倒数,确定为M个预测点中各预测点的第一权重;根据M个预测点中各预测点的第一权重,对M个预测点的属性信息进行加权,得到当前点的属性预测值。
示例性的,编码端根据上述公式(3)确定当前点的属性预测值。
情况2,若预测值计算方式为第二预测值计算方式,该第二预测值计算方式为另一种加权方式。此时,编码端针对M个预测点中的各预测点,根据预测点和当前点的位置信息以及预设的坐标轴权重,确定预测点的第二权重;根据M个预测点中各预测点的第二权重,对M个预测点的属性信息进行加权,得到当前点的属性预测值。
上述第一预测值计算方式,以距离的倒数作为每个预测点的权重。该在欧几里得距离时,考虑到点云在xyz三个轴方向的分布是不均匀的,一些点云在xy平面空间分布跨度大,而在z方向空间分布跨度小。基于此,对不同的方向轴设置不同的权重。
在一种示例中,根据上述公式(4)确定预测点的第二权重。
根据上述公式(4)确定出M个预测点中每个预测点的第二权重,进而根据M个预测点中各预测点的第二权重,对M个预测点的属性信息进行加权,得到当前点的属性预测值。
在一种示例中,根据上述公式(5)确定当前点的属性预测值。
情况3,若预测值计算方式为第三预测值计算方式,该第三预测值计算方式为根据M个预测点,确定M+1个预测值,进而从M+1个预测值中确定当前点的属性预测值。此时,编码端首先确定M个预测点的属性加权平均值,并将属性加权平均值作为一个预测值;根据M个预测点的属性信息,确定M个预测值;根据确定的一个预测值和M个预测值,确定当前点的属性预测值。
在情况3中,编码端确定出M+1个属性预测值,具体是,由M个预测点的属性加权平均值确定的一个属性预测值,以及根据M个预测点的属性信息,确定的M个属性预测值,例如将M个预测点的属性信息,确定为M个属性预测值。接着,从这M+1个属性预测值,确定出当前点的属性预测值。例如,编码端编码点云码流,得到第二索引,该第二索引用于指示目标预测值,进而将M+1个预测值中,该第二索引对应的目标预测值,确定为当前点的属性预测值。
由上述可知,本申请实施例涉及的加权方式至少包括情况1和情况2所示的2种,因此,在该情况3中,确定确定M个预测点的属性加权平均值之前,首先需要确定目标加权平均方式,进而使用该目标加权平均方式,确定M个预测点的属性加权平均值。
本申请实施例对目标加权平均方式的具体方式不做限制。
在一些实施例中,目标加权平均方式为第一加权平均方式和第二加权平均方式中的任意一种方式。可选的,上述第一加权平均方式为上述情况1中的加权方式,第二加权平均方式为上述情况2中的加权方式。
在一些实施例中,上述目标加权平均方式为默认方式。
在一些实施例中,根据M个预测点的分类信息,确定目标加权平均方式。
例如,若M个预测点中与当前点的类别相同的预测点的个数大于或等于第二阈值,则确定目标加权平均方式为第一种加权平均方式;若M个预测点中与当前点的类别相同的预测点的个数小于第二阈值,则确定目标加权平均方式为第二种加权平均方式,其中,第一种加权平均方式与第二种加权平均方式均为第一加权平均方式和第二加权平均方式中的任意一种,且第一种加权平均方式与第二种加权平均方式不同。
再例如,若M个预测点和当前点的类别均为第一类别时,则确定目标加权平均方式为第三种加权平均方式;若M个预测点和当前点的类别均为第二类别时,则确定目标加权平均方式为第四种加权平均方式,其中第三种加权平均方式与第四种加权平均方式均为第一加权平均方式和第二加权平均方式中的任意一种,且第三种加权平均方式与第四种加权平均方式不同。
在一些实施例中,若目标加权计算方式为第一加权平均方式,则将M个预测点中各预测点与当前点之间距离的倒数,确定为M个预测点中各预测点的第一权重;根据M个预测点中各预测点的第一权重,对M个预测点的属性信息进行加权,得到M个预测点的属性加权平均值。具体的,可以参照上述公式(3)的描述。
在一些实施例中,若目标加权计算方式为第二加权平均方式,则针对M个预测点中的各预测点,根据预测点和当前点的位置信息以及预设的坐标轴权重,确定预测点的第二权重;根据M个预测点中各预测点的第二权重,对M个预测点的属性信息进行加权,得到M个预测点的属性加权平均值。具体的,可以参照上述公式(4)和公式(5)的描述。
编码端根据上述S203的描述,确定出当前点的属性预测值,接着,执行如下S204的步骤。
S204、根据当前点的属性预测值,确定当前点的属性残差值。
示例性的,根据当前点的属性信息和属性预测值,确定当前点的属性残差值,例如,将当前点的属性信息和属性预测值的差值,确定当前点的属性残差值。
在一些实施例中,对当前点的属性残差值进行量化,得到量化系数,对量化系数进行编码,得到点云属性码流。
本申请实施例提供的点云编码方法,通过确定点云中当前点和已编码点的分类信息,和/或已编码点与当前点之间的距离信息,分类信息用于指示点所属的类别;根据分类信息和距离信息中的至少一个,从已编码点中确定当前点的K个参考点,K为正整数;根据K个参考点的属性信息,确定当前点的属性预测值;根据当前点的属性预测值,确定当前点的属性重建值。即本申请实施例,不仅考虑了距离信息,还考虑了分类信息,进而提高了参考点的确定准确性,基于该准确确定的参考点进行属性预测时,可以提高属性预测的准确性,从而提升属性编码效率。
应理解,图4至图6仅为本申请的示例,不应理解为对本申请的限制。
以上结合附图详细描述了本申请的优选实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。
还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。另外,本申请实施例中,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。具体地,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
上文结合图4至图6,详细描述了本申请的方法实施例,下文结合图7至图10,详细描述本申请的装置实施例。
图7是本申请实施例提供的点云解码装置的示意性框图。
如图7所示,该点点云解码装置10可包括:
信息确定单元11,用于确定点云中当前点和已解码点的分类信息,和/或所述已解码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
参考点确定单元12,用于根据所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,所述K为正整数;
预测值确定单元13,用于根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
重建单元14,用于根据所述当前点的属性预测值,确定所述当前点的属性重建值。
在一些实施例中,参考点确定单元12,具体用于确定所述当前点对应的参考点确定模式;根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点。
在一些实施例中,所述参考点确定模式为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。
在一些实施例中,参考点确定单元12,具体用于根据所述当前点的分类信息,确定所述当前点对应的参考点确定模式。
在一些实施例中,参考点确定单元12,具体用于若所述当前点的类别为第一类别,则确定所述参考点确定模式为第一种参考点确定模式;若所述当前点的类别为第二类别,则确定所述参考点确定模式为第二种参考点确定模式,所述第二种参考点确定模式与所述第一种参考点确定模式均为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个,且所述第二种参考点确定模式与所述第一种参考点确定模式不同。
在一些实施例中,参考点确定单元12,具体用于解码点云码流,得到第一标识,所述第一标识用于指示所述当前点对应的参考点确定模式;根据所述第一标识,确定所述参考点确定模式。
在一些实施例中,所述参考点确定模式为默认模式。
在一些实施例中,参考点确定单元12,具体用于获取N个参考点候选确定模式,所述N个参考点候选确定模式为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意N个模式,所述N为大于1的正整数;从所述N个参考点候选确定模式中,确定一参考点候选确定模式作为所述参考点确定模式。
在一些实施例中,参考点确定单元12,具体用于确定所述N个参考点候选确定模式的代价;将所述N个参考点候选确定模式中代价最小的参考点候选确定模式,确定为所述参考点确定模式。
在一些实施例中,参考点确定单元12,具体用于按照解码顺序,从所述已解码点中选择距离所述当前点最近的P个点,所述P为正整数;针对所述N个参考点候选确定模式中的第j个参考点候选确定模式,使用所述第j个参考点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个参考点候选确定模式下的属性预测值,所述j为正整数;根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述第j个参考点候选模式的代价。
在一些实施例中,参考点确定单元12,具体用于根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述P个点在所述第j个参考点候选确定模式下的属性重建值;根据所述P个点在所述第j个参考点候选确定模式下的属性重建值,以及所述P个点的已解码属性值,确定所述第j个参考点候选确定模式的代价。
在一些实施例中,若所述参考点确定模式为所述第一参考点确定模式,则参考点确定单元12,具体用于按照解码顺序,将所述已解码点中距离所述当前点最近的K个已解码点,确定为所述K个参考点。
在一些实施例中,若所述参考点确定模式为所述第二参考点确定模式,则参考点确定单元12,具体用于按照解码顺序,从所述已解码点中选出分类信息与所述当前点的分类信息一致的K个已解码点,作为所述K个参考点。
在一些实施例中,若所述参考点确定模式为所述第三参考点确定模式,则参考点确定单元12,具体用于根据所述分类信息和距离信息中的至少一个,确定所述已解码点的权重;根据所述权重,确定所述已解码点的得分;根据所述得分,从所述已解码点中确定所述K个参考点。
在一些实施例中,参考点确定单元12,具体用于针对所述已解码点中的第i个点,根据所述第i个点的分类信息,确定所述第i个点的权重,所述i为正整数。
在一些实施例中,参考点确定单元12,具体用于根据所述第i个点的分类信息和所述当前点的分类信息,确定所述第i个点的权重。
在一些实施例中,参考点确定单元12,具体用于若所述第i个点的分类信息与所述当前点的分类信息一致,则确定所述第i个点的权重为第一权重;若所述第i个点的分类信息与所述当前点的分类信息不一致,则确定所述第i个点的权重为第二权重。
在一些实施例中,参考点确定单元12,具体用于根据所述第i个点与所述当前点之间的距离信息,以及所述第i个点的权重,确定所述第i个点的得分。
在一些实施例中,参考点确定单元12,具体用于将所述第i个点与所述当前点之间的距离信息、与所述第i个点的权重的乘积,确定为所述第i个点的得分。
在一些实施例中,若所述第二权重大于所述第一权重,则参考点确定单元12,具体用于将所述已解码点中得分最小的K个点,确定为所述K个参考点。
在一些实施例中,预测值确定单元13,具体用于从所述K个参考点中确定M个预测点,所述M为小于或等于K的正整数;根据所述M个预测点的属性信息,确定所述当前点的属性预测值。
在一些实施例中,预测值确定单元13,具体用于确定所述当前点对应的预测点确定模式;根据所述预测点确定模式,从所述K个参考点中确定M个预测点。
在一些实施例中,所述预测点确定模式为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个。
在一些实施例中,预测值确定单元13,具体用于根据所述当前点的分类信息,确定所述预测点确定模式。
在一些实施例中,预测值确定单元13,具体用于若所述当前点的类别为第一类别,则确定所述预测点确定模式为第一种预测点确定模式;若所述当前点的类别为第二类别,则确定所述预测点确定模式为第二种预测点确定模式,所述第二种预测点确定模式与所述第一种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第二种预测点确定模式与所述第一种预测点确定模式不同。
在一些实施例中,预测值确定单元13,具体用于根据所述K个参考点的分类信息,确定所述预测点确定模式。
在一些实施例中,预测值确定单元13,具体用于若所述K个参考点中与所述当前点属于同一类别的参考点的数量大于或等于第一阈值,则确定所述预测点确定模式为第三种预测点确定模式;若所述K个参考点中与所述当前点属于 同一类别的参考点的数量小于第一阈值,则确定所述预测点确定模式为第四种预测点确定模式,所述第四种预测点确定模式与所述第三种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第四种预测点确定模式与所述第三种预测点确定模式不同。
在一些实施例中,预测值确定单元13,具体用于解码点云码流,得到第二标识,所述第二标识用于指示所述当前点对应的预测点确定模式;根据所述第二标识,确定所述预测点确定模式。
在一些实施例中,所述预测点确定模式为默认模式。
在一些实施例中,预测值确定单元13,具体用于获取Q个预测点候选确定模式,所述Q个预测点候选确定模式为所述第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意Q个模式,所述Q为大于1的正整数;从所述Q个预测点候选确定模式中,确定一预测点候选确定模式作为所述预测点确定模式。
在一些实施例中,预测值确定单元13,具体用于确定所述Q个预测点候选确定模式的代价;根据所述Q个预测点预测点候选确定模式的代价,确定所述预测点确定模式。
在一些实施例中,预测值确定单元13,具体用于按照解码顺序,从所述已解码点中选择距离所述当前点最近的P个点,所述P为正整数;针对所述Q个预测点候选确定模式中的第j个预测点候选确定模式,使用所述第j个预测点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个预测点候选确定模式下的属性预测值,所述j为正整数;根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述第j个预测点候选模式的代价。
在一些实施例中,预测值确定单元13,具体用于根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述P个点在所述第j个预测点候选确定模式下的属性重建值;根据所述P个点在所述第j个预测点候选确定模式下的属性重建值,以及所述P个点的已解码属性值,确定所述第j个预测点候选确定模式的代价。
在一些实施例中,若所述预测点确定模式为所述第一预测点确定模式,则预测值确定单元13,具体用于将所述K个参考点,确定为所述M个预测点,其中M等于K。
在一些实施例中,若所述预测点确定模式为所述第二预测点确定模式,则预测值确定单元13,具体用于从所述K个参考点中选择一个参考点,确定为预测点,其中M等于1。
在一些实施例中,预测值确定单元13,具体用于将所述K个参考点中距离所述当前点最近的一个参考点,确定为所述预测点。
在一些实施例中,预测值确定单元13,具体用于解码点云码流,得到所述当前点对应的第一索引,所述第一索引用于指示第一参考点,所述第一参考点为所述K个参考点中与所述当前点的属性信息最接近的一个参考点;将所述K个参考点中所述第一索引对应的第一参考点,确定为所述预测点。
在一些实施例中,若所述预测点确定模式为所述第三预测点确定模式,则预测值确定单元13,具体用于将所述K个参考点中与所述当前点的分类信息一致,且距离所述当前点最近的M个参考点,确定为所述M个预测点。
在一些实施例中,若所述M大于1时,所述预测值确定单元13,具体用于根据所述M个预测点的分类信息,确定预测值计算方式;根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值。
在一些实施例中,所述预测值计算方式为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种。
在一些实施例中,预测值确定单元13,具体用于若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述预测值计算方式为第一种预测值计算方式;若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述预测值计算方式为第二种预测值计算方式,所述第一种预测值计算方式与所述第二种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第一种预测值计算方式与所述第二种预测值计算方式不同。
在一些实施例中,预测值确定单元13,具体用于若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述预测值计算方式为第三种预测值计算方式;若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述预测值计算方式为第四种预测值计算方式,所述第三种预测值计算方式与所述第四种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第三种预测值计算方式与所述第四种预测值计算方式不同。
在一些实施例中,若所述预测值计算方式为所述第一预测值计算方式,则预测值确定单元13,具体用于将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
在一些实施例中,若所述预测值计算方式为所述第二预测值计算方式,则预测值确定单元13,具体用于针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
在一些实施例中,若所述预测值计算方式为所述第三预测值计算方式,则预测值确定单元13,具体用于确定所述M个预测点的属性加权平均值,并将所述属性加权平均值作为一个预测值;根据所述M个预测点的属性信息,确定M个预测值;根据所述一个预测值和所述M个预测值,确定所述当前点的属性预测值。
在一些实施例中,预测值确定单元13,具体用于根据所述M个预测点的分类信息,确定目标加权平均方式;使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值。
在一些实施例中,所述目标加权平均方式为第一加权平均方式和第二加权平均方式中的任意一种方式。
在一些实施例中,预测值确定单元13,具体用于若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述目标加权平均方式为第一种加权平均方式;若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述目标加权平均方式为第二种加权平均方式,所述第一种加权平 均方式与所述第二种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第一种加权平均方式与所述第二种加权平均方式不同。
在一些实施例中,预测值确定单元13,具体用于若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述目标加权平均方式为第三种加权平均方式;若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述目标加权平均方式为第四种加权平均方式,所述第三种加权平均方式与所述第四种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第三种加权平均方式与所述第四种加权平均方式不同。
在一些实施例中,若所述目标加权计算方式为所述第一加权平均方式,则预测值确定单元13,具体用于将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
在一些实施例中,若所述目标加权计算方式为所述第二加权平均方式,则预测值确定单元13,具体用于针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
在一些实施例中,预测值确定单元13,具体用于解码点云码流,得到第二索引,所述第二索引用于指示目标预测值;将所述一个预测值和所述M个预测值中,所述第二索引对应的目标预测值,确定为所述当前点的属性预测值。
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图7所示的点云解码装置10可以对应于执行本申请实施例的点云解码方法中的相应主体,并且点云解码装置10中的各个单元的前述和其它操作和/或功能分别为了实现点云解码方法中的相应流程,为了简洁,在此不再赘述。
图8是本申请实施例提供的点云编码装置的示意性框图。
如图8所示,点云编码装置20包括:
信息确定单元21,用于确定点云中当前点和已编码点的分类信息,和/或所述已编码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
参考点确定单元22,用于根据所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,所述K为正整数;
预测值确定单元23,用于根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
编码单元24,用于根据所述当前点的属性预测值,确定所述当前点的属性残差值。
在一些实施例中,参考点确定单元22,具体用于确定所述当前点对应的参考点确定模式;根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点。
在一些实施例中,所述参考点确定模式为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。
在一些实施例中,参考点确定单元22,具体用于根据所述当前点的分类信息,确定所述当前点对应的参考点确定模式。
在一些实施例中,参考点确定单元22,具体用于若所述当前点的类别为第一类别,则确定所述参考点确定模式为第一种参考点确定模式;若所述当前点的类别为第二类别,则确定所述参考点确定模式为第二种参考点确定模式,所述第二种参考点确定模式与所述第一种参考点确定模式均为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个,且所述第二种参考点确定模式与所述第一种参考点确定模式不同。
在一些实施例中,所述参考点确定模式为默认模式。
在一些实施例中,参考点确定单元22,具体用于获取N个参考点候选确定模式,所述N个参考点候选确定模式为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意N个模式,所述N为正整数;从所述N个参考点候选确定模式中,确定一参考点候选确定模式作为所述参考点确定模式。
在一些实施例中,参考点确定单元22,具体用于确定所述N个参考点候选确定模式的代价;将所述N个参考点候选确定模式中代价最小的参考点候选确定模式,确定为所述参考点确定模式。
在一些实施例中,参考点确定单元22,具体用于按照编码顺序,从所述已编码点中选择距离所述当前点最近的P个点,所述P为正整数;针对所述N个参考点候选确定模式中的第j个参考点候选确定模式,使用所述第j个参考点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个参考点候选确定模式下的属性预测值,所述j为正整数;根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述第j个参考点候选模式的代价。
在一些实施例中,参考点确定单元22,具体用于根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述P个点在所述第j个参考点候选确定模式下的属性重建值;根据所述P个点在所述第j个参考点候选确定模式下的属性重建值,以及所述P个点的已编码属性值,确定所述第j个参考点候选确定模式的代价。
在一些实施例中,编码单元24,还用于在点云码流中写入第一标识,所述第一标识用于指示所述当前点对应的参考点确定模式。
在一些实施例中,若所述参考点确定模式为所述第一参考点确定模式,则参考点确定单元22,具体用于按照编码顺序,在所述已编码点中选出距离所述当前点最近的K个已编码点,作为所述K个参考点。
在一些实施例中,若所述参考点确定模式为所述第二参考点确定模式,则参考点确定单元22,具体用于按照编码顺序,从所述已编码点中选出分类信息与所述当前点的分类信息一致的K个已编码点,作为所述K个参考点。
在一些实施例中,若所述参考点确定模式为所述第三参考点确定模式,则参考点确定单元22,具体用于根据所述分类信息和距离信息中的至少一个,确定所述已编码点的权重;根据所述权重,确定所述已编码点的得分;根据所述得分,从所述已编码点中确定所述K个参考点。
在一些实施例中,参考点确定单元22,具体用于针对所述已编码点中的第i个点,根据所述第i个点的分类信息,确定所述第i个点的权重,所述i为正整数。
在一些实施例中,参考点确定单元22,具体用于根据所述第i个点的分类信息和所述当前点的分类信息,确定所述第i个点的权重。
在一些实施例中,参考点确定单元22,具体用于若所述第i个点的分类信息与所述当前点的分类信息一致,则确定所述第i个点的权重为第一权重;若所述第i个点的分类信息与所述当前点的分类信息不一致,则确定所述第i个点的权重为第二权重。
在一些实施例中,参考点确定单元22,具体用于根据所述第i个点与所述当前点之间的距离信息,以及所述第i个点的权重,确定所述第i个点的得分。
在一些实施例中,参考点确定单元22,具体用于将所述第i个点与所述当前点之间的距离信息、与所述第i个点的权重的乘积,确定为所述第i个点的得分。
在一些实施例中,若所述第二权重大于所述第一权重,则参考点确定单元22,具体用于将所述已编码点中得分最小的K个点,确定为所述K个参考点。
在一些实施例中,预测值确定单元23,具体用于从所述K个参考点中确定M个预测点,所述M为小于或等于K的正整数;根据所述M个预测点的属性信息,确定所述当前点的属性预测值。
在一些实施例中,预测值确定单元23,具体用于确定所述当前点对应的预测点确定模式;根据所述预测点确定模式,从所述K个参考点中确定M个预测点。
在一些实施例中,所述预测点确定模式为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个。
在一些实施例中,预测值确定单元23,具体用于根据所述当前点的分类信息,确定所述预测点确定模式。
在一些实施例中,预测值确定单元23,具体用于若所述当前点的类别为第一类别,则确定所述预测点确定模式为第一种预测点确定模式;若所述当前点的类别为第二类别,则确定所述预测点确定模式为第二种预测点确定模式,所述第二种预测点确定模式与所述第一种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第二种预测点确定模式与所述第一种预测点确定模式不同。
在一些实施例中,预测值确定单元23,具体用于根据所述K个参考点的分类信息,确定所述预测点确定模式。
在一些实施例中,预测值确定单元23,具体用于若所述K个参考点中与所述当前点属于同一类别的参考点的数量大于或等于第一阈值,则确定所述预测点确定模式为第三种预测点确定模式;若所述K个参考点中与所述当前点属于同一类别的参考点的数量小于第一阈值,则确定所述预测点确定模式为第四种预测点确定模式,所述第四种预测点确定模式与所述第三种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第四种预测点确定模式与所述第三种预测点确定模式不同。
在一些实施例中,所述预测点确定模式为默认模式。
在一些实施例中,预测值确定单元23,具体用于获取Q个预测点候选确定模式,所述N为正整数;从所述Q个预测点候选确定模式中,确定一预测点候选确定模式作为所述预测点确定模式。
在一些实施例中,预测值确定单元23,具体用于确定所述Q个预测点候选确定模式的代价;将所述Q个预测点预测点候选确定模式中代价最小的预测点预测点候选确定模式,确定为所述预测点确定模式。
在一些实施例中,预测值确定单元23,具体用于按照编码顺序,从所述已编码点中选择距离所述当前点最近的P个点,所述P为正整数;针对所述Q个预测点候选确定模式中的第j个预测点候选确定模式,使用所述第j个预测点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个预测点候选确定模式下的属性预测值,所述j为正整数;根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述第j个预测点候选模式的代价。
在一些实施例中,预测值确定单元23,具体用于根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述P个点在所述第j个预测点候选确定模式下的属性重建值;根据所述P个点在所述第j个预测点候选确定模式下的属性重建值,以及所述P个点的已编码属性值,确定所述第j个预测点候选确定模式的代价。
在一些实施例中,编码单元24,还用于在点云码流中写入第二标识,所述第二标识用于指示所述当前点对应的预测点确定模式。
在一些实施例中,若所述预测点确定模式为所述第一预测点确定模式,则预测值确定单元23,具体用于将所述K个参考点,确定为所述M个预测点,其中M等于K。
在一些实施例中,若所述预测点确定模式为所述第二预测点确定模式,则预测值确定单元23,具体用于从所述K个参考点中选择一个参考点,确定为预测点,其中M等于1。
在一些实施例中,预测值确定单元23,具体用于将所述K个参考点中距离所述当前点最近的一个参考点,确定为所述预测点。
在一些实施例中,预测值确定单元23,具体用于将所述K个参考点中与所述当前点的属性信息最接近的第一参考点,确定为所述预测点。
在一些实施例中,编码单元24,还用于在点云码流中写入第一索引,所述第一索引用于指示所述第一参考点。
在一些实施例中,若所述预测点确定模式为所述第三预测点确定模式,则预测值确定单元23,具体用于将所述K个参考点中与所述当前点的分类信息一致,且距离所述当前点最近的M个参考点,确定为所述M个预测点。
在一些实施例中,若所述M大于1时,预测值确定单元23,具体用于根据所述M个预测点的分类信息,确定预测值计算方式;根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值。
在一些实施例中,所述预测值计算方式为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种。
在一些实施例中,预测值确定单元23,具体用于若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述预测值计算方式为第一种预测值计算方式;若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述预测值计算方式为第二种预测值计算方式,所述第一种预测值计算方式与所述第二种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第一种预测值计算方式与所述第二种预测值计算方式不同。
在一些实施例,预测值确定单元23,具体用于若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述预测值计算方式为第三种预测值计算方式;若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述预测值计算方式为第四种预测值计算方式,所述第三种预测值计算方式与所述第四种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第三种预测值计算方式与所述第四种预测值计算方式不同。
在一些实施例中,若所述预测值计算方式为所述第一预测值计算方式,则预测值确定单元23,具体用于将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
在一些实施例中,若所述预测值计算方式为所述第二预测值计算方式,则预测值确定单元23,具体用于针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
在一些实施例中,若所述预测值计算方式为所述第三预测值计算方式,则预测值确定单元23,具体用于确定所述M个预测点的属性加权平均值,并将所述属性加权平均值作为一个预测值;根据所述M个预测点的属性信息,确定M个预测值;根据所述一个预测值和所述M个预测值,确定所述当前点的属性预测值。
在一些实施例中,预测值确定单元23,具体用于根据所述M个预测点的分类信息,确定目标加权平均方式;使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值。
在一些实施例中,所述目标加权平均方式为第一加权平均方式和第二加权平均方式中的任意一种方式。
在一些实施例中,预测值确定单元23,具体用于若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述目标加权平均方式为第一种加权平均方式;若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述目标加权平均方式为第二种加权平均方式,所述第一种加权平均方式与所述第二种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第一种加权平均方式与所述第二种加权平均方式不同。
在一些实施例中,预测值确定单元23,具体用于若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述目标加权平均方式为第三种加权平均方式;若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述目标加权平均方式为第四种加权平均方式,所述第三种加权平均方式与所述第四种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第三种加权平均方式与所述第四种加权平均方式不同。
在一些实施例中,若所述目标加权计算方式为所述第一加权平均方式,则预测值确定单元23,具体用于将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
在一些实施例中,若所述目标加权计算方式为所述第二加权平均方式,则预测值确定单元23,具体用于针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
在一些实施例中,预测值确定单元23,具体用于将所述一个预测值和所述M个预测值中的目标预测值,确定为所述当前点的属性预测值。
在一些实施例中,编码确定单元24,还用于在点云码流中写入第二索引,所述第二索引用于指示所述目标预测值。
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图8所示的点云编码装置20可以对应于执行本申请实施例的点云编码方法中的相应主体,并且点点云编码装置20中的各个单元的前述和其它操作和/或功能分别为了实现点云编码方法中的相应流程,为了简洁,在此不再赘述。
上文中结合附图从功能单元的角度描述了本申请实施例的装置和系统。应理解,该功能单元可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件单元组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件单元组合执行完成。可选地,软件单元可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。
图9是本申请实施例提供的电子设备的示意性框图。
如图9所示,该电子设备30可以为本申请实施例所述的点云解码设备,或者点云编码设备,该电子设备30可包括:
存储器33和处理器32,该存储器33用于存储计算机程序34,并将该程序代码34传输给该处理器32。换言之,该处理器32可以从存储器33中调用并运行计算机程序34,以实现本申请实施例中的方法。
例如,该处理器32可用于根据该计算机程序34中的指令执行上述方法200中的步骤。
在本申请的一些实施例中,该处理器32可以包括但不限于:
通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit, ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。
在本申请的一些实施例中,该存储器33包括但不限于:
易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
在本申请的一些实施例中,该计算机程序34可以被分割成一个或多个单元,该一个或者多个单元被存储在该存储器33中,并由该处理器32执行,以完成本申请提供的方法。该一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述该计算机程序34在该电子设备30中的执行过程。
如图9所示,该电子设备30还可包括:
收发器33,该收发器33可连接至该处理器32或存储器33。
其中,处理器32可以控制该收发器33与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。收发器33可以包括发射机和接收机。收发器33还可以进一步包括天线,天线的数量可以为一个或多个。
应当理解,该电子设备30中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。
图10是本申请实施例提供的点云编解码系统的示意性框图。
如图10所示,该点云编解码系统40可包括:点云编码器41和点云解码器42,其中点云编码器41用于执行本申请实施例涉及的点云编码方法,点云解码器42用于执行本申请实施例涉及的点云解码方法。
本申请还提供了一种码流,该码流是根据上述编码方法生成的。
本申请还提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机能够执行上述方法实施例的方法。或者说,本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得计算机执行上述方法实施例的方法。
当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字点云光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。例如,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。

Claims (110)

  1. 一种点云解码方法,其特征在于,包括:
    确定点云中当前点和已解码点的分类信息,和/或所述已解码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
    根据所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,所述K为正整数;
    根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
    根据所述当前点的属性预测值,确定所述当前点的属性重建值。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,包括:
    确定所述当前点对应的参考点确定模式;
    根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点。
  3. 根据权利要求2所述的方法,其特征在于,所述参考点确定模式为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。
  4. 根据权利要求3所述的方法,其特征在于,所述确定所述当前点对应的参考点确定模式,包括:
    根据所述当前点的分类信息,确定所述当前点对应的参考点确定模式。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述当前点的分类信息,确定所述当前点对应的参考点确定模式,包括:
    若所述当前点的类别为第一类别,则确定所述参考点确定模式为第一种参考点确定模式;
    若所述当前点的类别为第二类别,则确定所述参考点确定模式为第二种参考点确定模式,所述第二种参考点确定模式与所述第一种参考点确定模式均为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个,且所述第二种参考点确定模式与所述第一种参考点确定模式不同。
  6. 根据权利要求3所述的方法,其特征在于,所述确定所述当前点对应的参考点确定模式,包括:
    解码点云码流,得到第一标识,所述第一标识用于指示所述当前点对应的参考点确定模式;
    根据所述第一标识,确定所述参考点确定模式。
  7. 根据权利要求3所述的方法,其特征在于,所述参考点确定模式为默认模式。
  8. 根据权利要求3所述的方法,其特征在于,所述确定所述当前点对应的参考点确定模式,包括:
    获取N个参考点候选确定模式,所述N个参考点候选确定模式为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意N个模式,所述N为大于1的正整数;
    从所述N个参考点候选确定模式中,确定一参考点候选确定模式作为所述参考点确定模式。
  9. 根据权利要求8所述的方法,其特征在于,所述从所述N个参考点候选确定模式中,确定一参考点候选确定模式作为所述参考点确定模式,包括:
    确定所述N个参考点候选确定模式的代价;
    将所述N个参考点候选确定模式中代价最小的参考点候选确定模式,确定为所述参考点确定模式。
  10. 根据权利要求9所述的方法,其特征在于,所述确定所述N个参考点候选模式的代价,包括:
    按照解码顺序,从所述已解码点中选择距离所述当前点最近的P个点,所述P为正整数;
    针对所述N个参考点候选确定模式中的第j个参考点候选确定模式,使用所述第j个参考点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个参考点候选确定模式下的属性预测值,所述j为正整数;
    根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述第j个参考点候选模式的代价。
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述第j个参考点候选模式的代价,包括:
    根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述P个点在所述第j个参考点候选确定模式下的属性重建值;
    根据所述P个点在所述第j个参考点候选确定模式下的属性重建值,以及所述P个点的已解码属性值,确定所述第j个参考点候选确定模式的代价。
  12. 根据权利要求3-11任一项所述的方法,其特征在于,若所述参考点确定模式为所述第一参考点确定模式,则所述根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,包括:
    按照解码顺序,将所述已解码点中距离所述当前点最近的K个已解码点,确定为所述K个参考点。
  13. 根据权利要求11所述的方法,其特征在于,若所述参考点确定模式为所述第二参考点确定模式,则所述根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,包括:
    按照解码顺序,从所述已解码点中选出分类信息与所述当前点的分类信息一致的K个已解码点,作为所述K个参考点。
  14. 根据权利要求11所述的方法,其特征在于,若所述参考点确定模式为所述第三参考点确定模式,则所述根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,包括:
    根据所述分类信息和距离信息中的至少一个,确定所述已解码点的权重;
    根据所述权重,确定所述已解码点的得分;
    根据所述得分,从所述已解码点中确定所述K个参考点。
  15. 根据权利要求14所述的方法,其特征在于,所述根据所述分类信息和距离信息中的至少一个,确定所述已解码点的权重,包括:
    针对所述已解码点中的第i个点,根据所述第i个点的分类信息,确定所述第i个点的权重,所述i为正整数。
  16. 根据权利要求15所述的方法,其特征在于,所述根据所述第i个点的分类信息,确定所述第i个点的权重,包括:
    根据所述第i个点的分类信息和所述当前点的分类信息,确定所述第i个点的权重。
  17. 根据权利要求16所述的方法,其特征在于,所述根据所述第i个点的分类信息和所述当前点的分类信息,确定所述第i个点的权重,包括:
    若所述第i个点的分类信息与所述当前点的分类信息一致,则确定所述第i个点的权重为第一权重;
    若所述第i个点的分类信息与所述当前点的分类信息不一致,则确定所述第i个点的权重为第二权重。
  18. 根据权利要求17所述的方法,其特征在于,所述根据所述权重,确定所述已解码点的得分,包括:
    根据所述第i个点与所述当前点之间的距离信息,以及所述第i个点的权重,确定所述第i个点的得分。
  19. 根据权利要求18所述的方法,其特征在于,所述根据所述第i个点与所述当前点之间的距离信息,以及所述第i个点的权重,确定所述第i个点的得分,包括:
    将所述第i个点与所述当前点之间的距离信息、与所述第i个点的权重的乘积,确定为所述第i个点的得分。
  20. 根据权利要求19所述的方法,其特征在于,若所述第二权重大于所述第一权重,则所述根据所述得分,从所述已解码点中确定所述K个参考点,包括:
    将所述已解码点中得分最小的K个点,确定为所述K个参考点。
  21. 根据权利要求1-11任一项所述的方法,其特征在于,所述根据所述K个参考点的属性信息,确定所述当前点的属性预测值,包括:
    从所述K个参考点中确定M个预测点,所述M为小于或等于K的正整数;
    根据所述M个预测点的属性信息,确定所述当前点的属性预测值。
  22. 根据权利要求21所述的方法,其特征在于,所述从所述K个参考点中确定M个预测点,包括:
    确定所述当前点对应的预测点确定模式;
    根据所述预测点确定模式,从所述K个参考点中确定M个预测点。
  23. 根据权利要求22所述的方法,其特征在于,所述预测点确定模式为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个。
  24. 根据权利要求23所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    根据所述当前点的分类信息,确定所述预测点确定模式。
  25. 根据权利要求24所述的方法,其特征在于,所述根据所述当前点的分类信息,确定所述预测点确定模式,包括:
    若所述当前点的类别为第一类别,则确定所述预测点确定模式为第一种预测点确定模式;
    若所述当前点的类别为第二类别,则确定所述预测点确定模式为第二种预测点确定模式,所述第二种预测点确定模式与所述第一种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第二种预测点确定模式与所述第一种预测点确定模式不同。
  26. 根据权利要求23所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    根据所述K个参考点的分类信息,确定所述预测点确定模式。
  27. 根据权利要求26所述的方法,其特征在于,所述根据所述K个参考点的分类信息,确定所述预测点确定模式,包括:
    若所述K个参考点中与所述当前点属于同一类别的参考点的数量大于或等于第一阈值,则确定所述预测点确定模式为第三种预测点确定模式;
    若所述K个参考点中与所述当前点属于同一类别的参考点的数量小于第一阈值,则确定所述预测点确定模式为第四种预测点确定模式,所述第四种预测点确定模式与所述第三种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第四种预测点确定模式与所述第三种预测点确定模式不同。
  28. 根据权利要求23所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    解码点云码流,得到第二标识,所述第二标识用于指示所述当前点对应的预测点确定模式;
    根据所述第二标识,确定所述预测点确定模式。
  29. 根据权利要求23所述的方法,其特征在于,所述预测点确定模式为默认模式。
  30. 根据权利要求23所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    获取Q个预测点候选确定模式,所述Q个预测点候选确定模式为所述第一预测点确定模式、第二预测点确定模式和第三预测点确定模式中的任意Q个模式,所述Q为大于1的正整数;
    从所述Q个预测点候选确定模式中,确定一预测点候选确定模式作为所述预测点确定模式。
  31. 根据权利要求30所述的方法,其特征在于,所述从所述Q个预测点候选确定模式中,确定一预测点候选确定模式作为所述预测点确定模式,包括:
    确定所述Q个预测点候选确定模式的代价;
    根据所述Q个预测点预测点候选确定模式的代价,确定所述预测点确定模式。
  32. 根据权利要求31所述的方法,其特征在于,所述确定所述Q个预测点候选确定模式的代价,包括:
    按照解码顺序,从所述已解码点中选择距离所述当前点最近的P个点,所述P为正整数;
    针对所述Q个预测点候选确定模式中的第j个预测点候选确定模式,使用所述第j个预测点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个预测点候选确定模式下的属性预测值,所述j为正整数;
    根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述第j个预测点候选模式的代价。
  33. 根据权利要求32所述的方法,其特征在于,所述根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述第j个预测点候选模式的代价,包括:
    根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述P个点在所述第j个预测点候选确定模式下的属性重建值;
    根据所述P个点在所述第j个预测点候选确定模式下的属性重建值,以及所述P个点的已解码属性值,确定所述第j个预测点候选确定模式的代价。
  34. 根据权利要求23-33任一项所述的方法,其特征在于,若所述预测点确定模式为所述第一预测点确定模式,则所述根据所述预测点确定模式,从所述K个参考点中确定M个预测点,包括:
    将所述K个参考点,确定为所述M个预测点,其中M等于K。
  35. 根据权利要求33所述的方法,其特征在于,若所述预测点确定模式为所述第二预测点确定模式,则所述根据所述预测点确定模式,从所述K个参考点中确定M个预测点,包括:
    从所述K个参考点中选择一个参考点,确定为预测点,其中M等于1。
  36. 根据权利要求35所述的方法,其特征在于,所述从所述K个参考点中选择一个参考点,确定为预测点,包括:
    将所述K个参考点中距离所述当前点最近的一个参考点,确定为所述预测点。
  37. 根据权利要求35所述的方法,其特征在于,所述从所述K个参考点中选择一个参考点,确定为预测点,包括:
    解码点云码流,得到所述当前点对应的第一索引,所述第一索引用于指示第一参考点,所述第一参考点为所述K个参考点中与所述当前点的属性信息最接近的一个参考点;
    将所述K个参考点中所述第一索引对应的第一参考点,确定为所述预测点。
  38. 根据权利要求33所述的方法,其特征在于,若所述预测点确定模式为所述第三预测点确定模式,则所述根据所述预测点确定模式,从所述K个参考点中确定M个预测点,包括:
    将所述K个参考点中与所述当前点的分类信息一致,且距离所述当前点最近的M个参考点,确定为所述M个预测点。
  39. 根据权利要求21所述的方法,其特征在于,若所述M大于1时,所述根据所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    根据所述M个预测点的分类信息,确定预测值计算方式;
    根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值。
  40. 根据权利要求39所述的方法,其特征在于,所述预测值计算方式为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种。
  41. 根据权利要求40所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定预测值计算方式,包括:
    若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述预测值计算方式为第一种预测值计算方式;
    若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述预测值计算方式为第二种预测值计算方式,所述第一种预测值计算方式与所述第二种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第一种预测值计算方式与所述第二种预测值计算方式不同。
  42. 根据权利要求40所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定预测值计算方式,包括:
    若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述预测值计算方式为第三种预测值计算方式;
    若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述预测值计算方式为第四种预测值计算方式,所述第三种预测值计算方式与所述第四种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第三种预测值计算方式与所述第四种预测值计算方式不同。
  43. 根据权利要求40所述的方法,其特征在于,若所述预测值计算方式为所述第一预测值计算方式,则所述根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;
    根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
  44. 根据权利要求40所述的方法,其特征在于,若所述预测值计算方式为所述第二预测值计算方式,则所述根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;
    根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性 预测值。
  45. 根据权利要求40所述的方法,其特征在于,若所述预测值计算方式为所述第三预测值计算方式,则所述根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    确定所述M个预测点的属性加权平均值,并将所述属性加权平均值作为一个预测值;
    根据所述M个预测点的属性信息,确定M个预测值;
    根据所述一个预测值和所述M个预测值,确定所述当前点的属性预测值。
  46. 根据权利要求45所述的方法,其特征在于,所述确定所述M个预测点的属性加权平均值,包括:
    根据所述M个预测点的分类信息,确定目标加权平均方式;
    使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值。
  47. 根据权利要求46所述的方法,其特征在于,所述目标加权平均方式为第一加权平均方式和第二加权平均方式中的任意一种方式。
  48. 根据权利要求47所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定目标加权平均方式,包括:
    若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述目标加权平均方式为第一种加权平均方式;
    若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述目标加权平均方式为第二种加权平均方式,所述第一种加权平均方式与所述第二种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第一种加权平均方式与所述第二种加权平均方式不同。
  49. 根据权利要求47所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定目标加权平均方式,包括:
    若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述目标加权平均方式为第三种加权平均方式;
    若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述目标加权平均方式为第四种加权平均方式,所述第三种加权平均方式与所述第四种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第三种加权平均方式与所述第四种加权平均方式不同。
  50. 根据权利要求47所述的方法,其特征在于,若所述目标加权计算方式为所述第一加权平均方式,则所述使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值,包括:
    将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;
    根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
  51. 根据权利要求47所述的方法,其特征在于,若所述目标加权计算方式为所述第二加权平均方式,则所述根据所述预测值计算方式,以及所述使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值,包括:
    针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;
    根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
  52. 根据权利要求45所述的方法,其特征在于,所述根据所述一个预测值和所述M个预测值,确定所述当前点的属性预测值,包括:
    解码点云码流,得到第二索引,所述第二索引用于指示目标预测值;
    将所述一个预测值和所述M个预测值中,所述第二索引对应的目标预测值,确定为所述当前点的属性预测值。
  53. 一种点云编码方法,其特征在于,包括:
    确定点云中当前点和已编码点的分类信息,和/或所述已编码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
    根据所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,所述K为正整数;
    根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
    根据所述当前点的属性预测值,确定所述当前点的属性残差值。
  54. 根据权利要求53所述的方法,其特征在于,所述根据所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,包括:
    确定所述当前点对应的参考点确定模式;
    根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点。
  55. 根据权利要求54所述的方法,其特征在于,所述参考点确定模式为第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个。
  56. 根据权利要求55所述的方法,其特征在于,所述确定所述当前点对应的参考点确定模式,包括:
    根据所述当前点的分类信息,确定所述当前点对应的参考点确定模式。
  57. 根据权利要求56所述的方法,其特征在于,所述根据所述当前点的分类信息,确定所述当前点对应的参考点确定模式,包括:
    若所述当前点的类别为第一类别,则确定所述参考点确定模式为第一种参考点确定模式;
    若所述当前点的类别为第二类别,则确定所述参考点确定模式为第二种参考点确定模式,所述第二种参考点确定 模式与所述第一种参考点确定模式均为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意一个,且所述第二种参考点确定模式与所述第一种参考点确定模式不同。
  58. 根据权利要求55所述的方法,其特征在于,所述参考点确定模式为默认模式。
  59. 根据权利要求55所述的方法,其特征在于,所述确定所述当前点对应的参考点确定模式,包括:
    获取N个参考点候选确定模式,所述N个参考点候选确定模式为所述第一参考点确定模式、第二参考点确定模式和第三参考点确定模式中的任意N个模式,所述N为正整数;
    从所述N个参考点候选确定模式中,确定一参考点候选确定模式作为所述参考点确定模式。
  60. 根据权利要求59所述的方法,其特征在于,所述从所述N个参考点候选确定模式中,确定一参考点候选确定模式作为所述参考点确定模式,包括:
    确定所述N个参考点候选确定模式的代价;
    将所述N个参考点候选确定模式中代价最小的参考点候选确定模式,确定为所述参考点确定模式。
  61. 根据权利要求60所述的方法,其特征在于,所述确定所述N个参考点候选模式的代价,包括:
    按照编码顺序,从所述已编码点中选择距离所述当前点最近的P个点,所述P为正整数;
    针对所述N个参考点候选确定模式中的第j个参考点候选确定模式,使用所述第j个参考点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个参考点候选确定模式下的属性预测值,所述j为正整数;
    根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述第j个参考点候选模式的代价。
  62. 根据权利要求61所述的方法,其特征在于,所述根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述第j个参考点候选模式的代价,包括:
    根据所述P个点在所述第j个参考点候选确定模式下的属性预测值,确定所述P个点在所述第j个参考点候选确定模式下的属性重建值;
    根据所述P个点在所述第j个参考点候选确定模式下的属性重建值,以及所述P个点的已编码属性值,确定所述第j个参考点候选确定模式的代价。
  63. 根据权利要求55所述的方法,其特征在于,所述方法还包括:
    在点云码流中写入第一标识,所述第一标识用于指示所述当前点对应的参考点确定模式。
  64. 根据权利要求55-63任一项所述的方法,其特征在于,若所述参考点确定模式为所述第一参考点确定模式,则所述根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,包括:
    按照编码顺序,在所述已编码点中选出距离所述当前点最近的K个已编码点,作为所述K个参考点。
  65. 根据权利要求64所述的方法,其特征在于,若所述参考点确定模式为所述第二参考点确定模式,则所述根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,包括:
    按照编码顺序,从所述已编码点中选出分类信息与所述当前点的分类信息一致的K个已编码点,作为所述K个参考点。
  66. 根据权利要求55所述的方法,其特征在于,若所述参考点确定模式为所述第三参考点确定模式,则所述根据所述参考点确定模式,以及所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,包括:
    根据所述分类信息和距离信息中的至少一个,确定所述已编码点的权重;
    根据所述权重,确定所述已编码点的得分;
    根据所述得分,从所述已编码点中确定所述K个参考点。
  67. 根据权利要求66所述的方法,其特征在于,所述根据所述分类信息和距离信息中的至少一个,确定所述已编码点的权重,包括:
    针对所述已编码点中的第i个点,根据所述第i个点的分类信息,确定所述第i个点的权重,所述i为正整数。
  68. 根据权利要求67所述的方法,其特征在于,所述根据所述第i个点的分类信息,确定所述第i个点的权重,包括:
    根据所述第i个点的分类信息和所述当前点的分类信息,确定所述第i个点的权重。
  69. 根据权利要求68所述的方法,其特征在于,所述根据所述第i个点的分类信息和所述当前点的分类信息,确定所述第i个点的权重,包括:
    若所述第i个点的分类信息与所述当前点的分类信息一致,则确定所述第i个点的权重为第一权重;
    若所述第i个点的分类信息与所述当前点的分类信息不一致,则确定所述第i个点的权重为第二权重。
  70. 根据权利要求69所述的方法,其特征在于,所述根据所述权重,确定所述已编码点的得分,包括:
    根据所述第i个点与所述当前点之间的距离信息,以及所述第i个点的权重,确定所述第i个点的得分。
  71. 根据权利要求70所述的方法,其特征在于,所述根据所述第i个点与所述当前点之间的距离信息,以及所述第i个点的权重,确定所述第i个点的得分,包括:
    将所述第i个点与所述当前点之间的距离信息、与所述第i个点的权重的乘积,确定为所述第i个点的得分。
  72. 根据权利要求71所述的方法,其特征在于,若所述第二权重大于所述第一权重,则所述根据所述得分,从所述已编码点中确定所述K个参考点,包括:
    将所述已编码点中得分最小的K个点,确定为所述K个参考点。
  73. 根据权利要求53-55任一项所述的方法,其特征在于,所述根据所述K个参考点的属性信息,确定所述当前点的属性预测值,包括:
    从所述K个参考点中确定M个预测点,所述M为小于或等于K的正整数;
    根据所述M个预测点的属性信息,确定所述当前点的属性预测值。
  74. 根据权利要求73所述的方法,其特征在于,所述从所述K个参考点中确定M个预测点,包括:
    确定所述当前点对应的预测点确定模式;
    根据所述预测点确定模式,从所述K个参考点中确定M个预测点。
  75. 根据权利要求74所述的方法,其特征在于,所述预测点确定模式为第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个。
  76. 根据权利要求75所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    根据所述当前点的分类信息,确定所述预测点确定模式。
  77. 根据权利要求76所述的方法,其特征在于,所述根据所述当前点的分类信息,确定所述预测点确定模式,包括:
    若所述当前点的类别为第一类别,则确定所述预测点确定模式为第一种预测点确定模式;
    若所述当前点的类别为第二类别,则确定所述预测点确定模式为第二种预测点确定模式,所述第二种预测点确定模式与所述第一种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第二种预测点确定模式与所述第一种预测点确定模式不同。
  78. 根据权利要求75所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    根据所述K个参考点的分类信息,确定所述预测点确定模式。
  79. 根据权利要求78所述的方法,其特征在于,所述根据所述K个参考点的分类信息,确定所述预测点确定模式,包括:
    若所述K个参考点中与所述当前点属于同一类别的参考点的数量大于或等于第一阈值,则确定所述预测点确定模式为第三种预测点确定模式;
    若所述K个参考点中与所述当前点属于同一类别的参考点的数量小于第一阈值,则确定所述预测点确定模式为第四种预测点确定模式,所述第四种预测点确定模式与所述第三种预测点确定模式均为所述第一预测点确定模式、第二预测点确定模式、第三预测点确定模式中的任意一个,且所述第四种预测点确定模式与所述第三种预测点确定模式不同。
  80. 根据权利要求75所述的方法,其特征在于,所述预测点确定模式为默认模式。
  81. 根据权利要求75所述的方法,其特征在于,所述确定所述当前点对应的预测点确定模式,包括:
    获取Q个预测点候选确定模式,所述N为正整数;
    从所述Q个预测点候选确定模式中,确定一预测点候选确定模式作为所述预测点确定模式。
  82. 根据权利要求81所述的方法,其特征在于,所述从所述Q个预测点候选确定模式中,确定一预测点候选确定模式作为所述预测点确定模式,包括:
    确定所述Q个预测点候选确定模式的代价;
    将所述Q个预测点预测点候选确定模式中代价最小的预测点预测点候选确定模式,确定为所述预测点确定模式。
  83. 根据权利要求82所述的方法,其特征在于,所述确定所述Q个预测点候选确定模式的代价,包括:
    按照编码顺序,从所述已编码点中选择距离所述当前点最近的P个点,所述P为正整数;
    针对所述Q个预测点候选确定模式中的第j个预测点候选确定模式,使用所述第j个预测点候选确定模式对所述P个点进行预测,得到所述P个点在所述第j个预测点候选确定模式下的属性预测值,所述j为正整数;
    根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述第j个预测点候选模式的代价。
  84. 根据权利要求83所述的方法,其特征在于,所述根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述第j个预测点候选模式的代价,包括:
    根据所述P个点在所述第j个预测点候选确定模式下的属性预测值,确定所述P个点在所述第j个预测点候选确定模式下的属性重建值;
    根据所述P个点在所述第j个预测点候选确定模式下的属性重建值,以及所述P个点的已编码属性值,确定所述第j个预测点候选确定模式的代价。
  85. 根据权利要求75所述的方法,其特征在于,所述方法包括:
    在点云码流中写入第二标识,所述第二标识用于指示所述当前点对应的预测点确定模式。
  86. 根据权利要求75-85任一项所述的方法,其特征在于,若所述预测点确定模式为所述第一预测点确定模式,则所述根据所述预测点确定模式,从所述K个参考点中确定M个预测点,包括:
    将所述K个参考点,确定为所述M个预测点,其中M等于K。
  87. 根据权利要求86所述的方法,其特征在于,若所述预测点确定模式为所述第二预测点确定模式,则所述根据所述预测点确定模式,从所述K个参考点中确定M个预测点,包括:
    从所述K个参考点中选择一个参考点,确定为预测点,其中M等于1。
  88. 根据权利要求87所述的方法,其特征在于,所述从所述K个参考点中选择一个参考点,确定为预测点,包括:
    将所述K个参考点中距离所述当前点最近的一个参考点,确定为所述预测点。
  89. 根据权利要求87所述的方法,其特征在于,所述从所述K个参考点中选择一个参考点,确定为预测点,包括:
    将所述K个参考点中与所述当前点的属性信息最接近的第一参考点,确定为所述预测点。
  90. 根据权利要求89所述的方法,其特征在于,所述方法还包括:
    在点云码流中写入第一索引,所述第一索引用于指示所述第一参考点。
  91. 根据权利要求86所述的方法,其特征在于,若所述预测点确定模式为所述第三预测点确定模式,则所述根据所述预测点确定模式,从所述K个参考点中确定M个预测点,包括:
    将所述K个参考点中与所述当前点的分类信息一致,且距离所述当前点最近的M个参考点,确定为所述M个预测点。
  92. 根据权利要求73所述的方法,其特征在于,若所述M大于1时,所述根据所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    根据所述M个预测点的分类信息,确定预测值计算方式;
    根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值。
  93. 根据权利要求92所述的方法,其特征在于,所述预测值计算方式为第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种。
  94. 根据权利要求93所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定预测值计算方式,包括:
    若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述预测值计算方式为第一种预测值计算方式;
    若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述预测值计算方式为第二种预测值计算方式,所述第一种预测值计算方式与所述第二种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第一种预测值计算方式与所述第二种预测值计算方式不同。
  95. 根据权利要求93所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定预测值计算方式,包括:
    若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述预测值计算方式为第三种预测值计算方式;
    若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述预测值计算方式为第四种预测值计算方式,所述第三种预测值计算方式与所述第四种预测值计算方式均为所述第一预测值计算方式和第二预测值计算方式和第三预测值计算方式中的任意一种,且所述第三种预测值计算方式与所述第四种预测值计算方式不同。
  96. 根据权利要求93所述的方法,其特征在于,若所述预测值计算方式为所述第一预测值计算方式,则所述根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;
    根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
  97. 根据权利要求93所述的方法,其特征在于,若所述预测值计算方式为所述第二预测值计算方式,则所述根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;
    根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述当前点的属性预测值。
  98. 根据权利要求93所述的方法,其特征在于,若所述预测值计算方式为所述第三预测值计算方式,则所述根据所述预测值计算方式,以及所述M个预测点的属性信息,确定所述当前点的属性预测值,包括:
    确定所述M个预测点的属性加权平均值,并将所述属性加权平均值作为一个预测值;
    根据所述M个预测点的属性信息,确定M个预测值;
    根据所述一个预测值和所述M个预测值,确定所述当前点的属性预测值。
  99. 根据权利要求98所述的方法,其特征在于,所述确定所述M个预测点的属性加权平均值,包括:
    根据所述M个预测点的分类信息,确定目标加权平均方式;
    使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值。
  100. 根据权利要求99所述的方法,其特征在于,所述目标加权平均方式为第一加权平均方式和第二加权平均方式中的任意一种方式。
  101. 根据权利要求100所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定目标加权平均方式,包括:
    若所述M个预测点中与所述当前点的类别相同的预测点的个数大于或等于第二阈值,则确定所述目标加权平均方式为第一种加权平均方式;
    若所述M个预测点中与所述当前点的类别相同的预测点的个数小于所述第二阈值,则确定所述目标加权平均方式为第二种加权平均方式,所述第一种加权平均方式与所述第二种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第一种加权平均方式与所述第二种加权平均方式不同。
  102. 根据权利要求100所述的方法,其特征在于,所述根据所述M个预测点的分类信息,确定目标加权平均方式,包括:
    若所述M个预测点和所述当前点的类别均为第一类别时,则确定所述目标加权平均方式为第三种加权平均方式;
    若所述M个预测点和所述当前点的类别均为第二类别时,则确定所述目标加权平均方式为第四种加权平均方式,所述第三种加权平均方式与所述第四种加权平均方式均为所述第一加权平均方式和所述第二加权平均方式中的任意一种,且所述第三种加权平均方式与所述第四种加权平均方式不同。
  103. 根据权利要求100所述的方法,其特征在于,若所述目标加权计算方式为所述第一加权平均方式,则所述使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值,包括:
    将所述M个预测点中各预测点与所述当前点之间距离的倒数,确定为所述M个预测点中各预测点的第一权重;
    根据所述M个预测点中各预测点的第一权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
  104. 根据权利要求100所述的方法,其特征在于,若所述目标加权计算方式为所述第二加权平均方式,则所述根据所述预测值计算方式,以及所述使用所述目标加权平均方式,确定所述M个预测点的属性加权平均值,包括:
    针对所述M个预测点中的各预测点,根据所述预测点和所述当前点的位置信息以及预设的坐标轴权重,确定所述预测点的第二权重;
    根据所述M个预测点中各预测点的第二权重,对所述M个预测点的属性信息进行加权,得到所述M个预测点的属性加权平均值。
  105. 根据权利要求98所述的方法,其特征在于,所述根据所述一个预测值和所述M个预测值,确定所述当前点的属性预测值,包括:
    将所述一个预测值和所述M个预测值中的目标预测值,确定为所述当前点的属性预测值。
  106. 根据权利要求105所述的方法,其特征在于,所述方法还包括:
    在点云码流中写入第二索引,所述第二索引用于指示所述目标预测值。
  107. 一种点云解码装置,其特征在于,包括:
    信息确定单元,用于确定点云中当前点和已解码点的分类信息,和/或所述已解码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
    参考点确定单元,用于根据所述分类信息和距离信息中的至少一个,从所述已解码点中确定所述当前点的K个参考点,所述K为正整数;
    预测值确定单元,用于根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
    重建单元,用于根据所述当前点的属性预测值,确定所述当前点的属性重建值。
  108. 一种点云编码装置,其特征在于,包括:
    信息确定单元,用于确定点云中当前点和已编码点的分类信息,和/或所述已编码点与所述当前点之间的距离信息,所述分类信息用于指示点所属的类别;
    参考点确定单元,用于根据所述分类信息和距离信息中的至少一个,从所述已编码点中确定所述当前点的K个参考点,所述K为正整数;
    预测值确定单元,用于根据所述K个参考点的属性信息,确定所述当前点的属性预测值;
    编码单元,用于根据所述当前点的属性预测值,确定所述当前点的属性残差值。
  109. 一种电子设备,其特征在于,包括:处理器和存储器;
    所述存储器用于存储计算机程序;
    所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行如权利要求1至52或53-106任一项所述的方法。
  110. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至52或53-106任一项所述的方法。
PCT/CN2022/109891 2022-08-03 2022-08-03 点云编解码方法、装置、设备及存储介质 WO2024026712A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/109891 WO2024026712A1 (zh) 2022-08-03 2022-08-03 点云编解码方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/109891 WO2024026712A1 (zh) 2022-08-03 2022-08-03 点云编解码方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024026712A1 true WO2024026712A1 (zh) 2024-02-08

Family

ID=89848348

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/109891 WO2024026712A1 (zh) 2022-08-03 2022-08-03 点云编解码方法、装置、设备及存储介质

Country Status (1)

Country Link
WO (1) WO2024026712A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572655A (zh) * 2019-09-30 2019-12-13 北京大学深圳研究生院 一种基于邻居权重的参数选取和传递的点云属性编码和解码的方法及设备
CN111145090A (zh) * 2019-11-29 2020-05-12 鹏城实验室 一种点云属性编码方法、解码方法、编码设备及解码设备
WO2021023206A1 (zh) * 2019-08-05 2021-02-11 北京大学深圳研究生院 基于邻居权重优化的点云属性预测、编码和解码方法及设备
CN113179410A (zh) * 2021-06-10 2021-07-27 上海交通大学 一种点云属性的编解码方法、装置和系统
CN114598883A (zh) * 2020-12-07 2022-06-07 腾讯科技(深圳)有限公司 点云属性的预测方法、编码器、解码器及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021023206A1 (zh) * 2019-08-05 2021-02-11 北京大学深圳研究生院 基于邻居权重优化的点云属性预测、编码和解码方法及设备
CN110572655A (zh) * 2019-09-30 2019-12-13 北京大学深圳研究生院 一种基于邻居权重的参数选取和传递的点云属性编码和解码的方法及设备
CN111145090A (zh) * 2019-11-29 2020-05-12 鹏城实验室 一种点云属性编码方法、解码方法、编码设备及解码设备
CN114598883A (zh) * 2020-12-07 2022-06-07 腾讯科技(深圳)有限公司 点云属性的预测方法、编码器、解码器及存储介质
CN113179410A (zh) * 2021-06-10 2021-07-27 上海交通大学 一种点云属性的编解码方法、装置和系统

Similar Documents

Publication Publication Date Title
US11910017B2 (en) Method for predicting point cloud attribute, encoder, decoder, and storage medium
WO2022062369A1 (zh) 点云编解码方法与系统、及点云编码器与点云解码器
WO2022133753A1 (zh) 点云编解码方法与系统、及点云编码器与点云解码器
WO2022067775A1 (zh) 点云的编码、解码方法、编码器、解码器以及编解码系统
WO2024026712A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2024011381A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2022257528A1 (zh) 点云属性的预测方法、装置及相关设备
WO2022188582A1 (zh) 点云中邻居点的选择方法、装置及编解码器
WO2023024842A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2022257145A1 (zh) 点云属性的预测方法、装置及编解码器
WO2024065269A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2023024840A1 (zh) 点云编解码方法、编码器、解码器及存储介质
WO2022257150A1 (zh) 点云编解码方法、装置、点云编解码器及存储介质
WO2024065271A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2023103565A1 (zh) 点云属性信息的编解码方法、装置、设备及存储介质
WO2024065270A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2023155045A1 (zh) 预测的方法和装置、编码器、解码器和编解码系统
WO2024065272A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2022140937A1 (zh) 点云编解码方法与系统、及点云编码器与点云解码器
WO2023280129A1 (en) Method, apparatus, and medium for point cloud coding
WO2024065406A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN118055254A (zh) 点云属性编解码方法、装置、设备
CN117615136A (zh) 点云解码方法、点云编码方法、解码器、电子设备以及介质
CN116866615A (zh) 点云编码方法及设备
CN117677974A (zh) 点云编解码的方法、装置和介质

Legal Events

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

Ref document number: 22953523

Country of ref document: EP

Kind code of ref document: A1