Point cloud coding method and device, equipment and storage medium
By combining classification information and distance information to select reference points in point cloud encoding devices, the problem of inaccurate reference point selection in existing technologies is solved, the accuracy of attribute prediction is improved, and the performance of point cloud encoding and decoding is enhanced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI JIAOTONG UNIV
- Filing Date
- 2022-08-03
- Publication Date
- 2026-07-07
AI Technical Summary
In existing point cloud coding devices, the selection of reference points is not accurate enough during attribute prediction, resulting in low attribute prediction accuracy.
By determining the classification and distance information of the current point and the decoded points in the point cloud, K reference points are selected, where K is a positive integer, and attribute prediction is performed using the attribute information of these reference points.
This improves the accuracy of reference point selection, thereby enhancing the accuracy of attribute prediction and improving the performance of point cloud encoding and decoding.
Smart Images

Figure CN119678498B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of point cloud technology, and in particular to a point cloud encoding / decoding method, apparatus, device, and storage medium. Background Technology
[0002] Point cloud data is generated by collecting data from the surface of an object using acquisition devices. This data consists of hundreds of thousands or even more points. During video production, the point cloud data is transmitted between point cloud encoding and decoding devices as point cloud media files. However, the sheer volume of points presents a challenge for transmission; therefore, the point cloud encoding device needs to compress the point cloud data before transmission.
[0003] Point cloud encoding includes geometric encoding and attribute encoding. In the attribute encoding process, attribute prediction is used to reduce data redundancy. However, currently, the selection of reference points in attribute prediction is not accurate enough, resulting in low attribute prediction accuracy. Summary of the Invention
[0004] This application provides a point cloud encoding / decoding method, apparatus, device, and storage medium, which improves the accuracy of reference point selection and thus enhances the accuracy of attribute prediction.
[0005] In a first aspect, embodiments of this application provide a point cloud decoding method, including:
[0006] Determine the classification information of the current point and the decoded points in the point cloud, and / or the distance information between the decoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs;
[0007] Based on at least one of the classification information and distance information, determine K reference points for the current point from the decoded points, where K is a positive integer;
[0008] Based on the attribute information of the K reference points, determine the predicted attribute value of the current point;
[0009] Based on the attribute prediction value of the current point, determine the attribute reconstruction value of the current point.
[0010] Secondly, this application provides a point cloud encoding method, including:
[0011] Determine the classification information of the current point and the encoded points in the point cloud, and / or the distance information between the encoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs;
[0012] Based on at least one of the classification information and distance information, determine K reference points for the current point from the encoded points, where K is a positive integer;
[0013] Based on the attribute information of the K reference points, determine the predicted attribute value of the current point;
[0014] Based on the attribute prediction value of the current point, determine the attribute residual value of the current point.
[0015] Thirdly, this application provides a point cloud decoding apparatus for executing the methods described in the first aspect or its various implementations. Specifically, the apparatus includes functional units for executing the methods described in the first aspect or its various implementations.
[0016] Fourthly, this application provides a point cloud encoding apparatus for performing the methods described in the second aspect or its various implementations. Specifically, the apparatus includes functional units for performing the methods described in the second aspect or its various implementations.
[0017] Fifthly, a point cloud decoder is provided, including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the methods in the first aspect or its implementations described above.
[0018] In a sixth aspect, a point cloud encoder is provided, including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the methods in the second aspect or its implementations described above.
[0019] In a seventh aspect, a point cloud encoding and decoding system is provided, including a point cloud encoder and a point cloud decoder. The point cloud decoder is used to execute the methods in the first aspect or its implementations described above, and the point cloud encoder is used to execute the methods in the second aspect or its implementations described above.
[0020] Eighthly, a chip is provided for implementing the methods of any one of the first to second aspects or their respective implementations. Specifically, the chip includes a processor for calling and running a computer program from a memory, causing a device on which the chip is mounted to perform the methods of any one of the first to second aspects or their respective implementations.
[0021] Ninthly, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods of any one of the first to second aspects or their respective implementations.
[0022] In a tenth aspect, a computer program product is provided, including computer program instructions that cause a computer to perform the methods of any one of the first to second aspects or their respective implementations.
[0023] Eleventhly, a computer program is provided that, when run on a computer, causes the computer to perform the methods of any one of the first to second aspects or their respective implementations.
[0024] In a twelfth aspect, a bitstream is provided, which is generated based on the method of the second aspect described above. Optionally, the bitstream includes at least one of a first parameter and a second parameter.
[0025] Based on the above technical solution, by determining the classification information of the current point and decoded points in the point cloud, and / or the distance information between the decoded points and the current point, the classification information is used to indicate the category to which the point belongs; based on at least one of the classification information and distance information, K reference points are determined from the decoded points, where K is a positive integer; based on the attribute information of the K reference points, the attribute prediction value of the current point is determined; based on the attribute prediction value of the current point, the attribute reconstruction value of the current point is determined. Since the attribute information of points of the same category is relatively similar, this embodiment of the application considers not only distance information but also classification information when determining reference points, thereby improving the accuracy of reference point determination. When performing attribute prediction based on the accurately determined reference points, the accuracy of attribute prediction can be improved. Attached Figure Description
[0026] Figure 1 This is a schematic block diagram of a point cloud encoding and decoding system according to an embodiment of this application;
[0027] Figure 2 This is a schematic block diagram of the point cloud encoder provided in the embodiments of this application;
[0028] Figure 3 This is a schematic block diagram of the point cloud decoder provided in the embodiments of this application;
[0029] Figure 4 This is a schematic flowchart of a point cloud decoding method provided in an embodiment of this application;
[0030] Figure 5 This refers to the point cloud histogram involved in the embodiments of this application;
[0031] Figure 6 This is a schematic diagram of a point cloud encoding method provided in an embodiment of this application;
[0032] Figure 7 This is a schematic block diagram of the point cloud decoding device provided in the embodiments of this application;
[0033] Figure 8 This is a schematic block diagram of the point cloud encoding device provided in the embodiments of this application;
[0034] Figure 9 This is a schematic block diagram of the electronic device provided in the embodiments of this application;
[0035] Figure 10 This is a schematic block diagram of the point cloud encoding and decoding system provided in the embodiments of this application. Detailed Implementation
[0036] This application can be applied to the field of point cloud upsampling technology, for example, to the field of point cloud compression technology.
[0037] To facilitate understanding of the embodiments of this application, the relevant concepts involved in the embodiments of this application will be briefly introduced as follows:
[0038] A point cloud is a set of discrete points in space that are randomly distributed and represent the spatial structure and surface properties of a three-dimensional object or scene.
[0039] Point cloud data is a specific record of point clouds. Points in a point cloud can include both location and attribute information. For example, location information can be three-dimensional coordinates, also known as geometric information. Attribute information can include color, reflectivity, normal vectors, etc. Color information can be in any color space, such as RGB. Alternatively, it can be in luminance / chromaticity (YcbCr, YUV) information. For example, Y represents luminance (Luma), Cb(U) represents blue color difference, Cr(V) represents red, and U and V represent chromaticity to describe color difference information. For instance, a point cloud obtained using laser measurement principles can include both three-dimensional coordinates and laser reflection intensity. Similarly, a point cloud obtained using photogrammetry principles can include both three-dimensional coordinates and color information. For example, point clouds can be obtained by combining laser measurement and photogrammetry principles. The points in the point cloud may include the three-dimensional coordinate information of the points, the laser reflection intensity of the points, and the color information of the points.
[0040] Point cloud data can be acquired through at least one of the following methods: (1) Computer-generated data. Computer-generated data can be generated based on virtual 3D objects and virtual 3D scenes. (2) 3D laser scanning. Point cloud data of static real-world 3D objects or 3D scenes can be acquired through 3D laser scanning, with millions of point cloud data acquired per second. (3) 3D photogrammetry. Point cloud data of real-world visual scenes can be acquired by collecting data from real-world visual scenes using 3D photography equipment (i.e., a set of cameras or a camera device with multiple lenses and sensors). Point cloud data of dynamic real-world 3D objects or 3D scenes can be acquired through 3D photography. (4) Point cloud data of biological tissues and organs can be acquired through medical equipment. In the medical field, point cloud data of biological tissues and organs can be acquired through medical equipment such as magnetic resonance imaging (MRI), computed tomography (CT), and electromagnetic positioning information.
[0041] Point clouds can be classified into dense point clouds and sparse point clouds according to the acquisition method.
[0042] Point clouds are classified according to the temporal type of the data as follows:
[0043] The first type of static point cloud: that is, the object is stationary and the device for acquiring the point cloud is also stationary;
[0044] The second type of dynamic point cloud: The object is in motion, but the device acquiring the point cloud is stationary;
[0045] The third type of dynamic point cloud acquisition: The device acquiring the point cloud is in motion.
[0046] Point clouds can be divided into two main categories based on their uses:
[0047] Category 1: Machine-perceived point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and disaster relief robots;
[0048] Category 2: Human eye-perceived point clouds, which can be used in point cloud application scenarios such as digital cultural heritage, free-viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
[0049] With the development of 3D reconstruction and 3D imaging technologies, point clouds are widely used in virtual reality, immersive telepresence, 3D printing, and other fields. However, because 3D point clouds often have a huge number of points, and the distribution of these points in space is disordered; at the same time, each point often has rich attribute information, resulting in a massive amount of data in a point cloud, posing a huge challenge to point cloud storage and transmission. Therefore, point cloud compression coding technology is one of the key technologies for point cloud processing and applications.
[0050] The following section introduces the relevant knowledge about point cloud encoding and decoding.
[0051] Figure 1 This is a schematic block diagram of a point cloud encoding / decoding system according to an embodiment of this application. It should be noted that... Figure 1 This is merely an example; the point cloud encoding / decoding system in this application includes, but is not limited to, [other examples]. Figure 1 As shown. Figure 1 As shown, the point cloud encoding / decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device encodes (can be understood as compressing) the point cloud data to generate a bitstream, and transmits the bitstream to the decoding device. The decoding device decodes the bitstream generated by the encoding device to obtain the decoded point cloud data.
[0052] The encoding device 110 in this application embodiment can be understood as a device with point cloud encoding function, and the decoding device 120 can be understood as a device with point cloud decoding function. That is, the encoding device 110 and the decoding device 120 in this application embodiment include a wider range of devices, such as smartphones, desktop computers, mobile computing devices, laptops (e.g., laptop computers), tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, point cloud game consoles, vehicle computers, etc.
[0053] In some embodiments, encoding device 110 may transmit encoded point cloud data (such as a bitstream) to decoding device 120 via channel 130. Channel 130 may include one or more media and / or means capable of transmitting encoded point cloud data from encoding device 110 to decoding device 120.
[0054] In one example, channel 130 includes one or more communication media that enable encoding device 110 to directly transmit encoded point cloud data to decoding device 120 in real time. In this example, encoding device 110 can modulate the encoded point cloud data according to a communication standard and transmit the modulated point cloud data to decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum; optionally, the communication media may also include wired communication media, such as one or more physical transmission lines.
[0055] In another example, channel 130 includes a storage medium that can store point cloud data encoded by encoding device 110. The storage medium includes various local access data storage media, such as optical discs, DVDs, flash memory, etc. In this example, decoding device 120 can retrieve the encoded point cloud data from this storage medium.
[0056] In another example, channel 130 may include a storage server that stores the point cloud data encoded by encoding device 110. In this example, decoding device 120 can download the stored encoded point cloud data from the storage server. Optionally, the storage server can store the encoded point cloud data and transmit the encoded point cloud data to decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
[0057] In some embodiments, 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.
[0058] In some embodiments, in addition to the point cloud encoder 112 and the input interface 113, the encoding device 110 may also include a point cloud source 111.
[0059] The point cloud source 111 may include at least one of a point cloud acquisition device (e.g., a scanner), a point cloud archive, a point cloud input interface, and a computer graphics system, wherein the point cloud input interface is used to receive point cloud data from a point cloud content provider, and the computer graphics system is used to generate point cloud data.
[0060] The point cloud encoder 112 encodes the point cloud data from the point cloud source 111 to generate a bitstream. The point cloud encoder 112 transmits the encoded point cloud data directly to the decoding device 120 via the output interface 113. The encoded point cloud data can also be stored on a storage medium or a storage server for subsequent reading by the decoding device 120.
[0061] In some embodiments, the decoding device 120 includes an input interface 121 and a point cloud decoder 122.
[0062] In some embodiments, in addition to the input interface 121 and the point cloud decoder 122, the decoding device 120 may also include a display device 123.
[0063] The input interface 121 includes a receiver and / or a modem. The input interface 121 can receive encoded point cloud data through channel 130.
[0064] The point cloud decoder 122 is used to decode the encoded point cloud data to obtain the decoded point cloud data, and transmit the decoded point cloud data to the display device 123.
[0065] 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 various display devices, such as liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, or other types of display devices.
[0066] also, Figure 1 This is merely an example; the technical solutions in the embodiments of this application are not limited to... Figure 1 For example, the technology of this application can also be applied to one-sided point cloud encoding or one-sided point cloud decoding.
[0067] Current point cloud encoders can employ two point cloud compression coding techniques proposed by the Moving Picture Experts Group (MPEG): Video-based Point Cloud Compression (VPCC) and Geometry-based Point Cloud Compression (GPCC). VPCC projects a 3D point cloud onto a 2D model and encodes the projected 2D image using existing 2D encoding tools. GPCC utilizes a hierarchical structure to divide the point cloud into multiple units, encoding the entire point cloud by recording the division process.
[0068] The following uses the GPCC encoding and decoding framework as an example to illustrate the point cloud encoder and point cloud decoder applicable to the embodiments of this application.
[0069] Figure 2 This is a schematic block diagram of a point cloud encoder provided in an embodiment of this application.
[0070] As mentioned above, points in a point cloud can include both location information and attribute information. Therefore, the encoding of points in a point cloud mainly includes location encoding and attribute encoding. In some examples, the location information of points in a point cloud is also called geometric information, and the corresponding location encoding of points in a point cloud can also be called geometric encoding.
[0071] In the GPCC encoding framework, the geometric information and corresponding attribute information of point clouds are encoded separately.
[0072] The location encoding process includes: First, constructing the smallest cube that encloses all points in the point cloud, called the minimum bounding box. Then, performing octree partitioning on the minimum bounding box, dividing it into eight equal sub-cubes. This process continues, dividing non-empty sub-cubes (containing points from the point cloud) into eight equal parts until the resulting leaf nodes are 1×1×1 unit cubes. During this process, the occupancy of each of the eight sub-cubes generated in each partition is encoded using 8-bit binary numbers, generating a binary geometric bitstream, or geometric codestream. Specifically, the points in the point cloud are preprocessed, such as through coordinate transformation, quantization, and removal of duplicate points. Next, geometric encoding is performed on the preprocessed point cloud, for example, by constructing an octree. The geometric codestream is then formed based on the constructed octree. Simultaneously, based on the location information output from the constructed octree, the location information of each point in the point cloud data is reconstructed, obtaining the reconstructed location values for each point.
[0073] The attribute encoding process includes: using the reconstructed information of the location information and the original values of the attribute information of the given input point cloud, selecting one of three prediction modes to perform point cloud prediction, quantizing the prediction results, and performing arithmetic encoding to form an attribute code stream.
[0074] like Figure 2 As shown, position encoding can be implemented using the following units:
[0075] The unit includes: Tanmsform coordinates (201), Voxelize (202), Analyze octree (203), Reconstruct geometry (204), Arithmetic encoding (205), and Analyze surface approximation (206).
[0076] The coordinate transformation unit 201 can be used to transform the world coordinates of points in a point cloud into relative coordinates. For example, subtracting the minimum value of the xyz coordinate axis from the geometric coordinates of a point is equivalent to a de-DC operation, thereby converting the coordinates of points in the point cloud from world coordinates to relative coordinates.
[0077] The voxelization unit 202, also known as the quantize and removepoints unit, reduces the number of coordinates through quantization. After quantization, previously different points may be assigned the same coordinates; therefore, duplicate points can be removed through deduplication. For example, multiple clouds with the same quantized location but different attribute information can be merged into one cloud through attribute transformation. In some embodiments of this application, the voxelization unit 202 is an optional unit module.
[0078] The octree partitioning unit 203 can use octree encoding to encode the position information of quantized points. For example, the point cloud can be partitioned in the form of an octree, so that the position of the point can correspond one-to-one with the position of the octree. By counting the positions of points in the octree and marking their flags as 1, geometric encoding can be performed.
[0079] In some embodiments, during the geometric information encoding process based on trianglesoup (trisoup), the point cloud is also divided into octrees by octree partitioning unit 203. However, unlike the geometric information encoding based on octree, this trisoup does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step. Instead, it stops partitioning when the side length of the block (sub-block) is W. Based on the surface formed by the distribution of the point cloud in each block, at most twelve vertices (intersection points) generated by the surface and the twelve edges of the block are obtained. The intersection points are surface fitted by surface fitting unit 206, and the fitted intersection points are geometrically encoded.
[0080] The geometric reconstruction unit 204 can perform position reconstruction based on the position information output by the octree partitioning unit 203 or the intersection points fitted by the surface fitting unit 206, thereby obtaining the reconstructed values of the position information of each point in the point cloud data.
[0081] Arithmetic coding unit 205 can use entropy coding to perform arithmetic coding on the position information output by octree analysis unit 203 or on the intersection points fitted by surface fitting unit 206. For example, the position information output by octree analysis unit 203 can be used to generate a geometric bitstream using arithmetic coding. The geometric bitstream can also be called a geometric bitstream.
[0082] Attribute encoding can be implemented through the following units:
[0083] The system includes a color transformation unit 210, a recoloring attribute unit 211, a region adaptive hierarchical transformation (RAHT) unit 212, a generation LOD unit 213, a lifting transform unit 214, a quantize coefficients unit 215, and an arithmetic coding unit 216.
[0084] It should be noted that the point cloud encoder 200 can contain more than Figure 2More, fewer, or different functional components.
[0085] The color conversion unit 210 can be used to convert the RGB color space of points in a point cloud to YCbCr format or other formats.
[0086] The recoloring unit 211 uses the reconstructed geometric information to recolor the color information, so that the unencoded attribute information corresponds to the reconstructed geometric information.
[0087] After the original values of the point attribute information are obtained through the reshaping unit 211, 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 lifting transformation depends on generating the level of detail (LOD).
[0088] Either the RAHT transform or the lifting transform can be understood as being used to predict the attribute information of points in a point cloud, to obtain the predicted value of the point's attribute information, and then to obtain the residual value of the point's attribute information based on the predicted value. For example, the residual value of the point's attribute information can be the original value of the point's attribute information minus the predicted value of the point's attribute information.
[0089] In one embodiment of this application, the process of generating a Level of Detail (LOD) unit includes: obtaining the Euclidean distance between points based on the position information of points in the point cloud; and dividing the points into different detail representation layers based on the Euclidean distance. In one embodiment, the Euclidean distances can be sorted, and different ranges of Euclidean distances can be divided into different detail representation layers. For example, a point can be randomly selected as the first detail representation layer. Then, the Euclidean distances between the remaining points and this point are calculated, and points whose Euclidean distances meet a first threshold requirement are assigned to the second detail representation layer. The centroids of the points in the second detail representation layer are obtained, and the Euclidean distances between the points other than those in the first and second detail representation layers and the centroids are calculated. Points whose Euclidean distances meet the second threshold are assigned to the third detail representation layer. This process is repeated until all points are assigned to detail representation layers. By adjusting the threshold of the Euclidean distance, the number of points in each LOD layer can be increased. It should be understood that other methods can also be used for LOD division, and this application does not limit this.
[0090] It should be noted that the point cloud can be directly divided into one or more detail representation layers, or the point cloud can be first divided into multiple point cloud slices, and then each point cloud slice can be divided into one or more LOD layers.
[0091] For example, a point cloud can be divided into multiple point cloud chunks, each containing between 550,000 and 1,100,000 points. Each point cloud chunk can be viewed as a separate point cloud. Each point cloud chunk can also be divided into multiple detail representation layers, each containing multiple points. In one embodiment, the detail representation layers can be divided based on the Euclidean distance between the points.
[0092] The quantization unit 215 can be used to quantize the residual values of the attribute information of the points. For example, if the quantization unit 215 is connected to the RAHT transformation unit 212, the quantization unit 215 can be used to quantize the residual values of the attribute information of the points output by the RAHT transformation unit 212.
[0093] Arithmetic coding unit 216 can use zero-run-length coding to entropy-encode the residual values of the attribute information of the points to obtain an attribute bitstream. The attribute bitstream can be bitstream information.
[0094] Figure 3 This is a schematic block diagram of the point cloud decoder provided in the embodiments of this application.
[0095] like Figure 3 As shown, the decoder 300 can acquire the point cloud bitstream from the encoding device and obtain the position and attribute information of the points in the point cloud through the parsing code. Point cloud decoding includes position decoding and attribute decoding.
[0096] The location decoding process includes: performing arithmetic decoding on the geometric bitstream; constructing and merging octrees to reconstruct the point location information; and performing coordinate transformation on the reconstructed point location information to obtain the point's actual location information. The point's location information can also be referred to as its geometric information.
[0097] The attribute decoding process includes: obtaining the residual values of the attribute information of points in the point cloud by parsing the attribute bitstream; obtaining the residual values of the attribute information of points by inverse quantization; based on the reconstructed information of the point's position information obtained during the position decoding process, selecting one of the following inverse RAHT transform and inverse lifting transform to perform point cloud prediction, obtaining the predicted value, and adding the predicted value to the residual value to obtain the reconstructed value of the point's attribute information; and performing an inverse color space transformation on the reconstructed value of the point's attribute information to obtain the decoded point cloud.
[0098] like Figure 3 As shown, position decoding can be implemented using the following unit:
[0099] Arithmetic decoding unit 301, octree synthesis unit 302, surface approximation unit 303, geometry reconstruction unit 304, and inverse transform coordinates unit 305.
[0100] Attribute encoding can be implemented through the following units:
[0101] Arithmetic decoding unit 310, inverse quantization unit 311, RAHT inverse transform unit 312, generate LOD unit 313, inverse lifting unit 314, and inverse color transformation unit 315.
[0102] It should be noted that decompression is the reverse process of compression. Similarly, the functions of each unit in the decoder 300 can be found in the functions of the corresponding units in the encoder 200. Additionally, the point cloud decoder 300 may contain more than... Figure 3 More, fewer, or different functional components.
[0103] For example, decoder 300 can divide the point cloud into multiple Levels of Distance (LODs) based on the Euclidean distance between points in the point cloud; then, it sequentially decodes the attribute information of the points in the LODs; for example, it calculates the number of zeros (zero_cnt) in zero-run-length coding to decode the residuals based on zero_cnt; next, decoding framework 200 can perform inverse quantization based on the decoded residual values, and add the inverse quantized residual value to the predicted value of the current point to obtain the reconstructed value of the point cloud, until all point clouds are decoded. The current point will be used as the nearest neighbor point in subsequent LODs, and the reconstructed value of the current point will be used to predict the attribute information of subsequent points.
[0104] The above describes the basic process of a point cloud codec based on the GPCC encoding and decoding framework. With the development of technology, some modules or steps of this framework or process may be optimized. This application applies to the basic process of the point cloud codec based on the GPCC encoding and decoding framework, but is not limited to this framework and process.
[0105] The embodiments of this application mainly involve attribute encoding and decoding, specifically attribute prediction.
[0106] In attribute prediction, it is necessary to determine K reference points for the current point and predict the attribute information of the current point based on the attribute information of the K reference points. However, the currently determined K reference points are not accurate enough. For example, determining reference points based on distance without considering other reference information results in low attribute encoding accuracy.
[0107] To address the aforementioned technical problems, embodiments of this application determine K reference points based on at least one of classification information and distance information. In other words, when determining reference points, embodiments of this application consider not only distance information but also classification information. Classification information can be understood as the category to which a point in the point cloud belongs. By determining reference points based on at least one of classification information and distance information, the accuracy of reference point determination can be improved. When performing attribute prediction based on these accurately determined reference points, the accuracy of attribute prediction can be improved, thereby enhancing encoding and decoding performance.
[0108] The point cloud encoding and decoding method involved in the embodiments of this application will be described below with reference to specific examples.
[0109] First, taking the decoding end as an example, the point cloud decoding method provided in the embodiments of this application will be introduced.
[0110] Figure 4 This is a schematic flowchart of a point cloud decoding method provided in an embodiment of this application. The point cloud decoding method in this embodiment can be derived from the above... Figure 1 or Figure 3 The point cloud decoding device shown is now complete.
[0111] like Figure 4 As shown, the point cloud decoding method in this application includes:
[0112] S101. Determine the classification information of the current point and the decoded points in the point cloud, and / or the distance information between the decoded points and the current point.
[0113] The classification information is used to indicate the category to which a point in the point cloud belongs.
[0114] In some embodiments, classification information can be understood as the real-world category to which the points in the point cloud belong, such as roads, cars, pedestrians, etc.
[0115] In this embodiment, the classification information of the current point and the decoded points, and / or the distance information between the decoded points and the current point are determined. Then, based on the classification information and / or the distance information, K reference points for the current point are determined from the decoded points. Since the attribute information of points of the same category is relatively similar, this embodiment considers not only distance information but also classification information when determining reference points, thereby improving the accuracy of reference point determination. Based on these accurately determined reference points, the accuracy of attribute prediction can be improved.
[0116] The specific process for determining the classification information of the current point and the decoded points in the point cloud is the same in the embodiments of this application.
[0117] The methods for determining the classification information of the current point and the decoded points in the point cloud in S101 above include, but are not limited to, the following:
[0118] Method 1 involves geometric decoding (also known as position decoding) of the point cloud before attribute decoding, obtaining the geometric information of the points in the point cloud. The point cloud is then segmented based on this geometric information to obtain classification information, which in turn determines the classification information of the current point and the decoded points.
[0119] In real-world scenarios, different objects may move differently. For example, consider point cloud data captured by a lidar sensor on a moving vehicle. In this point cloud data, roads and objects typically exhibit different motions. Because the distance between the road and the lidar sensor is relatively constant, and the road changes only slightly from one vehicle's position to the next, the points representing the road move very little relative to the lidar sensor's position. In contrast, objects such as buildings, road signs, vegetation, or other vehicles exhibit greater motion.
[0120] Based on this, in one possible implementation of method 1, Figure 5 As shown, a histogram is used to count the height values of points in the point cloud. The horizontal axis of the histogram is the height value of the point cloud, and the vertical axis is the number of points at that height value. Figure 5 Taking radar point clouds as an example, the height of the radar is taken as the zero point, so the height values of most points are negative. Next, the height values corresponding to the peak values of the histogram are obtained, and the standard deviation of the height values is calculated. Using the height corresponding to the peak value as the center, the thresholds that are higher than the center by *a* times (e.g., 1.5 times) of the standard deviation are denoted as the first height threshold, *Top_thr*, and the thresholds that are lower than the center by *b* times (e.g., 1.5 times) of the standard deviation are denoted as the second height threshold, *Bottom_thr*. Based on these first and second height thresholds, the point clouds are divided into different categories. For example, point clouds with height values between the first and second height thresholds are denoted as category one point clouds (e.g., road point clouds), and point clouds with height values greater than the first height threshold and less than the second height threshold are denoted as category two point clouds (e.g., non-road point clouds).
[0121] Method 2 involves including classification information for the points in the point cloud bitstream. The decoding end then decodes the bitstream to obtain the classification information for the current point and the previously decoded points. For example, the encoding end writes the category identifier of each point in the point cloud into the bitstream, and the decoding end decodes the bitstream to obtain the category identifiers for the current point and the previously decoded points, thus determining the classification information based on these identifiers.
[0122] Method 3 uses a pre-trained neural network model to predict the classification information of the current point and the decoded points.
[0123] In one example of Method 3, assuming the classification information of the next point to be decoded is predicted based on the classification information of the previously decoded points, then in this embodiment, the classification information of the previously decoded points has already been predicted when decoding the current point. At this time, when determining the classification information of the current point, at least one previously decoded point is selected from the previously decoded points; this at least one decoded point can be the previously decoded point closest to the current point. Next, the classification information of at least one previously 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 previously decoded point.
[0124] In another example of this method 3, the position information of the points in the point cloud is input into the neural network model so that the neural network model can divide the point cloud into multiple categories based on the position information of the points in the point cloud, thereby determining the classification information of the current point and the decoded points.
[0125] It should be noted that, in addition to the methods mentioned above, other methods can be used to determine the classification information of the current point and the decoded points in the point cloud, and this application embodiment does not limit this.
[0126] Since the geometric decoding of the point cloud has been completed before the attribute decoding, 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 current point.
[0127] This application does not limit the specific method for determining the distance between the decoded point and the current point.
[0128] In one example, the Manhattan distance between the decoded point and the current point is determined according to the Manhattan distance calculation method.
[0129] In another example, the Euclidean distance between the decoded point and the current point is determined according to the Euclidean distance calculation method.
[0130] This application does not limit the specific number of decoded points for determining classification information and distance information.
[0131] In some embodiments, the L decoded points preceding the current point in the decoding sequence are taken as the research objects, and the classification information of the current point and these L decoded points is determined, and / or the distance from each of these L decoded points to the current point is determined, where L is a positive integer.
[0132] Optionally, L is a preset fixed value, meaning that, except for the first few points in the decoding order, the number of decoded points corresponding to other points is the same.
[0133] Optionally, L is not a fixed value. For example, different L values can be determined based on 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.
[0134] The decoding order in this application embodiment can be any one of the following: the original input order of the point cloud points, the Morton order, the Hilbert order, or the LOD order. The Morton order can be understood as converting the coordinates of the point cloud points into Morton codes, and then sorting the point cloud points in ascending order based on the size of the Morton codes. Similarly, the Hilbert order can be understood as converting the coordinates of the point cloud points into Hilbert codes, and then sorting the point cloud points in ascending order based on the size of the Hilbert codes.
[0135] Based on the above method, the classification information of the current point and the decoded points, and / or the distance information between the decoded points and the current point can be determined. Then, the following step S102 is executed.
[0136] S102. Determine K reference points for the current point from the decoded points based on at least one of the classification information and distance information.
[0137] Where K is a positive integer. Optionally, the specific value of K can be a default value, can be decoded, or can be calculated adaptively; this application does not impose any restrictions.
[0138] In determining the reference point, this application considers not only distance information but also classification information, thereby improving the accuracy of reference point determination. When performing attribute prediction based on this accurately determined reference point, the accuracy of attribute prediction can be improved.
[0139] In some embodiments, the decoder determines K reference points for the current point from the decoded points based on the classification information of the current point and the previously decoded points. For example, the decoder determines the K previously decoded points that are closest to the current point in the decoding sequence and have the same category as the current point as the K reference points for the current point.
[0140] In some embodiments, the decoder determines K reference points for the current point from among the decoded points based on the classification information of the current point and the decoded points, as well as the distance between the decoded points and the current point. For example, the decoder determines the K decoded points whose category matches the current point's category and which are closest to the current point as the K reference points for the current point.
[0141] In some embodiments, the decoding end determines K reference points for the current point from among the decoded points based on the distance between the decoded points and the current point. For example, the decoding end determines the K closest decoded points to the current point as the K reference points for the current point.
[0142] In some embodiments, the present application includes multiple methods for determining the reference point. In this case, S102 above includes the following steps S102-A and S102-B:
[0143] S102-A, Determine the reference point determination mode corresponding to the current point.
[0144] S102-B: Determine K reference points for the current point from the decoded points based on the reference point determination pattern and at least one of classification information and distance information.
[0145] In this embodiment, if there are multiple ways to determine reference points, when the decoding 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 K reference points of the current point from the decoded points based on the determination of the reference point determination mode, as well as at least one of classification information and distance information.
[0146] In some embodiments, all points in the point cloud share the same reference point determination mode; that is, the decoder uses a single reference point determination mode to determine the reference point for each point in the point cloud. Optionally, this reference point determination mode can be a default mode. Optionally, the encoder determines a reference point determination mode from multiple reference point determination modes and writes the determined reference point determination mode into the bitstream to indicate this mode to the decoder. The decoder then obtains the reference point determination mode by decoding the bitstream and uses this mode to determine the reference point for all points in the point cloud. Optionally, the encoder may also encode an identifier bit for each point in the point cloud to indicate the reference point determination mode corresponding to each point.
[0147] In some embodiments, multiple reference point determination modes can be used in a point cloud. For example, some points in the point cloud may be determined using one reference point determination mode, while other reference points may be determined using a different reference point determination mode.
[0148] This application does not impose any restrictions on the reference point determination mode.
[0149] In some embodiments, 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. Optionally, 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.
[0150] The following describes the specific method for determining the reference point corresponding to the current point in S102-A above.
[0151] The methods for determining the reference point determination mode corresponding to the current point in S102-A above include, but are not limited to, the following:
[0152] Method 1: Determine the reference point determination mode corresponding to the current point based on the classification information of the current point.
[0153] In one possible implementation of this method, different categories of points in the point cloud correspond to different reference point determination modes.
[0154] For example, if the current point belongs to the first category, then the reference point determination mode is determined as the first reference point determination mode.
[0155] For example, if the current point belongs to the second category, then the reference point determination mode is determined to be the second reference point determination mode.
[0156] The second reference point determination mode and the first reference point determination mode are both any one of the first reference point 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.
[0157] In one example, the correspondence between the point cloud categories and the reference point determination patterns is shown in Table 1:
[0158] Table 1
[0159] Point classification information Reference point determination mode Category 1 The first reference point determination mode Category 2 The second reference point determination mode … …
[0160] As shown in Table 1 above, different categories of points correspond to different reference point determination modes. Thus, the decoding end can query Table 1 based on the classification information of the current point to determine the reference point determination mode corresponding to the current point.
[0161] In another example, the first and second reference point determination modes mentioned above are the default modes. For instance, if the current point's category is the first category, the decoder defaults to determining the reference point corresponding to the current point as the second reference point determination mode, meaning the first reference point determination mode is the second reference point determination mode. If the current point's category is the second category, the encoder defaults to determining the reference point corresponding to the current point as the third reference point determination mode, meaning the second reference point determination mode is the third reference point determination mode.
[0162] In another example, the encoder can write the reference point determination patterns corresponding to different categories into the bitstream. The decoder can then determine the reference point determination pattern corresponding to the category to which the current point belongs by decoding the bitstream. For example, the decoder might decode the bitstream to find that the first category corresponds to the second reference point determination pattern, and the second category corresponds to the third reference point determination pattern. Thus, if the current point's category is determined to be the first category, the second reference point determination pattern is adopted as the reference point determination pattern for the current point; that is, the first reference point determination pattern becomes the second reference point determination pattern. Similarly, if the current point's category is determined to be the second category, the third reference point determination pattern is adopted as the reference point determination pattern for the current point; that is, the second reference point determination pattern becomes the third reference point determination pattern.
[0163] In another possible implementation of this method one, 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 points.
[0164] For example, if the number of decoded points of the same category as the current point is greater than or equal to a certain preset value, then the reference point determination mode corresponding to the current point is determined to be a reference point determination mode.
[0165] For example, if the number of decoded points of the same category as the current point is less than a certain preset value, then the reference point determination mode corresponding to the current point is determined to be another reference point determination mode.
[0166] In addition to using Method 1 to determine the reference point determination mode corresponding to the current point, the decoding end can also use Method 2, Method 3 or Method 4 to determine the reference point determination mode corresponding to the current point.
[0167] Method 2: The reference point for the current point is determined using the default mode. In other words, both the decoder and encoder use the default mode to determine the reference point for the current point.
[0168] Optionally, the above default mode can be any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
[0169] Method 3: Decode the point cloud 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 based on the first identifier.
[0170] In this third method, after determining the reference point determination mode corresponding to the current point, the encoding end instructs the decoding end to indicate the reference point determination mode. Specifically, a first identifier is written into the bitstream, and this first identifier 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 bitstream, and then determine the reference point determination mode corresponding to the current point based on the first identifier.
[0171] Optionally, the first identifier can be an index for determining the pattern of the reference point.
[0172] In one possible implementation of this third method, the encoder can encode a first identifier for each point in the point cloud to indicate the reference point determination mode corresponding to that point.
[0173] In one possible implementation of this third method, if the reference point determination mode corresponding to each point in the point cloud is the same, the encoding end can write a first identifier into the bit stream. This first identifier is used to indicate the reference point determination mode corresponding to all points in the point cloud.
[0174] In one possible implementation of this third method, if different categories of points correspond to different reference point determination patterns, the encoder can encode different first identifiers for points of different categories. For example, the first identifier for a first-class point cloud is B1, and the first identifier for a second-class point cloud is B2. The decoder can then determine the first identifier corresponding to the current point based on the current point's classification information, and further determine the reference point determination pattern corresponding to the current point based on the first identifier. For example, if the current point is a first-class point cloud, the decoder will determine the reference point determination pattern corresponding to the first identifier B1 as the reference point determination pattern corresponding to the current point; if the current point is a second-class point cloud, the decoder will determine the reference point determination pattern corresponding to the first identifier B2 as the reference point determination pattern corresponding to the current point.
[0175] Method four: The decoding end determines the reference point determination mode corresponding to the current point using an adaptive method. In this case, S102-A includes the following steps:
[0176] S102-A1: Obtain N candidate determination patterns for reference points, where N is a positive integer;
[0177] S102-A2: From N candidate reference point determination patterns, determine one reference point candidate determination pattern as the reference point determination pattern corresponding to the current point.
[0178] The above N candidate reference point determination modes are any N modes among the above first reference point determination mode, second reference point determination mode and third reference point determination mode.
[0179] In some embodiments, the above N reference point candidate determination modes are the encoding and decoding defaults.
[0180] In some embodiments, the encoder determines N candidate reference point determination modes from the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode, and instructs the decoder to determine the N candidate reference point determination modes.
[0181] In some embodiments, the decoding end may also obtain N candidate reference point determination patterns through other methods, and this application embodiment does not limit this. After obtaining N candidate reference point determination patterns, the decoding end determines the reference point determination pattern corresponding to the current point from these N candidate reference point determination patterns.
[0182] The decoding end determines one reference point candidate determination pattern from N reference point candidate determination patterns as the reference point determination pattern corresponding to the current point in the following ways, including but not limited to:
[0183] Method 1: The decoding end determines the reference point determination mode corresponding to the current point from these N candidate reference point determination modes based on the classification information of the current point.
[0184] For example, if the current point belongs to the first category, then the reference point candidate pattern 'a' among the N reference point candidate determination patterns will be determined as the reference point determination pattern corresponding to the current point.
[0185] For example, if the current point belongs to the second category, then the reference point candidate pattern b among the N reference point candidate determination patterns will be determined as the reference point determination pattern corresponding to the current point.
[0186] Method 2: The decoding end determines the cost of N candidate reference point determination modes; the candidate reference point determination mode with the lowest cost among the N candidate reference point determination modes is determined as the reference point determination mode corresponding to the current point.
[0187] The aforementioned costs can be the sum of squared differences (SSD), the sum of absolute differences (SAD), or the sum of absolute transformed differences (SATD), etc.
[0188] This application does not limit the specific method of determining the cost of N candidate reference point determination modes in the embodiments.
[0189] In one possible implementation, the decoding end selects P points (where P is a positive integer) closest to the current point from the already decoded points according to the decoding order; for the j-th reference point candidate determination pattern among the N reference point candidate determination patterns, the j-th reference point candidate determination pattern is used to predict the P points, and the attribute prediction values of the P points under the j-th reference point candidate determination pattern are obtained, where j is a positive integer; based on the attribute prediction values of the P points under the j-th reference point candidate determination pattern, the cost of the j-th reference point candidate pattern is determined.
[0190] In other words, in this implementation, the decoding end selects the P points closest to the current point from the decoded points according to the decoding order, and uses N reference point candidate determination patterns to predict the P points respectively, so as to obtain the attribute prediction values of the P points corresponding to each of the N reference point candidate determination patterns, and then determines the cost of each reference point candidate determination pattern based on the attribute prediction values of the P points.
[0191] For example, taking the j-th reference point candidate determination pattern out of N reference point candidate determination patterns as an example, the j-th reference point candidate determination pattern is used to predict the attributes of each of the P points, obtaining the attribute prediction value of each of the P points under the j-th reference point candidate determination pattern. Specifically, for the i-th point among the P points, the j-th reference point candidate determination pattern is used to determine K reference points for the i-th point, and the attribute prediction value of the i-th point is determined based on the K reference points for the i-th point. For example, the weighted average of the attribute information of the K reference points for the i-th point is used as the attribute prediction value of the i-th point. Referring to the method for determining the attribute prediction value of the i-th point, the attribute prediction value of each of the P points under the j-th reference point candidate determination pattern can be determined. Then, based on the attribute prediction value of each of the P points under the j-th reference point candidate determination pattern, the cost of the j-th reference point candidate determination pattern is determined.
[0192] The cost of determining the candidate determination mode for the j-th reference point based on the attribute prediction value of each of the P points in the candidate determination mode includes, but is not limited to, the following examples:
[0193] Example 1: Since P points are attribute-decoded points, their respective attribute prediction values have been determined during attribute decoding. For ease of description, these attribute prediction values determined during attribute decoding are denoted as the original attribute prediction values. This allows us to compare the attribute prediction values of the P points under the j-th reference point candidate determination mode 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 the P points under the j-th reference point candidate determination mode and their original attribute prediction values is determined as the cost of the j-th reference point candidate determination mode.
[0194] In some examples, the cost of determining the candidate determination mode for the j-th reference point is as follows:
[0195]
[0196] Where D is the cost of the candidate determination mode for the j-th reference point, ai is the original attribute prediction value of the i-th point among P points, and aij is the attribute prediction value of the i-th point under the candidate determination mode for the j-th reference point.
[0197] Example 2: Based on the attribute prediction values of P points in the candidate determination mode of the j-th reference point, determine the attribute reconstruction values of P points in the candidate determination mode of the j-th reference point; based on the attribute reconstruction values of P points in the candidate determination mode of the j-th reference point and the decoded attribute values of P points, determine the cost of the candidate determination mode of the j-th reference point.
[0198] In Example 2, the bitstream is decoded to obtain the attribute residual values of P points. The attribute prediction values of the P points under the candidate determination mode of the j-th reference point are added to the attribute residual values of the P points to obtain the attribute reconstruction value of each of the P points under the candidate determination mode of the j-th reference point. Since the attribute information of the P points has been decoded, the cost of the candidate determination mode of the j-th reference point is determined based on the attribute reconstruction values of the P points under the candidate determination mode of the j-th reference point and the decoded attribute values of the P points. For example, the cost of the candidate determination mode of the j-th reference point can be determined using cost calculation methods such as SAD, SATD, and SSD.
[0199] Based on the above method, the cost corresponding to each of the N candidate reference point determination patterns can be determined, and then the candidate reference point determination pattern with the lowest cost can be determined as the reference point determination pattern corresponding to the current point.
[0200] After 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 determines K reference points of the current point from the decoded points according to the reference point determination mode corresponding to the current point, as well as at least one of classification information and distance information.
[0201] The specific implementation process of S102-B is described below.
[0202] The above S102-B involves different implementation processes depending on the reference point determination mode corresponding to the current point. Examples include, but are not limited to, the following:
[0203] Case 1: If the reference point determination mode is the first reference point determination mode, this mode uses the K closest decoded points to the current point in the decoding sequence as reference points. Therefore, according to step S102-A above, if the decoding end determines that the reference point determination mode corresponding to the current point is the first reference point determination mode, it determines the K closest decoded points to the current point as K reference points according to the decoding sequence. Optionally, this distance can be Manhattan distance or Euclidean distance, etc.
[0204] Case 2: If the reference point determination mode is the second reference point determination mode, this mode determines K decoded points whose classification information is the same as that of the current point as reference points. Therefore, according to the steps in S102-A above, if the current point's reference point determination mode is determined to be the second reference point determination mode, the decoding end selects K decoded points whose classification information is the same as that of the current point as K reference points, following the decoding order. For example, for the current point, the decoding is performed backward; if a candidate reference point is found that belongs to the same category as the current point, it is retained; otherwise, the search continues until K reference points of the same category as the current point are found.
[0205] The actual effect of scenario 2 is equivalent to first dividing the entire point cloud into multiple parts according to the classification information, and then searching each part independently in the manner of scenario 1.
[0206] Case 3: If the reference point determination mode is the third reference point determination mode, this third reference point is determined based on classification information and distance information. Therefore, according to the steps in S102-A above, if the current point's reference point determination mode is determined to be the third reference point determination mode, the decoder will execute the following steps S102-B1 to S102-B3:
[0207] S102-B1. Determine the weight of the decoded points based on at least one of the classification information and distance information;
[0208] S102-B2, Determine the score of the decoded points based on the weights;
[0209] S102-B3. Based on the scores, determine K reference points from the decoded points.
[0210] In case 3, if the reference point determination mode corresponding to the current point is the third reference point determination mode, then the weight of the decoded point is determined based on at least one of the classification information and distance information. Then, the score of the decoded point is determined based on the weight, and then K reference points are determined from the decoded points based on the score.
[0211] The methods by which S102-B1 determines the weights of decoded points based on at least one of classification information and distance information include, but are not limited to, the following:
[0212] Method 1: Determine the weight of the decoded points based on the classification information. In Method 1, the process of determining the weight of each point among the decoded points is the same. For ease of description, we will take the i-th point among the decoded points as an example. The weight of the i-th point is determined based on the classification information of the i-th point, where i is a positive integer.
[0213] In one implementation of Method 1, different weights are assigned to points of different categories. For example, if the i-th point belongs to the first category, the weight of the i-th point is determined to be W1; if the i-th point belongs to the second category, the weight of the i-th point is determined to be W2. Here, W1 and W2 are preset values or default values.
[0214] In another implementation of this method 1, 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.
[0215] For example, 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 as the first weight;
[0216] For example, if the classification information of the i-th point is inconsistent with the classification information of the current point, then the weight of the i-th point is determined as the second weight.
[0217] This application does not limit the specific values of the first weight and the second weight in its embodiments. In some embodiments, the first weight and the second weight are preset values or default values. In some embodiments, the first weight and the second weight are indicated to the decoding end by the encoding end.
[0218] In this method 1, the weight of each point in the decoded points can be determined by referring to the method for determining the weight of the i-th point.
[0219] In Method 2, the decoding end can also determine the weight of the decoded points based on classification information and distance information.
[0220] Taking the i-th point among the decoded points as an example, we determine weight 1 based on the classification information of the i-th point, and weight 2 based on the distance between the i-th point and the current point. Based on weight 1 and weight 2, we determine the weight of the i-th point.
[0221] In one example, if the classification information of the i-th point is consistent with the classification information of the current point, then the weight 1 of the i-th point is determined as the first weight. As another example, if the classification information of the i-th point is inconsistent with the classification information of the current point, then the weight 1 of the i-th point is determined as the second weight.
[0222] In one example, the reciprocal of the distance between the i-th point and the current point is determined as the weight 2 of the i-th point.
[0223] Next, based on weight 1 and weight 2, determine the weight of the i-th point. For example, the sum of weight 1 and weight 2 of the i-th point is determined as the weight of the i-th point, or the product of weight 1 and weight 2 of the i-th point is determined as the weight of the i-th point.
[0224] Method 3: The decoding end can also determine the weight of the decoded points based on distance information. For example, the reciprocal of the distance from the decoded point to the current point can be used to determine the weight of the decoded point.
[0225] Referring to the above method, the decoding end determines the weight of each point among the decoded points based on at least one of the classification information and distance information, and then executes S102-B2 to determine the score of the decoded points based on the weights.
[0226] The embodiments of this application do not limit the specific implementation of S102-B2 described above.
[0227] In some embodiments, the decoding end uses or converts the weights of the decoded points determined above as a score for those decoded points. That is, the greater the weight of a decoded point, the higher its corresponding score.
[0228] In some embodiments, 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.
[0229] For example, if the weight of the i-th point is determined using method 1 or method 2 above, that is, classification information is considered when determining the weight of the i-th point, then the score of the i-th point can be determined based on the distance information between the i-th point and the current point, and the weight of the i-th point. For example, the product of the distance information between the i-th point and the current point and the weight of the i-th point can be determined as the score of the i-th point.
[0230] For example, the score of the i-th point is determined according to the following formula (2):
[0231] score = weight * dist(2)
[0232] Where weight is the weight of the i-th point, and dist is the distance between the i-th point and the current point.
[0233] Optionally, the decoding end can also perform other calculations 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 application embodiment does not limit this.
[0234] In some embodiments, if classification information is not considered when determining the weight of the i-th point, for example, when using method 3 described above to determine the weight of the i-th point, then the score of the i-th point can be determined using the classification information and the weight 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 this weight and the weight of the i-th point is determined as the score of the i-th point.
[0235] The above example of determining the score of the i-th point illustrates that each point in the decoded points can be determined by referring to the method of the i-th point. Then, based on the scores, K parameter points can be determined from the decoded points.
[0236] For example, the K decoded points with the highest scores among the decoded points are determined as the K reference points for the current point.
[0237] In some embodiments, if the weights of the decoded points are determined using method 1 described above, 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 as the first weight; if the classification information of the i-th point is inconsistent with the classification information of the current point, then the weight of the i-th point is determined as the second weight. If the second weight is greater than the first weight, then the K points with the smallest scores among the decoded points are determined as K reference points.
[0238] In this embodiment, optionally, the first weight is a positive number less than 1, and the second weight is a positive number greater than 1.
[0239] In this application, the decoding end determines K reference points for the current point according to the above method. As can be seen from the above, when determining reference points, this application embodiment considers not only distance information but also classification information, thereby improving the accuracy of reference point determination. When performing attribute prediction based on the accurately determined reference points, the accuracy of attribute prediction can be improved.
[0240] After the decoding end determines the K reference points of the current point, it executes the following step S103.
[0241] S103. Determine the predicted attribute value of the current point based on the attribute information of K reference points.
[0242] In some embodiments, the decoding end directly determines the predicted attribute value of the current point based on the attribute information of K reference points. For example, the weighted average of the attribute information of K reference points is used as the predicted attribute value of the current point.
[0243] In some embodiments, S103 includes the steps S103-A and S103-B.
[0244] S103-A: Determine M prediction points from K reference points, where M is a positive integer less than or equal to K.
[0245] In this embodiment, in order to improve decoding efficiency, M prediction points are determined from K reference points, and the attribute prediction value of the current point is determined based on the attribute information of these M prediction points.
[0246] The specific implementation process of S103-A is described below.
[0247] In this application embodiment, there are multiple ways to determine M prediction points from K reference points. Based on this, the above S103-A includes the following steps:
[0248] S103-A1, Determine the prediction point determination mode corresponding to the current point;
[0249] S103-A2. Based on the prediction point determination pattern, determine M prediction points from K reference points.
[0250] In this embodiment, the decoding end first determines the prediction point determination mode corresponding to the current point from multiple methods of determining M prediction points from K reference points, and then determines M prediction points from K reference points according to the prediction point determination mode.
[0251] In some embodiments, all points in the point cloud share the same prediction point determination mode; that is, the decoder uses a single prediction point determination mode to determine the prediction point of each point in the point cloud. Optionally, this prediction point determination mode can be a default mode. Optionally, the encoder determines a prediction point determination mode from multiple prediction point determination modes and writes the determined prediction point determination mode into the bitstream to indicate this mode to the decoder. The decoder then obtains this prediction point determination mode by decoding the bitstream and uses it to determine the prediction point of all points in the point cloud. Optionally, the encoder may also encode an identifier bit for each point in the point cloud to indicate the prediction point determination mode corresponding to each point.
[0252] In some embodiments, multiple prediction point determination modes can be used in a point cloud. For example, some points in the point cloud may be determined using one prediction point determination mode, while other prediction points may be determined using a different prediction point determination mode.
[0253] This application does not impose any restrictions on the prediction point determination mode.
[0254] In some embodiments, 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. Optionally, 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 classification information.
[0255] The following describes the specific method for determining the prediction point corresponding to the current point in S103-A.
[0256] 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:
[0257] Method 1: Determine the prediction point determination mode corresponding to the current point based on the classification information of the current point.
[0258] In one possible implementation of this method, different categories of points in the point cloud correspond to different prediction point determination modes.
[0259] For example, if the current point belongs to the first category, then the prediction point determination mode is determined as the first prediction point determination mode.
[0260] For example, if the current point belongs to the second category, then the prediction point determination mode is determined to be the second prediction point determination mode.
[0261] The second prediction point determination mode and the first prediction point determination mode are both any one of the first prediction point 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.
[0262] In one example, the correspondence between the point categories in the point cloud and the prediction point determination patterns is shown in Table 2:
[0263] Table 2
[0264] Point classification information Prediction point determination mode Category 1 The first prediction point determination mode Category 2 The second prediction point determination mode … …
[0265] As shown in Table 2 above, different categories of points correspond to different prediction point determination modes. Thus, the decoding end can use the classification information of the current point to query Table 2 above and determine the prediction point determination mode corresponding to the current point.
[0266] In another example, the first and second prediction point determination modes mentioned above are the default modes. For instance, if the current point's category is the first category, the decoder defaults to the second prediction point determination mode, meaning the first prediction point determination mode is the second prediction point determination mode. If the current point's category is the second category, the encoder defaults to the third prediction point determination mode, meaning the second prediction point determination mode is the third prediction point determination mode.
[0267] In another example, the encoder can write the prediction point determination patterns corresponding to different categories into the bitstream. The decoder can then determine the prediction point determination pattern corresponding to the category of the current point by decoding the bitstream. For example, the decoder might decode the bitstream to find the second prediction point determination pattern corresponding to the first category, and the third prediction point determination pattern corresponding to the second category. Thus, if the current point's category is determined to be the first category, the second prediction point determination pattern is adopted as the prediction point determination pattern for the current point; that is, the first prediction point determination pattern becomes the second prediction point determination pattern. If the current point's category is determined to be the second category, the third prediction point determination pattern is adopted as the prediction point determination pattern for the current point; that is, the second prediction point determination pattern becomes the third prediction point determination pattern.
[0268] In another possible implementation of this method one, 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 decoded points.
[0269] For example, if the number of decoded points of the same category as the current point is greater than or equal to a certain preset value, then the prediction point determination mode corresponding to the current point is determined to be a prediction point determination mode.
[0270] For example, if the number of decoded points of the same category as the current point is less than a certain preset value, then the prediction point determination mode corresponding to the current point is determined to be another prediction point determination mode.
[0271] In addition to using Method 1 to determine the prediction point determination mode corresponding to the current point, the decoding end can also use Method 2, Method 3, Method 4 or Method 5 to determine the prediction point determination mode corresponding to the current point.
[0272] Method 2: Determine the prediction point determination pattern based on the classification information of K reference points.
[0273] In one implementation of Method 2, the number of points belonging to different categories among the K reference points is determined, and the prediction point determination pattern corresponding to the category with the most points is determined as the prediction point determination pattern corresponding to the current point. For example, among the K reference points, the number of points belonging to the first category is the largest, as shown in Representation 2. The first category corresponds to the first prediction point determination pattern, and thus the first prediction point determination pattern is determined as the prediction point determination pattern corresponding to the current point.
[0274] In another implementation of Method 2, the prediction point determination mode corresponding to the current point is determined based on the classification information of K reference points and the current point.
[0275] For example, if the number of reference points among the K reference points that belong to the same category as the current point is greater than or equal to the first threshold, then the prediction point determination mode is determined to be the third prediction point determination mode.
[0276] For example, 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.
[0277] Method 3: The prediction point determination mode corresponding to the current point is the default mode. That is, both the decoding and encoding ends use the default mode to determine the prediction point of the current point.
[0278] Optionally, the above default mode can be any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
[0279] Method 4: Decode the point cloud bitstream to obtain the 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 based on the second identifier.
[0280] In this fourth method, after determining the prediction point determination mode corresponding to the current point, the encoding end instructs the decoding end to indicate the prediction point determination mode. Specifically, a second identifier is written into the bitstream, and this second identifier indicates the prediction point determination mode corresponding to the current point. In this way, the decoding end can obtain the second identifier by decoding the bitstream, and then determine the prediction point determination mode corresponding to the current point based on the second identifier.
[0281] Optionally, the second identifier can be an index for determining the pattern of the predicted point.
[0282] In one possible implementation of this method four, the encoder can encode a second identifier for each point in the point cloud to indicate the prediction point determination mode corresponding to that point.
[0283] In one possible implementation of this method four, if the prediction point determination mode corresponding to each point in the point cloud is the same, the encoder can write a second identifier into the bit stream. This second identifier is used to indicate the prediction point determination mode corresponding to all points in the point cloud.
[0284] In one possible implementation of this fourth method, if the prediction point determination patterns corresponding to different categories of points are different, the encoder can encode different second identifiers for points of different categories. For example, the second identifier corresponding to the first type of point cloud is B1, and the second identifier corresponding to the second type of point cloud is B2. In this way, 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 pattern corresponding to the current point based on the second identifier. For example, if the current point is a first type of point cloud, the decoder will determine the prediction point determination pattern corresponding to the second identifier B1 as the prediction point determination pattern corresponding to the current point; if the current point is a second type of point cloud, the decoder will determine the prediction point determination pattern corresponding to the second identifier B2 as the prediction point determination pattern corresponding to the current point.
[0285] Method 5: The decoding end determines the prediction point determination mode corresponding to the current point using an adaptive method. In this case, S103-A includes the following steps:
[0286] S103-A1: Obtain Q candidate prediction modes, where Q is a positive integer greater than 1;
[0287] S103-A2. From Q candidate prediction point determination patterns, determine one prediction point candidate determination pattern as the prediction point determination pattern corresponding to the current point.
[0288] The aforementioned Q candidate prediction point determination modes are any Q modes among the aforementioned first prediction point determination mode, second prediction point determination mode, and third prediction point determination mode.
[0289] In some embodiments, the above-mentioned Q prediction point candidate determination mode is the encoding and decoding default.
[0290] In some embodiments, the encoder determines Q candidate prediction point determination modes from the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode, and indicates the determined Q candidate prediction point determination modes to the decoder.
[0291] In some embodiments, the decoding end can also obtain Q candidate prediction point determination patterns through other methods, and this application embodiment does not limit this. After obtaining the Q candidate prediction point determination patterns, the decoding end determines the prediction point determination pattern corresponding to the current point from these Q candidate prediction point determination patterns.
[0292] The decoding end determines one prediction point candidate determination pattern from Q prediction point candidate determination patterns as the prediction point determination pattern corresponding to the current point in the following ways, including but not limited to:
[0293] Method 1: The decoding end determines the prediction point determination mode corresponding to the current point from the Q candidate prediction point determination modes based on the classification information of the current point.
[0294] For example, if the current point belongs to the first category, then the prediction point candidate pattern 'a' among the Q prediction point candidate determination patterns will be determined as the prediction point determination pattern corresponding to the current point.
[0295] For example, if the current point belongs to the second category, then the prediction point candidate pattern b among the Q prediction point candidate determination patterns will be determined as the prediction point determination pattern corresponding to the current point.
[0296] Method 2: The decoding end determines the cost of the Q candidate prediction point determination modes; based on the cost of the Q candidate prediction point determination modes, the prediction point determination mode corresponding to the current point is determined.
[0297] The aforementioned costs can be the sum of squared differences (SSD), the sum of absolute differences (SAD), or the sum of absolute transformed differences (SATD), etc.
[0298] In some embodiments, the maximum difference in attributes can also be determined as the cost.
[0299] This application does not limit the specific method by which the cost of determining the candidate prediction modes for Q prediction points is determined in the embodiments.
[0300] In one possible implementation, the decoding end selects P points (where P is a positive integer) closest to the current point from the already decoded points according to the decoding order; for the j-th prediction point candidate determination pattern among the Q prediction point candidate determination patterns, the j-th prediction point candidate determination pattern is used to predict the P points, and the attribute prediction values of the P points under the j-th prediction point candidate determination pattern are obtained, where j is a positive integer; based on the attribute prediction values of the P points under the j-th prediction point candidate determination pattern, the cost of the j-th prediction point candidate pattern is determined.
[0301] In other words, in this implementation, the decoding end selects the P points closest to the current point from the decoded points according to the decoding order, and uses Q prediction point candidate determination modes to predict the P points respectively, so as to obtain the attribute prediction values of the P points corresponding to each prediction point candidate determination mode in the Q prediction point candidate determination modes, and then determines the cost of each prediction point candidate determination mode based on the attribute prediction values of the P points.
[0302] For example, taking the j-th prediction point candidate determination pattern among Q prediction point candidate determination patterns as an example, the j-th prediction point candidate determination pattern is used to predict the attributes of each of the P points, obtaining the attribute prediction value of each of the P points under the j-th prediction point candidate determination pattern. Specifically, for the i-th point among the P points, the j-th prediction point candidate determination pattern is used to determine M prediction points for the i-th point. Based on the M prediction points for the i-th point, the attribute prediction value of the i-th point is determined, for example, by taking the weighted average of the attribute information of the M prediction points for the i-th point as the attribute prediction value of the i-th point. Referring to the method for determining the attribute prediction value of the i-th point, the attribute prediction value of each of the P points under the j-th prediction point candidate determination pattern can be determined. Then, based on the attribute prediction value of each of the P points under the j-th prediction point candidate determination pattern, the cost of the j-th prediction point candidate determination pattern is determined.
[0303] The cost of determining the candidate determination mode for the j-th prediction point based on the attribute prediction value of each of the P points in the candidate determination mode for the j-th prediction point can be included in, but is not limited to, the following examples:
[0304] Example 1: Since P points are attribute-decoded points, their respective attribute prediction values have been determined during attribute decoding. For ease of description, these attribute prediction values determined during attribute decoding are denoted as the original attribute prediction values. This allows us to compare the attribute prediction values of the P points under the candidate determination mode for the j-th prediction point with the original attribute prediction values to determine the cost of the candidate determination mode for the j-th prediction point. For example, the sum of the differences between the attribute prediction values of the P points under the candidate determination mode for the j-th prediction point and the original attribute prediction values of these P points is determined as the cost of the candidate determination mode for the j-th prediction point.
[0305] Example 2: Based on the attribute prediction values of P points in the candidate determination mode of the j-th prediction point, determine the attribute reconstruction values of P points in the candidate determination mode of the j-th prediction point; based on the attribute reconstruction values of P points in the candidate determination mode of the j-th prediction point and the decoded attribute values of P points, determine the cost of the candidate determination mode of the j-th prediction point.
[0306] In Example 2, the bitstream is decoded to obtain the attribute residual values of P points. The attribute prediction values of the P points in the candidate prediction mode of the j-th prediction point are added to the attribute residual values of the P points to obtain the attribute reconstruction value of each of the P points in the candidate prediction mode of the j-th prediction point. Since the attribute information of the P points has been decoded, the cost of the candidate prediction mode of the j-th prediction point is determined based on the attribute reconstruction values of the P points in the candidate prediction mode of the j-th prediction point and the decoded attribute values of the P points. For example, the cost of the candidate prediction mode of the j-th prediction point can be determined using cost calculation methods such as SAD, SATD, and SSD. In some embodiments, the maximum difference in attributes among the P points can also be determined as the cost of the candidate prediction mode of the j-th prediction point.
[0307] Based on the above method, the cost corresponding to each of the N candidate prediction point determination modes can be determined, and then the prediction point determination mode can be determined based on the cost of the Q candidate prediction point determination modes.
[0308] For example, the candidate prediction point determination pattern with the lowest cost is determined as the prediction point determination pattern corresponding to the current point.
[0309] For example, if the cost is less than a certain preset value, 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.
[0310] After the decoding end 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.
[0311] The specific implementation process of S103-B is described below.
[0312] 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:
[0313] Case 1: If the prediction point determination mode is the first prediction point determination mode, which determines K reference points as prediction points. Therefore, according to the steps in S103-A above, if the current point is determined to be determined as the first prediction point determination mode, the K reference points are determined as M prediction points, where M equals K.
[0314] Case 2: If the prediction point determination mode is the second prediction point determination mode, which determines one of the K reference points as the prediction point. Therefore, according to the steps in S103-A above, if the current point is determined to be determined as the second prediction point determination mode, the decoder selects one reference point from the K reference points and determines it as the prediction point. In this case, M equals 1.
[0315] The methods for selecting a reference point from K reference points to determine the prediction point include at least the following examples:
[0316] Example 1: Select the reference point that is closest to the current point from among the K reference points as the prediction point.
[0317] Example 2: Decode the point cloud bitstream to obtain the first index corresponding to the current point. The first index indicates the first reference point, which is the reference point among K reference points whose attribute information is closest to that of the current point. The first reference point corresponding to the first index among the K reference points is then determined as the prediction point. That is, the encoder determines the first reference point among the K reference points whose attribute information is closest to that of the current point, and designates this first reference point as the prediction point for the current point. Simultaneously, the encoder writes the index of this first reference point (the first index) into the bitstream. The decoder then obtains this first index by decoding the bitstream, and further designates the reference point corresponding to this first index among the K reference points as the first reference point, and then designates this first reference point as a prediction point.
[0318] In some embodiments, the bitstream may include indication information indicating whether the prediction point is determined in the manner of Example 1 or in the manner of Example 2.
[0319] Case 3: If the prediction point determination mode is the third prediction point determination mode, the third prediction point is determined based on classification information and distance information. Therefore, according to the steps in S103-A above, if the current point is determined to be determined as the third prediction point determination mode, the decoder will determine the M reference points among the K reference points that have the same classification information as the current point and are closest to the current point as the M prediction points.
[0320] After determining M prediction points from K reference points using the method described above, the decoding end executes the following steps S103-B.
[0321] S103-B: Determine the attribute prediction value of the current point based on the attribute information of M prediction points.
[0322] In some embodiments, if M=1 is determined according to the above steps, that is, there is 1 prediction point, then the attribute information of the prediction point is determined as the attribute prediction value of the current point.
[0323] In some embodiments, if M is greater than 1, that is, when the current point includes multiple prediction points, then S103-B above includes the following steps:
[0324] S103-B1. Determine the calculation method for the predicted value based on the classification information of M prediction points;
[0325] S103-B2. Based on the prediction calculation method and the attribute information of M prediction points, determine the attribute prediction value of the current point.
[0326] This application does not limit the specific method of calculating the predicted value in the embodiments.
[0327] In some embodiments, the above-mentioned 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.
[0328] In this embodiment, if the current point includes multiple prediction points, the method for calculating the prediction value corresponding to the current point is first determined before determining the attribute prediction value of the current point based on the prediction points.
[0329] Specifically, based on the classification information of the M prediction points, the prediction value calculation method is determined. In other words, in this embodiment of the application, different prediction value calculation methods are set for different point cloud categories, which further improves the accuracy of attribute prediction value calculation.
[0330] The implementation methods of S103-B1 mentioned above include at least the following:
[0331] Method 1: 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 the second threshold, then the prediction value calculation method is determined to be the first prediction value calculation method; if the number of prediction points of the same category as the current point among the M prediction points is less than the second threshold, then the prediction value calculation method is determined to be the second prediction value calculation method. In this case, the first prediction value calculation method and the second prediction value calculation method are any one of the first prediction value calculation method, the second prediction value calculation method, and the third prediction value calculation method, and the first prediction value calculation method and the second prediction value calculation method are different.
[0332] Method 2: If the categories of the M predicted points and the current point are all in the first category, then the predicted value calculation method is determined to be the third predicted value calculation method; if the categories of the M predicted points and the current point are all in the second category, then the predicted value calculation method is determined to be the fourth predicted value calculation method. In this case, the third and fourth predicted value calculation methods are any one of the first, second, and third predicted value calculation methods, and the third predicted value calculation method is different from the fourth predicted value calculation method.
[0333] After determining the prediction value calculation method corresponding to the current point according to 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 M prediction points.
[0334] 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:
[0335] Case 1: If the prediction value is calculated using the first prediction value calculation method, which is a weighted method, then 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. Based on the first weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
[0336] For example, the decoding end determines the attribute prediction value of the current point according to the following formula (3):
[0337]
[0338] Where Y is the predicted attribute value of the current point, M is the number of predicted points, and W... i Let P be the first weight of the i-th prediction point out of M prediction points. i The attribute information for the i-th prediction point.
[0339] Scenario 2: If the prediction value is calculated using a second prediction value calculation method, which is a different weighting method, then the decoder determines the second weight of each prediction point among the M prediction points based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights. Based on the second weight of each prediction point among the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
[0340] The first prediction method described above uses the reciprocal of the distance as the weight of each prediction point. When calculating Euclidean distance, it considers that the distribution of the point cloud along the x, y, and z axes 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 assigned to different directional axes.
[0341] In one example, the second weight of the predicted point is determined according to the following formula (4):
[0342]
[0343] Where i is the current point, and j is the j-th prediction point out of M prediction points. The second weight for the j-th prediction point, (x i y i , z i (x) represents the coordinates of the current point. ij y ij , z ij ) represents the coordinates of the j-th prediction point among the M prediction points of the current point, and a, b, and c are the weights corresponding to the x, y, and z axes.
[0344] The embodiments of this application do not limit the specific values of a, b, and c. In one example, a and b are 1.
[0345] The second weight of each of the M prediction points is determined according to the above formula (4). Then, the attribute information of the M prediction points is weighted according to the second weight of each of the M prediction points to obtain the attribute prediction value of the current point.
[0346] In one example, the predicted attribute value for the current point is determined according to the following formula (5):
[0347]
[0348] in, The predicted attribute value for the current point. This refers to the attribute information of the j-th prediction point out of M prediction points.
[0349] Scenario 3: If the predicted value is calculated using a third prediction method, this method involves determining M+1 predicted values based on M predicted points, and then selecting the attribute predicted value for the current point from these M+1 predicted values. In this case, the decoder first determines the weighted average of the attributes of the M predicted points and uses this weighted average as a predicted value; it then determines M predicted values based on the attribute information of the M predicted points; and finally, it determines the attribute predicted value for the current point based on the determined predicted value and the M predicted values.
[0350] In scenario 3, the decoder determines M+1 attribute prediction values. Specifically, this includes one attribute prediction value determined by the weighted average of the attributes of the M prediction points, and M attribute prediction values determined based on the attribute information of the M prediction points. For example, the attribute information of the M prediction points is used to determine the M attribute prediction values. Then, the attribute prediction value for the current point is determined from these M+1 attribute prediction values. For instance, the decoder decodes the point cloud bitstream to obtain a second index, which indicates the target prediction value. The target prediction value corresponding to this second index among the M+1 prediction values is then determined as the attribute prediction value for the current point.
[0351] As can be seen from the above, the weighting methods involved in the embodiments of this application include at least the two types shown in Case 1 and Case 2. Therefore, in Case 3, before determining the weighted average of the attributes of the M prediction points, it is necessary to first determine the target weighted average method, and then use the target weighted average method to determine the weighted average of the attributes of the M prediction points.
[0352] The embodiments of this application do not limit the specific method of the target weighted average.
[0353] In some embodiments, the target weighted average method is either a first weighted average method or a second weighted average method. Optionally, the first weighted average method is the weighting method in case 1 above, and the second weighted average method is the weighting method in case 2 above.
[0354] In some embodiments, the above target weighted average method is the default method.
[0355] In some embodiments, the target weighted average method is determined based on the classification information of the M prediction points.
[0356] For example, if the number of predicted points of the same category as the current point among the M predicted points is greater than or equal to the second threshold, then the target weighted average method is determined to be the first weighted average method; if the number of predicted points of the same category as the current point among the M predicted points is less than the second threshold, then the target weighted average method is determined to be the second weighted average method. The first weighted average method and the second weighted average method are either the first weighted average method or the second weighted average method, and the first weighted average method and the second weighted average method are different.
[0357] For example, if the categories of the M predicted points and the current point are all the first category, then 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 all the second category, then the target weighted average method is determined to be the fourth weighted average method. The third and fourth weighted average methods are either the first or the second weighted average methods, and the third and fourth weighted average methods are different.
[0358] In some embodiments, if the target weighted calculation method is the first weighted average method, then the reciprocal of the distance between each of the M predicted points and the current point is determined as the first weight of each of the M predicted points; based on the first weight of each of the M predicted points, the attribute information of the M predicted points is weighted to obtain the attribute weighted average of the M predicted points. Specifically, refer to the description of formula (3) above.
[0359] In some embodiments, if the target weighted calculation method is the second weighted average method, then for each of the M prediction points, the second weight of the prediction point is determined based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights; based on the second weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute weighted average of the M prediction points. Specifically, refer to the description of formulas (4) and (5) above.
[0360] Based on the description in S103 above, the decoding end determines the attribute prediction value of the current point, and then executes the following step S104.
[0361] S104. Determine the reconstructed attribute value of the current point based on the predicted attribute value of the current point.
[0362] For example, the decoding end decodes the bitstream 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 the attribute prediction value. For instance, 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.
[0363] The point cloud encoding method provided in this application determines the classification information of the current point and decoded points in the point cloud, and / or the distance information between the decoded points and the current point. The classification information is used to indicate the category to which the point belongs. Based on at least one of the classification information and distance information, K reference points are determined from the decoded points, where K is a positive integer. Based on the attribute information of the K reference points, the attribute prediction value of the current point is determined. Based on the attribute prediction value of the current point, the attribute reconstruction value of the current point is determined. Since the attribute information of points of the same category is relatively similar, this application embodiment considers not only distance information but also classification information when determining reference points, thereby improving the accuracy of reference point determination. When performing attribute prediction based on the accurately determined reference points, the accuracy of attribute prediction can be improved.
[0364] The above describes the point cloud decoding method provided in this application embodiment using the decoding end as an example. The following describes the point cloud encoding method provided in this application embodiment using the encoding end as an example.
[0365] Figure 6 This is a schematic flowchart of a point cloud encoding method provided in an embodiment of this application. The point cloud encoding method in this embodiment can be derived from the above... Figure 1 or Figure 2 The point cloud encoding device shown has been completed.
[0366] like Figure 6 As shown, the point cloud decoding method in this application includes:
[0367] S201. Determine the classification information of the current point and the encoded points in the point cloud, and / or the distance information between the encoded points and the current point.
[0368] The classification information is used to indicate the category to which a point in the point cloud belongs.
[0369] In some embodiments, classification information can be understood as the real-world category to which the points in the point cloud belong, such as roads, cars, pedestrians, etc.
[0370] In this embodiment, the classification information of the current point and the encoded points, and / or the distance information between the encoded points and the current point are determined. Then, based on the classification information and / or the distance information, K reference points for the current point are determined from the encoded points. Since the attribute information of points of the same category is relatively similar, this embodiment considers not only distance information but also classification information when determining reference points, thereby improving the accuracy of reference point determination. Based on these accurately determined reference points, the accuracy of attribute prediction can be improved.
[0371] The specific process for determining the classification information of the current point and the encoded points in the point cloud is the same in the embodiments of this application.
[0372] The methods for determining the classification information of the current point and the encoded points in the point cloud in S201 above include, but are not limited to, the following:
[0373] Method 1 involves geometric encoding (also known as positional encoding) of the point cloud before attribute encoding, obtaining the geometric information of the points in the point cloud. The point cloud is then segmented based on this geometric information to obtain classification information, which in turn determines the classification information of the current point and the already encoded points.
[0374] Method 2 involves including classification information for the points in the point cloud bitstream. The encoder then obtains the classification information for the current point and the previously encoded points by encoding the point cloud bitstream. For example, the encoder writes the category identifier of each point in the point cloud into the bitstream. By encoding the bitstream, the encoder obtains the category identifiers for the current point and the previously encoded points, and then determines the classification information based on these identifiers.
[0375] Method 3 uses a pre-trained neural network model to predict the classification information of the current point and the encoded points.
[0376] Since the geometric encoding of the point cloud has been completed before the attribute encoding, 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 current point.
[0377] This application does not limit the specific method for determining the distance between the encoded point and the current point.
[0378] In one example, the Manhattan distance between the encoded point and the current point is determined according to the Manhattan distance calculation method.
[0379] In another example, the Euclidean distance between the encoded point and the current point is determined according to the Euclidean distance calculation method.
[0380] This application embodiment does not limit the specific number of encoded points for determining classification information and distance information.
[0381] In some embodiments, the L encoded points preceding the current point in the encoding order are taken as the research objects, and the classification information of the current point and these L encoded points is determined, and / or the distance from each of these L encoded points to the current point is determined, where L is a positive integer.
[0382] The encoding order in this application embodiment can be any one of the following: the original input order of the points in the point cloud, the Morton order, the Hilbert order, or the LOD order. The Morton order can be understood as converting the coordinates of the points in the point cloud into Morton codes, and then sorting the point cloud according to the Morton code size in ascending order. Similarly, the Hilbert order can be understood as converting the coordinates of the points in the point cloud into Hilbert codes, and then sorting the point cloud according to the Hilbert code size in ascending order.
[0383] The classification information of the current point and the encoded points, and / or the distance information between the encoded points and the current point can be determined using the above method. Then, the following step S202 is executed.
[0384] S202. Determine K reference points for the current point from the coded points based on at least one of the classification information and distance information.
[0385] In some embodiments, the encoder determines K reference points for the current point from the encoded points based on the classification information of the current point and the encoded points. For example, the encoder determines the K encoded points that are closest to the current point in the encoding order and have the same category as the current point as the K reference points for the current point.
[0386] In some embodiments, the encoder determines K reference points for the current point from among the encoded points based on the classification information of the current point and the encoded points, as well as the distance between the encoded points and the current point. For example, the encoder determines the K encoded points whose category is the same as the current point and which are closest to the current point as the K reference points for the current point.
[0387] In some embodiments, the encoder determines K reference points for the current point from among the coded points based on the distances between the coded points and the current point. For example, the encoder determines the K coded points closest to the current point as the K reference points for the current point.
[0388] In some embodiments, the present application includes multiple methods for determining the reference point. In this case, S202 above includes the following steps S202-A and S202-B:
[0389] S202-A, Determine the reference point determination mode corresponding to the current point.
[0390] S202-B: Determine K reference points for the current point from the coded points based on the reference point determination pattern and at least one of classification information and distance information.
[0391] In this embodiment, if there are multiple ways to determine reference points, when the encoder determines the reference points of the current point, it first needs to determine the reference point determination mode corresponding to the current point, and then determine K reference points of the current point from the encoded points based on the determination of the reference point determination mode, as well as at least one of classification information and distance information.
[0392] In some embodiments, all points in the point cloud share the same reference point determination mode; that is, the encoder uses a single reference point determination mode to determine the reference point for each point in the point cloud. Optionally, this reference point determination mode can be a default mode. Optionally, the encoder determines a reference point determination mode from multiple reference point determination modes and writes the determined reference point determination mode into the bitstream, indicating this mode to the encoder. The decoder then obtains this reference point determination mode through the encoded bitstream and uses it to determine the reference point for all points in the point cloud. Optionally, the encoder may also encode an identifier bit for each point in the point cloud to indicate the reference point determination mode corresponding to each point.
[0393] In some embodiments, multiple reference point determination modes can be used in a point cloud. For example, some points in the point cloud may be determined using one reference point determination mode, while other reference points may be determined using a different reference point determination mode.
[0394] This application does not impose any restrictions on the reference point determination mode.
[0395] In some embodiments, 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. Optionally, 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.
[0396] The following describes the specific method for determining the reference point corresponding to the current point in S202-A.
[0397] The methods for determining the reference point corresponding to the current point in S202-A above include, but are not limited to, the following:
[0398] Method 1: Determine the reference point determination mode corresponding to the current point based on the classification information of the current point.
[0399] In one possible implementation of this method, different categories of points in the point cloud correspond to different reference point determination modes.
[0400] For example, if the current point belongs to the first category, then the reference point determination mode is determined as the first reference point determination mode.
[0401] For example, if the current point belongs to the second category, then the reference point determination mode is determined to be the second reference point determination mode.
[0402] The second reference point determination mode and the first reference point determination mode are both any one of the first reference point 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.
[0403] In one example, the correspondence between the point categories in the point cloud and the reference point determination patterns is shown in Table 1. The encoder can then use the classification information of the current point to query Table 1 and determine the corresponding reference point determination pattern.
[0404] In another example, the first and second reference point determination modes mentioned above are the default modes. For instance, if the current point's category is the first category, the encoder defaults to determining the reference point corresponding to the current point as the second reference point determination mode, meaning the first reference point determination mode is the second reference point determination mode. If the current point's category is the second category, the encoder defaults to determining the reference point corresponding to the current point as the third reference point determination mode, meaning the second reference point determination mode is the third reference point determination mode.
[0405] In some embodiments, the first reference point determination mode and the second determination mode are indicated by the user. In this case, the decoding end indicates the first reference point determination mode and the second determination mode to itself.
[0406] In some embodiments, the encoder can write the reference point determination pattern corresponding to different categories into the bitstream, so that the decoder can determine the reference point determination pattern corresponding to the category to which the current point belongs through the encoded bitstream.
[0407] In another possible implementation of this method one, 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 encoded points.
[0408] For example, if the number of encoded points of the same category as the current point is greater than or equal to a certain preset value, then the reference point determination mode corresponding to the current point is determined to be a reference point determination mode.
[0409] For example, if the number of encoded points of the same category as the current point is less than a certain preset value, then the reference point determination mode corresponding to the current point is determined to be another reference point determination mode.
[0410] In addition to using Method 1 above to determine the reference point determination mode corresponding to the current point, the encoding end can also use Method 2, Method 3 or Method 4 below to determine the reference point determination mode corresponding to the current point.
[0411] Method 2: The reference point for the current point is determined using the default mode. In other words, both the encoder and decoder use the default mode to determine the reference point for the current point.
[0412] Optionally, the above default mode can be any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
[0413] Method 3: The reference point corresponding to the current point is determined by the encoding end based on the cost, or it is randomly selected.
[0414] In this third method, the encoding writes a first identifier into the point cloud code stream, which is used to indicate the reference point determination mode corresponding to the current point.
[0415] Optionally, the first identifier can be an index for determining the pattern of the reference point.
[0416] In one possible implementation of this third method, the encoder can encode a first identifier for each point in the point cloud to indicate the reference point determination mode corresponding to that point.
[0417] In one possible implementation of this third method, if the reference point determination mode corresponding to each point in the point cloud is the same, the encoding end can write a first identifier into the bit stream. This first identifier is used to indicate the reference point determination mode corresponding to all points in the point cloud.
[0418] In one possible implementation of this third method, if different categories of points correspond to different reference point determination patterns, the encoder can encode different first identifiers for points of different categories. For example, the first identifier for a first-class point cloud is B1, and the first identifier for a second-class point cloud is B2. The decoder can then determine the first identifier corresponding to the current point based on the current point's classification information, and further determine the reference point determination pattern corresponding to the current point based on the first identifier. For example, if the current point is a first-class point cloud, the decoder will determine the reference point determination pattern corresponding to the first identifier B1 as the reference point determination pattern corresponding to the current point; if the current point is a second-class point cloud, the decoder will determine the reference point determination pattern corresponding to the first identifier B2 as the reference point determination pattern corresponding to the current point.
[0419] Method four: The encoding end determines the reference point determination mode corresponding to the current point using an adaptive method. In this case, S202-A includes the following steps:
[0420] S202-A1: Obtain N candidate reference point determination patterns, where N is a positive integer;
[0421] S202-A2: From N candidate reference point determination patterns, determine one reference point candidate determination pattern as the reference point determination pattern corresponding to the current point.
[0422] The above N candidate reference point determination modes are any N modes among the above first reference point determination mode, second reference point determination mode and third reference point determination mode.
[0423] In some embodiments, the above N reference point candidate determination modes are the encoding default.
[0424] In some embodiments, the encoder determines N candidate reference point determination modes from the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode, and instructs the encoder to determine the N candidate reference point determination modes.
[0425] In some embodiments, the encoding end may also obtain N candidate reference point determination patterns through other methods, and this application embodiment does not limit this. After obtaining N candidate reference point determination patterns, the encoding end determines the reference point determination pattern corresponding to the current point from these N candidate reference point determination patterns.
[0426] The methods by which the encoding end determines one reference point candidate determination pattern from N reference point candidate determination patterns as the reference point determination pattern corresponding to the current point include, but are not limited to, the following:
[0427] Method 1: The encoding end determines the reference point determination mode corresponding to the current point from these N candidate reference point determination modes based on the classification information of the current point.
[0428] For example, if the current point belongs to the first category, then the reference point candidate pattern 'a' among the N reference point candidate determination patterns will be determined as the reference point determination pattern corresponding to the current point.
[0429] For example, if the current point belongs to the second category, then the reference point candidate pattern b among the N reference point candidate determination patterns will be determined as the reference point determination pattern corresponding to the current point.
[0430] Method 2: The encoding end determines the cost of N candidate reference point determination modes; the candidate reference point determination mode with the lowest cost among the N candidate reference point determination modes is determined as the reference point determination mode corresponding to the current point.
[0431] The aforementioned costs can be the sum of squared differences (SSD), the sum of absolute differences (SAD), or the sum of absolute transformed differences (SATD), etc.
[0432] This application does not limit the specific method of determining the cost of N candidate reference point determination modes in the embodiments.
[0433] In one possible implementation, the encoder selects P points (where P is a positive integer) closest to the current point from the already encoded points according to the encoding order; for the j-th reference point candidate determination pattern among the N reference point candidate determination patterns, the j-th reference point candidate determination pattern is used to predict the P points, obtaining the attribute prediction values of the P points under the j-th reference point candidate determination pattern, where j is a positive integer; based on the attribute prediction values of the P points under the j-th reference point candidate determination pattern, the cost of the j-th reference point candidate pattern is determined.
[0434] The cost of determining the candidate determination mode for the j-th reference point based on the attribute prediction value of each of the P points in the candidate determination mode includes, but is not limited to, the following examples:
[0435] Example 1: Since P points are attribute-encoded points, their respective attribute prediction values were determined during attribute encoding. For ease of description, these attribute prediction values determined during the attribute encoding process are denoted as the original attribute prediction values. This allows us to compare the attribute prediction values of the P points under the j-th reference point candidate determination mode 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 the P points under the j-th reference point candidate determination mode and their original attribute prediction values is determined as the cost of the j-th reference point candidate determination mode.
[0436] In some examples, the cost of determining the candidate determination mode of the j-th reference point is based on the following formula (1).
[0437] Example 2: Based on the attribute prediction values of P points in the candidate determination mode of the j-th reference point, determine the attribute reconstruction values of P points in the candidate determination mode of the j-th reference point; based on the attribute reconstruction values of P points in the candidate determination mode of the j-th reference point and the encoded attribute values of P points, determine the cost of the candidate determination mode of the j-th reference point.
[0438] In Example 2, the bitstream is encoded to obtain the attribute residual values of P points. The attribute prediction values of the P points under the candidate determination mode of the j-th reference point are added to the attribute residual values of the P points to obtain the attribute reconstruction value of each of the P points under the candidate determination mode of the j-th reference point. Since the attribute information of the P points has been encoded, the cost of the candidate determination mode of the j-th reference point is determined based on the attribute reconstruction values of the P points under the candidate determination mode of the j-th reference point and the encoded attribute values of the P points. For example, the cost of the candidate determination mode of the j-th reference point can be determined using cost calculation methods such as SAD, SATD, and SSD.
[0439] Based on the above method, the cost corresponding to each of the N candidate reference point determination patterns can be determined, and then the candidate reference point determination pattern with the lowest cost can be determined as the reference point determination pattern corresponding to the current point.
[0440] After the encoding end determines the reference point determination mode corresponding to the current point according to the above method, it executes the above step S202-B, and determines K reference points of the current point from the encoded points according to the reference point determination mode corresponding to the current point, as well as at least one of classification information and distance information.
[0441] The specific implementation process of S202-B is described below.
[0442] The above S202-B involves different implementation processes depending on the reference point determination mode corresponding to the current point. Examples include, but are not limited to, the following:
[0443] Scenario 1: If the reference point determination mode is the first reference point determination mode, this mode uses the K nearest coded points to the current point in the encoding order as reference points. In this case, the K nearest coded points to the current point are determined as K reference points according to the encoding order. Optionally, this distance can be Manhattan distance or Euclidean distance, etc.
[0444] Scenario 2: If the reference point determination mode is the second reference point determination mode, this mode determines K coded points whose classification information is the same as that of the current point as reference points. In this case, following the encoding order, K coded points whose classification information matches that of the current point are selected as K reference points. For example, for the current point, the search proceeds backwards according to the encoding order. If a candidate reference point found belongs to the same category as the current point, it is retained; otherwise, the search continues until k reference points of the same category as the current point are found.
[0445] The actual effect of scenario 2 is equivalent to first dividing the entire point cloud into multiple parts according to the classification information, and then searching each part independently in the manner of scenario 1.
[0446] Case 3: If the reference point determination mode is the third reference point determination mode, this third reference point is determined based on classification information and distance information. Therefore, according to the steps in S202-A above, if the reference point determination mode corresponding to the current point is determined to be the third reference point determination mode, the encoder will execute the following steps S202-B1 to S202-B3:
[0447] S202-B1. Determine the weight of the encoded points based on at least one of the classification information and distance information;
[0448] S202-B2, Determine the score of the encoded points based on the weights;
[0449] S202-B3. Based on the scores, determine K reference points from the coded points.
[0450] In case 3, if the reference point determination mode corresponding to the current point is the third reference point determination mode, then the weight of the encoded point is determined based on at least one of the classification information and distance information. Then, the score of the encoded point is determined based on the weight, and then K reference points are determined from the encoded points based on the score.
[0451] The methods by which S202-B1 above determines the weights of encoded points based on at least one of classification information and distance information include, but are not limited to, the following:
[0452] Method 1: Determine the weight of the encoded points based on the classification information. In Method 1, the process of determining the weight of each encoded point is the same. For ease of description, we will take the i-th encoded point as an example. The weight of the i-th point is determined based on the classification information of the i-th point, where i is a positive integer.
[0453] In one implementation of Method 1, different weights are assigned to points of different categories. For example, if the i-th point belongs to the first category, the weight of the i-th point is determined to be W1; if the i-th point belongs to the second category, the weight of the i-th point is determined to be W2. Here, W1 and W2 are preset values or default values.
[0454] In another implementation of this method 1, 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.
[0455] For example, 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 as the first weight;
[0456] For example, if the classification information of the i-th point is inconsistent with the classification information of the current point, then the weight of the i-th point is determined as the second weight.
[0457] The embodiments of this application do not impose restrictions on the specific values of the first weight and the second weight.
[0458] In this method 1, the weight of each point among the encoded points can be determined by referring to the method for determining the weight of the i-th point.
[0459] In Method 2, the encoding end can also determine the weight of the encoded points based on classification information and distance information.
[0460] Taking the i-th point among the encoded points as an example, we determine weight 1 based on the classification information of the i-th point, and weight 2 based on the distance between the i-th point and the current point. Based on weight 1 and weight 2, we determine the weight of the i-th point.
[0461] In one example, if the classification information of the i-th point is consistent with the classification information of the current point, then the weight 1 of the i-th point is determined as the first weight. As another example, if the classification information of the i-th point is inconsistent with the classification information of the current point, then the weight 1 of the i-th point is determined as the second weight.
[0462] In one example, the reciprocal of the distance between the i-th point and the current point is determined as the weight 2 of the i-th point.
[0463] Next, based on weight 1 and weight 2, determine the weight of the i-th point. For example, the sum of weight 1 and weight 2 of the i-th point is determined as the weight of the i-th point, or the product of weight 1 and weight 2 of the i-th point is determined as the weight of the i-th point.
[0464] Method 3: The encoder can also determine the weight of the encoded points based on distance information. For example, the reciprocal of the distance from the encoded point to the current point can be used to determine the weight of the encoded point.
[0465] Referring to the above method, the encoding end determines the weight of each point among the encoded points based on at least one of the classification information and distance information, and then executes S202-B2 to determine the score of the encoded points based on the weights.
[0466] The embodiments of this application do not limit the specific implementation of S202-B2 described above.
[0467] In some embodiments, the encoder uses the weights of the encoded points determined above as or converts them into scores for those encoded points. That is, the greater the weight of an encoded point, the higher its corresponding score.
[0468] In some embodiments, 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.
[0469] For example, if the weight of the i-th point is determined using method 1 or method 2 above, that is, classification information is considered when determining the weight of the i-th point, then the score of the i-th point can be determined based on the distance information between the i-th point and the current point, and the weight of the i-th point. For example, the product of the distance information between the i-th point and the current point and the weight of the i-th point can be determined as the score of the i-th point.
[0470] For example, the score of the i-th point is determined according to the formula (2) above.
[0471] Optionally, the encoder can also perform other calculations 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 application embodiment does not limit this.
[0472] In some embodiments, if classification information is not considered when determining the weight of the i-th point, for example, when using method 3 described above to determine the weight of the i-th point, then the score of the i-th point can be determined using the classification information and the weight 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 this weight and the weight of the i-th point is determined as the score of the i-th point.
[0473] The above example of determining the score of the i-th point illustrates that each point in the encoded points can be determined by referring to the method of the i-th point. Then, based on the scores, K parameter points can be determined from the encoded points.
[0474] For example, the K highest-scoring encoded points among the encoded points are identified as the K reference points for the current point.
[0475] In some embodiments, if the weights of the encoded points are determined using method 1 described above, 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 as the first weight; if the classification information of the i-th point is inconsistent with the classification information of the current point, then the weight of the i-th point is determined as the second weight. If the second weight is greater than the first weight, then the K points with the smallest scores among the encoded points are determined as K reference points.
[0476] In this embodiment, optionally, the first weight is a positive number less than 1, and the second weight is a positive number greater than 1.
[0477] In this application, the encoding end determines K reference points for the current point according to the above method. As can be seen from the above, when determining reference points, this application embodiment considers not only distance information but also classification information, thereby improving the accuracy of reference point determination. When performing attribute prediction based on the accurately determined reference points, the accuracy of attribute prediction can be improved.
[0478] After the encoding end determines the K reference points of the current point, it executes the following step S203.
[0479] S203. Determine the predicted attribute value of the current point based on the attribute information of K reference points.
[0480] In some embodiments, the encoder directly determines the predicted attribute value of the current point based on the attribute information of K reference points. For example, the weighted average of the attribute information of K reference points is used as the predicted attribute value of the current point.
[0481] In some embodiments, S203 includes the steps S203-A and S203-B.
[0482] S203-A: Determine M prediction points from K reference points, where M is a positive integer less than or equal to K.
[0483] In this embodiment, in order to improve coding efficiency, M prediction points are determined from K reference points, and the attribute prediction value of the current point is determined based on the attribute information of these M prediction points.
[0484] The specific implementation process of S203-A is described below.
[0485] In this application embodiment, there are multiple ways to determine M prediction points from K reference points. Based on this, the above S203-A includes the following steps:
[0486] S203-A1, Determine the prediction point determination mode corresponding to the current point;
[0487] S203-A2. Based on the prediction point determination pattern, determine M prediction points from K reference points.
[0488] In this embodiment, the encoder first determines the prediction point determination mode corresponding to the current point from multiple methods of determining M prediction points from K reference points, and then determines M prediction points from K reference points according to the prediction point determination mode.
[0489] In some embodiments, the prediction point determination mode is the same for all points in the point cloud, that is, the encoding end uses a prediction point determination mode to determine the prediction point of each point in the point cloud.
[0490] In some embodiments, multiple prediction point determination modes can be used in a point cloud. For example, some points in the point cloud may be determined using one prediction point determination mode, while other prediction points may be determined using a different prediction point determination mode.
[0491] This application does not impose any restrictions on the prediction point determination mode.
[0492] In some embodiments, 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. Optionally, 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 classification information.
[0493] The following describes the specific method for determining the prediction point corresponding to the current point in S203-A.
[0494] The methods for determining the prediction point corresponding to the current point in S203-A above include, but are not limited to, the following:
[0495] Method 1: Determine the prediction point determination mode corresponding to the current point based on the classification information of the current point.
[0496] In one possible implementation of this method, different categories of points in the point cloud correspond to different prediction point determination modes.
[0497] For example, if the current point belongs to the first category, then the prediction point determination mode is determined as the first prediction point determination mode.
[0498] For example, if the current point belongs to the second category, then the prediction point determination mode is determined to be the second prediction point determination mode.
[0499] The second prediction point determination mode and the first prediction point determination mode are both any one of the first prediction point 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.
[0500] In one example, the correspondence between the point categories in the point cloud and the prediction point determination patterns is shown in Table 2. The encoder can then use the classification information of the current point to query Table 2 and determine the corresponding prediction point determination pattern.
[0501] In another example, the first prediction point determination mode and the second determination mode mentioned above are the default modes.
[0502] In another example, the first prediction point determination mode and the second determination mode mentioned above are randomly selected by the encoder or determined based on the cost.
[0503] In this example, the encoder indicates the first prediction point determination mode and the second determination mode to the decoder.
[0504] In some embodiments, the encoder can write the prediction point determination pattern corresponding to different categories into the bitstream, so that the decoder can determine the prediction point determination pattern corresponding to the category to which the current point belongs through the encoded bitstream.
[0505] In another possible implementation of this method one, 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 points.
[0506] For example, if the number of encoded points of the same category as the current point is greater than or equal to a certain preset value, then the prediction point determination mode corresponding to the current point is determined to be a prediction point determination mode.
[0507] For example, if the number of encoded points of the same category as the current point is less than a certain preset value, then the prediction point determination mode corresponding to the current point is determined to be another prediction point determination mode.
[0508] In addition to using Method 1 to determine the prediction point determination mode corresponding to the current point, the encoding end can also use Method 2, Method 3, Method 4 or Method 5 to determine the prediction point determination mode corresponding to the current point.
[0509] Method 2: Determine the prediction point determination pattern based on the classification information of K reference points.
[0510] In one implementation of Method 2, the number of points belonging to different categories among the K reference points is determined, and the prediction point determination pattern corresponding to the category with the most points is determined as the prediction point determination pattern corresponding to the current point. For example, among the K reference points, the number of points belonging to the first category is the largest, as shown in Representation 2. The first category corresponds to the first prediction point determination pattern, and thus the first prediction point determination pattern is determined as the prediction point determination pattern corresponding to the current point.
[0511] In another implementation of Method 2, the prediction point determination mode corresponding to the current point is determined based on the classification information of K reference points and the current point.
[0512] For example, if the number of reference points among the K reference points that belong to the same category as the current point is greater than or equal to the first threshold, then the prediction point determination mode is determined to be the third prediction point determination mode.
[0513] For example, 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.
[0514] Method 3: The prediction point determination mode corresponding to the current point is the default mode. That is, both the encoder and encoder use the default mode to determine the prediction point of the current point.
[0515] Optionally, the above default mode can be any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
[0516] Method 4: The encoding end selects a prediction point determination pattern based on the cost or randomly as the prediction point determination pattern corresponding to the current point.
[0517] In this fourth method, the encoder writes a second identifier into the point cloud code stream. This second identifier is used to indicate the prediction point determination mode corresponding to the current point.
[0518] In this method four, after the encoding end determines the prediction point determination mode corresponding to the current point, it instructs the encoding end to indicate the prediction point determination mode. Specifically, a second identifier is written into the bit stream, and the prediction point determination mode corresponding to the current point is indicated by the second identifier.
[0519] Optionally, the second identifier can be an index for determining the pattern of the predicted point.
[0520] In one possible implementation of this method four, the encoder can encode a second identifier for each point in the point cloud to indicate the prediction point determination mode corresponding to that point.
[0521] In one possible implementation of this method four, if the prediction point determination mode corresponding to each point in the point cloud is the same, the encoder can write a second identifier into the bit stream. This second identifier is used to indicate the prediction point determination mode corresponding to all points in the point cloud.
[0522] In one possible implementation of this method four, if the prediction point determination modes corresponding to different categories of points are different, the encoding end can encode different second identifiers for different categories of points. For example, the second identifier corresponding to the first type of point cloud is B1, and the second identifier corresponding to the second type of point cloud is B2.
[0523] Method 5: The encoding end determines the prediction point determination mode corresponding to the current point using an adaptive method. In this case, S203-A includes the following steps:
[0524] S203-A1: Obtain Q candidate prediction modes, where Q is a positive integer greater than 1;
[0525] S203-A2. From Q candidate prediction point determination patterns, determine one prediction point determination pattern as the prediction point determination pattern corresponding to the current point.
[0526] The aforementioned Q candidate prediction point determination modes are any Q modes among the aforementioned first prediction point determination mode, second prediction point determination mode, and third prediction point determination mode.
[0527] In some embodiments, the above-mentioned Q prediction point candidate determination mode is the encoding default.
[0528] In some embodiments, the encoder determines Q candidate prediction point determination modes from a first prediction point determination mode, a second prediction point determination mode, and a third prediction point determination mode. Further, the encoder indicates the determined Q candidate prediction point determination modes to itself.
[0529] In some embodiments, the encoder may also obtain Q candidate prediction point determination patterns through other methods, and this application embodiment does not limit this. After obtaining the Q candidate prediction point determination patterns, the encoder determines the prediction point determination pattern corresponding to the current point from these Q candidate prediction point determination patterns.
[0530] The methods by which the encoder determines one prediction point candidate pattern from Q prediction point candidate patterns as the prediction point determination pattern corresponding to the current point include, but are not limited to, the following:
[0531] Method 1: The encoder determines the prediction point determination mode corresponding to the current point from the Q candidate prediction point determination modes based on the classification information of the current point.
[0532] For example, if the current point belongs to the first category, then the prediction point candidate pattern 'a' among the Q prediction point candidate determination patterns will be determined as the prediction point determination pattern corresponding to the current point.
[0533] For example, if the current point belongs to the second category, then the prediction point candidate pattern b among the Q prediction point candidate determination patterns will be determined as the prediction point determination pattern corresponding to the current point.
[0534] Method 2: The encoding end determines the cost of the Q candidate prediction point determination modes; based on the cost of the Q candidate prediction point determination modes, the prediction point determination mode corresponding to the current point is determined.
[0535] The aforementioned costs can be the sum of squared differences (SSD), the sum of absolute differences (SAD), or the sum of absolute transformed differences (SATD), etc.
[0536] In some embodiments, the maximum difference in attributes can also be determined as the cost.
[0537] This application does not limit the specific method by which the cost of determining the candidate prediction modes for Q prediction points is determined in the embodiments.
[0538] In one possible implementation, the encoder selects P points (where P is a positive integer) closest to the current point from the already encoded points according to the encoding order; for the j-th prediction point candidate determination pattern among the Q prediction point candidate determination patterns, the j-th prediction point candidate determination pattern is used to predict the P points, obtaining the attribute prediction values of the P points under the j-th prediction point candidate determination pattern, where j is a positive integer; based on the attribute prediction values of the P points under the j-th prediction point candidate determination pattern, the cost of the j-th prediction point candidate pattern is determined.
[0539] In other words, in this implementation, the encoder selects the P points closest to the current point from the already encoded points according to the encoding order, and uses Q prediction point candidate determination patterns to predict the P points respectively, so as to obtain the attribute prediction values of the P points corresponding to each prediction point candidate determination pattern in the Q prediction point candidate determination patterns, and then determines the cost of each prediction point candidate determination pattern based on the attribute prediction values of the P points.
[0540] The cost of determining the candidate determination mode for the j-th prediction point based on the attribute prediction value of each of the P points in the candidate determination mode for the j-th prediction point can be included in, but is not limited to, the following examples:
[0541] Example 1: Since P points are attribute-encoded points, their respective attribute prediction values were determined during attribute encoding. For ease of description, these attribute prediction values determined during the attribute encoding process are denoted as the original attribute prediction values. This allows us to compare the attribute prediction values of the P points under the candidate determination mode for the j-th prediction point with the original attribute prediction values to determine the cost of the candidate determination mode for the j-th prediction point. For example, the sum of the differences between the attribute prediction values of the P points under the candidate determination mode for the j-th prediction point and the original attribute prediction values of these P points is determined as the cost of the candidate determination mode for the j-th prediction point.
[0542] Example 2: Based on the attribute prediction values of P points in the candidate determination mode of the j-th prediction point, determine the attribute reconstruction values of P points in the candidate determination mode of the j-th prediction point; based on the attribute reconstruction values of P points in the candidate determination mode of the j-th prediction point and the encoded attribute values of P points, determine the cost of the candidate determination mode of the j-th prediction point.
[0543] Based on the above method, the cost corresponding to each of the N candidate prediction point determination modes can be determined, and then the prediction point determination mode can be determined based on the cost of the Q candidate prediction point determination modes.
[0544] For example, the candidate prediction point determination pattern with the lowest cost is determined as the prediction point determination pattern corresponding to the current point.
[0545] For example, if the cost is less than a certain preset value, 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.
[0546] After 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.
[0547] The specific implementation process of S203-B is described below.
[0548] 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:
[0549] Case 1: If the prediction point determination mode is the first prediction point determination mode, which determines K reference points as prediction points, then the K reference points are determined as M prediction points, where M equals K.
[0550] Scenario 2: If the prediction point determination mode is the second prediction point determination mode, which determines one of the K reference points as the prediction point. In this case, a reference point is selected from the K reference points and determined as the prediction point, and M equals 1.
[0551] The methods for selecting a reference point from K reference points to determine the prediction point include at least the following examples:
[0552] Example 1: Select the reference point that is closest to the current point from among the K reference points as the prediction point.
[0553] Example 2: The first reference point among the K reference points that has the closest attribute information to the current point is determined as the prediction point.
[0554] In this example 2, the encoding writes a first index into the point cloud code stream. This first index is used to indicate a first reference point, which is the reference point among K reference points whose attribute information is closest to that of the current point.
[0555] In some embodiments, the bitstream may include indication information indicating whether the prediction point is determined in the manner of Example 1 or in the manner of Example 2.
[0556] Case 3: If the prediction point determination mode is the third prediction point determination mode, the third prediction point is determined based on classification information and distance information. Therefore, according to the steps in S203-A above, if the prediction point determination mode corresponding to the current point is determined to be the third prediction point determination mode, the M reference points among the K reference points that have the same classification information as the current point and are closest to the current point are determined as the M prediction points.
[0557] After determining M prediction points from K reference points using the method described above, the encoding end executes the following steps S203-B.
[0558] S203-B: Determine the attribute prediction value of the current point based on the attribute information of M prediction points.
[0559] In some embodiments, if M=1 is determined according to the above steps, that is, there is 1 prediction point, then the attribute information of the prediction point is determined as the attribute prediction value of the current point.
[0560] In some embodiments, if M is greater than 1, that is, when the current point includes multiple prediction points, then S203-B above includes the following steps:
[0561] S203-B1. Determine the calculation method for the predicted value based on the classification information of M prediction points;
[0562] S203-B2. Based on the prediction value calculation method and the attribute information of M prediction points, determine the attribute prediction value of the current point.
[0563] This application does not limit the specific method of calculating the predicted value in the embodiments.
[0564] In some embodiments, the above-mentioned 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.
[0565] In this embodiment, if the current point includes multiple prediction points, the method for calculating the prediction value corresponding to the current point is first determined before determining the attribute prediction value of the current point based on the prediction points.
[0566] Specifically, based on the classification information of the M prediction points, the prediction value calculation method is determined. In other words, in this embodiment of the application, different prediction value calculation methods are set for different point cloud categories, which further improves the accuracy of attribute prediction value calculation.
[0567] The implementation methods of S203-B1 above include at least the following:
[0568] Method 1: 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 the second threshold, then the prediction value calculation method is determined to be the first prediction value calculation method; if the number of prediction points of the same category as the current point among the M prediction points is less than the second threshold, then the prediction value calculation method is determined to be the second prediction value calculation method. In this case, the first prediction value calculation method and the second prediction value calculation method are any one of the first prediction value calculation method, the second prediction value calculation method, and the third prediction value calculation method, and the first prediction value calculation method and the second prediction value calculation method are different.
[0569] Method 2: If the categories of the M predicted points and the current point are all in the first category, then the predicted value calculation method is determined to be the third predicted value calculation method; if the categories of the M predicted points and the current point are all in the second category, then the predicted value calculation method is determined to be the fourth predicted value calculation method. In this case, the third and fourth predicted value calculation methods are any one of the first, second, and third predicted value calculation methods, and the third predicted value calculation method is different from the fourth predicted value calculation method.
[0570] After determining the prediction value calculation method corresponding to the current point according to method 1 or method 2, the encoding end executes S203-B2 to determine the attribute prediction value of the current point based on the prediction value calculation method and the attribute information of M prediction points.
[0571] 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:
[0572] Case 1: If the prediction value is calculated using the first prediction value calculation method, which is a weighted method, then the encoder 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. Based on the first weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
[0573] For example, the encoding end determines the attribute prediction value of the current point according to the above formula (3).
[0574] Case 2: If the prediction value is calculated using a second prediction value calculation method, which is a different weighting method. In this case, the encoder determines the second weight of each prediction point among the M prediction points based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights; based on the second weight of each prediction point among the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
[0575] The first prediction method described above uses the reciprocal of the distance as the weight of each prediction point. When calculating Euclidean distance, it considers that the distribution of the point cloud along the x, y, and z axes 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 assigned to different directional axes.
[0576] In one example, the second weight of the prediction point is determined according to the above formula (4).
[0577] The second weight of each of the M prediction points is determined according to the above formula (4). Then, the attribute information of the M prediction points is weighted according to the second weight of each of the M prediction points to obtain the attribute prediction value of the current point.
[0578] In one example, the predicted attribute value of the current point is determined according to the above formula (5).
[0579] Scenario 3: If the predicted value is calculated using the third prediction method, this method involves determining M+1 predicted values based on M predicted points, and then selecting the attribute predicted value for the current point from these M+1 predicted values. In this case, the encoder first determines the weighted average of the attributes of the M predicted points and uses this weighted average as a predicted value; based on the attribute information of the M predicted points, it determines M predicted values; and based on the determined predicted value and the M predicted values, it determines the attribute predicted value for the current point.
[0580] In scenario 3, the encoder determines M+1 attribute prediction values. Specifically, this includes one attribute prediction value determined by the weighted average of the attributes of the M prediction points, and M attribute prediction values determined based on the attribute information of the M prediction points. For example, the attribute information of the M prediction points is used to determine the M attribute prediction values. Then, the attribute prediction value for the current point is determined from these M+1 attribute prediction values. For instance, the encoder encodes the point cloud bitstream to obtain a second index, which is used to indicate the target prediction value. The target prediction value corresponding to this second index among the M+1 prediction values is then determined as the attribute prediction value for the current point.
[0581] As can be seen from the above, the weighting methods involved in the embodiments of this application include at least the two types shown in Case 1 and Case 2. Therefore, in Case 3, before determining the weighted average of the attributes of the M prediction points, it is necessary to first determine the target weighted average method, and then use the target weighted average method to determine the weighted average of the attributes of the M prediction points.
[0582] The embodiments of this application do not limit the specific method of the target weighted average.
[0583] In some embodiments, the target weighted average method is either a first weighted average method or a second weighted average method. Optionally, the first weighted average method is the weighting method in case 1 above, and the second weighted average method is the weighting method in case 2 above.
[0584] In some embodiments, the above target weighted average method is the default method.
[0585] In some embodiments, the target weighted average method is determined based on the classification information of the M prediction points.
[0586] For example, if the number of predicted points of the same category as the current point among the M predicted points is greater than or equal to the second threshold, then the target weighted average method is determined to be the first weighted average method; if the number of predicted points of the same category as the current point among the M predicted points is less than the second threshold, then the target weighted average method is determined to be the second weighted average method. The first weighted average method and the second weighted average method are either the first weighted average method or the second weighted average method, and the first weighted average method and the second weighted average method are different.
[0587] For example, if the categories of the M predicted points and the current point are all the first category, then 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 all the second category, then the target weighted average method is determined to be the fourth weighted average method. The third and fourth weighted average methods are either the first or the second weighted average methods, and the third and fourth weighted average methods are different.
[0588] In some embodiments, if the target weighted calculation method is the first weighted average method, then the reciprocal of the distance between each of the M predicted points and the current point is determined as the first weight of each of the M predicted points; based on the first weight of each of the M predicted points, the attribute information of the M predicted points is weighted to obtain the attribute weighted average of the M predicted points. Specifically, refer to the description of formula (3) above.
[0589] In some embodiments, if the target weighted calculation method is the second weighted average method, then for each of the M prediction points, the second weight of the prediction point is determined based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights; based on the second weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute weighted average of the M prediction points. Specifically, refer to the description of formulas (4) and (5) above.
[0590] Based on the description in S203 above, the encoding end determines the attribute prediction value of the current point, and then executes the following step in S204.
[0591] S204. Determine the attribute residual value of the current point based on the attribute prediction value of the current point.
[0592] For example, the attribute residual value of the current point is determined based on the attribute information and the attribute prediction value of the current point. For instance, the attribute residual value of the current point is determined by the difference between the attribute information and the attribute prediction value of the current point.
[0593] In some embodiments, the attribute residual value of the current point is quantized to obtain quantization coefficients, and the quantization coefficients are encoded to obtain the point cloud attribute code stream.
[0594] The point cloud encoding method provided in this application determines the classification information of the current point and the encoded points in the point cloud, and / or the distance information between the encoded points and the current point. The classification information is used to indicate the category to which the point belongs. Based on at least one of the classification information and distance information, K reference points are determined from the encoded points, where K is a positive integer. Based on the attribute information of the K reference points, the attribute prediction value of the current point is determined. Based on the attribute prediction value of the current point, the attribute reconstruction value of the current point is determined. That is, this application embodiment considers not only distance information but also classification information, thereby improving the accuracy of reference point determination. When performing attribute prediction based on the accurately determined reference points, the accuracy of attribute prediction can be improved, thereby improving the attribute encoding efficiency.
[0595] It should be understood that Figures 4 to 6 This is merely an example of what is being done and should not be construed as limiting the scope of this application.
[0596] The preferred embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solutions of this application, and these simple modifications all fall within the protection scope of this application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not describe the various possible combinations separately. Furthermore, various different embodiments of this application can also be arbitrarily combined, as long as they do not violate the spirit of this application, they should also be considered as the content disclosed in this application.
[0597] It should also be understood that, in the various method embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. Furthermore, in the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. Specifically, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0598] The above text combined Figures 4 to 6 The method embodiments of this application are described in detail below, in conjunction with... Figures 7 to 10 The following describes in detail the device embodiments of this application.
[0599] Figure 7 This is a schematic block diagram of the point cloud decoding device provided in the embodiments of this application.
[0600] like Figure 7 As shown, the dot cloud decoding device 10 may include:
[0601] Information determination unit 11 is used to determine the classification information of the current point and the decoded points in the point cloud, and / or the distance information between the decoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs;
[0602] Reference point determination unit 12 is used to determine K reference points of the current point from the decoded points based on at least one of the classification information and distance information, where K is a positive integer;
[0603] The prediction value determination unit 13 is used to determine the attribute prediction value of the current point based on the attribute information of the K reference points;
[0604] The reconstruction unit 14 is used to determine the attribute reconstruction value of the current point based on the attribute prediction value of the current point.
[0605] In some embodiments, the reference point determination unit 12 is specifically used to determine the reference point determination mode corresponding to the current point; and to 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 distance information.
[0606] In some embodiments, the reference point determination mode is any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
[0607] In some embodiments, the reference point determination unit 12 is specifically used to determine the reference point determination mode corresponding to the current point based on the classification information of the current point.
[0608] In some embodiments, the reference point determination unit 12 is specifically configured to determine the reference point determination mode as a first reference point determination mode if the category of the current point is a first category; and to determine the reference point determination mode as a second reference point determination mode if the category of the current point is a second category. The second reference point determination mode and the first reference point determination mode are both any one of the first reference point 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.
[0609] In some embodiments, the reference point determination unit 12 is specifically used to decode the point cloud code stream to obtain a first identifier, the first identifier being used to indicate the reference point determination mode corresponding to the current point; and to determine the reference point determination mode based on the first identifier.
[0610] In some embodiments, the reference point determination mode is the default mode.
[0611] In some embodiments, the reference point determination unit 12 is specifically used to obtain N reference point candidate determination patterns, wherein the N reference point candidate determination patterns are any N patterns among the first reference point determination pattern, the second reference point determination pattern, and the third reference point determination pattern, and N is a positive integer greater than 1; and to determine one reference point candidate determination pattern as the reference point determination pattern from the N reference point candidate determination patterns.
[0612] In some embodiments, the reference point determination unit 12 is specifically used to determine the cost of the N candidate reference point determination modes; and to determine the candidate reference point determination mode with the lowest cost among the N candidate reference point determination modes as the reference point determination mode.
[0613] In some embodiments, the reference point determination unit 12 is specifically configured to: select P points closest to the current point from the decoded points according to the decoding order, where P is a positive integer; predict the P points using the j-th reference point candidate determination pattern among the N reference point candidate determination patterns to obtain the attribute prediction values of the P points under the j-th reference point candidate determination pattern, where j is a positive integer; and determine the cost of the j-th reference point candidate pattern based on the attribute prediction values of the P points under the j-th reference point candidate determination pattern.
[0614] In some embodiments, the reference point determination unit 12 is specifically configured to determine the attribute reconstruction values of the P points in the j-th reference point candidate determination mode based on the attribute prediction values of the P points in the j-th reference point candidate determination mode; and to determine the cost of the j-th reference point candidate determination mode 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.
[0615] In some embodiments, if the reference point determination mode is the first reference point determination mode, then the reference point determination unit 12 is specifically used to determine the K decoded points that are closest to the current point among the decoded points according to the decoding order as the K reference points.
[0616] In some embodiments, if the reference point determination mode is the second reference point determination mode, the reference point determination unit 12 is specifically used to select K decoded points from the decoded points whose classification information is consistent with the classification information of the current point, according to the decoding order, as the K reference points.
[0617] In some embodiments, if the reference point determination mode is the third reference point determination mode, the reference point determination unit 12 is specifically configured to determine the weight of the decoded point based on at least one of the classification information and distance information; determine the score of the decoded point based on the weight; and determine the K reference points from the decoded points based on the score.
[0618] In some embodiments, the reference point determination unit 12 is specifically used to determine the weight of the i-th point among the decoded points based on the classification information of the i-th point, where i is a positive integer.
[0619] In some embodiments, the reference point determination unit 12 is specifically used 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.
[0620] In some embodiments, the reference point determination unit 12 is specifically used to determine the weight of the i-th point as a first weight if the classification information of the i-th point is consistent with the classification information of the current point; and to determine the weight of the i-th point as a second weight if the classification information of the i-th point is inconsistent with the classification information of the current point.
[0621] In some embodiments, the reference point determination unit 12 is specifically used to determine the score of 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.
[0622] In some embodiments, the reference point determination unit 12 is specifically used to determine the score of the i-th point by multiplying the distance information between the i-th point and the current point by the weight of the i-th point.
[0623] In some embodiments, if the second weight is greater than the first weight, the reference point determination unit 12 is specifically used to determine the K points with the smallest scores among the decoded points as the K reference points.
[0624] In some embodiments, the prediction value determination unit 13 is specifically used to determine M prediction points from the K reference points, where M is a positive integer less than or equal to K; and to determine the attribute prediction value of the current point based on the attribute information of the M prediction points.
[0625] In some embodiments, the prediction value determination unit 13 is specifically used to determine the prediction point determination mode corresponding to the current point; and to determine M prediction points from the K reference points according to the prediction point determination mode.
[0626] In some embodiments, the prediction point determination mode is any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
[0627] In some embodiments, the prediction value determination unit 13 is specifically used to determine the prediction point determination mode based on the classification information of the current point.
[0628] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the prediction point determination mode as a first prediction point determination mode if the category of the current point is a first category; and to determine the prediction point determination mode as a second prediction point determination mode if the category of the current point is a second category. The second prediction point determination mode and the first prediction point determination mode are both any one of the first prediction point 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.
[0629] In some embodiments, the prediction value determination unit 13 is specifically used to determine the prediction point determination mode based on the classification information of the K reference points.
[0630] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the prediction point determination mode as a third prediction point determination mode if the number of reference points among the K reference points belonging to the same category as the current point is greater than or equal to a first threshold; and to determine the prediction point determination mode as a fourth prediction point determination mode if the number of reference points among the K reference points belonging to the same category as the current point is less than the first threshold. The fourth prediction point determination mode and the third prediction point determination mode are both 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.
[0631] In some embodiments, the prediction value determination unit 13 is specifically used to decode the point cloud code stream to obtain a second identifier, the second identifier being used to indicate the prediction point determination mode corresponding to the current point; and to determine the prediction point determination mode based on the second identifier.
[0632] In some embodiments, the prediction point determination mode is the default mode.
[0633] In some embodiments, the prediction value determination unit 13 is specifically used to obtain Q candidate prediction point determination patterns, wherein the Q candidate prediction point determination patterns are any Q patterns among the first prediction point determination pattern, the second prediction point determination pattern, and the third prediction point determination pattern, and Q is a positive integer greater than 1; and determine one prediction point candidate determination pattern as the prediction point determination pattern from the Q candidate prediction point determination patterns.
[0634] In some embodiments, the prediction value determination unit 13 is specifically used to determine the cost of the Q candidate prediction point determination modes; and to determine the prediction point determination mode based on the cost of the Q candidate prediction point determination modes.
[0635] In some embodiments, the prediction value determination unit 13 is specifically configured to: select P points closest to the current point from the decoded points according to the decoding order, where P is a positive integer; predict the P points using the j-th prediction point candidate determination pattern among the Q prediction point candidate determination patterns, to obtain the attribute prediction values of the P points under the j-th prediction point candidate determination pattern, where j is a positive integer; and determine the cost of the j-th prediction point candidate pattern based on the attribute prediction values of the P points under the j-th prediction point candidate determination pattern.
[0636] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the attribute reconstruction value of the P points in the j-th prediction point candidate determination mode based on the attribute prediction values of the P points in the j-th prediction point candidate determination mode; and to determine the cost of the j-th prediction point candidate determination mode based on the attribute reconstruction value of the P points in the j-th prediction point candidate determination mode and the decoded attribute value of the P points.
[0637] In some embodiments, if the prediction point determination mode is the first prediction point determination mode, then the prediction value determination unit 13 is specifically used to determine the K reference points as the M prediction points, where M equals K.
[0638] In some embodiments, if the prediction point determination mode is the second prediction point determination mode, then the prediction value determination unit 13 is specifically used to select a reference point from the K reference points and determine it as the prediction point, where M equals 1.
[0639] In some embodiments, the prediction value determination unit 13 is specifically used to determine the reference point among the K reference points that is closest to the current point as the prediction point.
[0640] In some embodiments, the prediction value determination unit 13 is specifically used to decode the point cloud code stream to obtain a first index corresponding to the current point. The first index is used to indicate a first reference point, which is the reference point among the K reference points whose attribute information is closest to that of the current point. The first reference point corresponding to the first index among the K reference points is determined as the prediction point.
[0641] In some embodiments, if the prediction point determination mode is the third prediction point determination mode, then the prediction value determination unit 13 is specifically used to determine the M reference points among the K reference points that have the same classification information as the current point and are closest to the current point as the M prediction points.
[0642] In some embodiments, if M is greater than 1, the prediction value determination unit 13 is specifically used to determine the prediction value calculation method based on the classification information of the M prediction points; and 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.
[0643] In some embodiments, the 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.
[0644] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the prediction value calculation method as a first prediction value calculation method 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; and to determine the prediction value calculation method as a second prediction value calculation method if the number of prediction points of the same category as the current point among the M prediction points is less than the second threshold. The first prediction value calculation method and the second prediction value calculation method are both any one of the first prediction value calculation method, the second prediction value calculation method, and the third prediction value calculation method, and the first prediction value calculation method is different from the second prediction value calculation method.
[0645] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the prediction value calculation method as a third prediction value calculation method if the categories of the M prediction points and the current point are both the first category; and to determine the prediction value calculation method as a fourth prediction value calculation method if the categories of the M prediction points and the current point are both the second category. The third prediction value calculation method and the fourth prediction value calculation method are 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 different from the fourth prediction value calculation method.
[0646] In some embodiments, if the prediction value calculation method is the first prediction value calculation method, the prediction value determination unit 13 is specifically used to determine the reciprocal of the distance between each prediction point in the M prediction points and the current point as the first weight of each prediction point in the M prediction points; and to weight the attribute information of the M prediction points according to the first weight of each prediction point in the M prediction points to obtain the attribute prediction value of the current point.
[0647] In some embodiments, if the prediction value calculation method is the second prediction value calculation method, then the prediction value determination unit 13 is specifically used to determine the second weight of the prediction point for each of the M prediction points according to the position information of the prediction point and the current point and the preset coordinate axis weight; and to weight the attribute information of the M prediction points according to the second weight of each of the M prediction points to obtain the attribute prediction value of the current point.
[0648] In some embodiments, if the predicted value calculation method is the third predicted value calculation method, the predicted value determination unit 13 is specifically used to determine the attribute weighted average of the M predicted points and use the attribute weighted average as a predicted value; determine M predicted values according to the attribute information of the M predicted points; and determine the attribute predicted value of the current point according to the predicted value and the M predicted values.
[0649] In some embodiments, the prediction value determination unit 13 is specifically used to determine a target weighted average method based on the classification information of the M prediction points; and to determine the attribute weighted average of the M prediction points using the target weighted average method.
[0650] In some embodiments, the target weighted average method is either a first weighted average method or a second weighted average method.
[0651] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the target weighted average method as a first weighted average method if the number of prediction points of the M prediction points that are of the same category as the current point is greater than or equal to a second threshold; and to determine the target weighted average method as a second weighted average method if the number of prediction points of the M prediction points that are of the same category as the current point is less than the second threshold. The first weighted average method and the second weighted average method are either the first weighted average method or the second weighted average method, and the first weighted average method and the second weighted average method are different.
[0652] In some embodiments, the prediction value determination unit 13 is specifically configured to determine the target weighted average method as a third weighted average method if the categories of the M prediction points and the current point are both the first category; and to determine the target weighted average method as a fourth weighted average method if the categories of the M prediction points and the current point are both the second category. The third weighted average method and the fourth weighted average method are either the first weighted average method or the second weighted average method, and the third weighted average method and the fourth weighted average method are different.
[0653] In some embodiments, if the target weighted calculation method is the first weighted average method, the prediction value determination unit 13 is specifically used to determine the reciprocal of the distance between each prediction point in the M prediction points and the current point as the first weight of each prediction point in the M prediction points; and to weight the attribute information of the M prediction points according to the first weight of each prediction point in the M prediction points to obtain the attribute weighted average of the M prediction points.
[0654] In some embodiments, if the target weighted calculation method is the second weighted average method, then the prediction value determination unit 13 is specifically used to determine the second weight of 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 weights; and to weight the attribute information of the M prediction points based on the second weight of each prediction point among the M prediction points to obtain the attribute weighted average of the M prediction points.
[0655] In some embodiments, the prediction value determination unit 13 is specifically used to decode the point cloud code stream to obtain a second index, the second index being used to indicate a target prediction value; and to determine the target prediction value corresponding to the second index among the one prediction value and the M prediction values as the attribute prediction value of the current point.
[0656] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be found in the method embodiments. To avoid repetition, further details are omitted here. Specifically, Figure 7 The point cloud decoding device 10 shown can correspond to the corresponding subject in the point cloud decoding method of the present application embodiment, and the aforementioned and other operations and / or functions of each unit in the point cloud decoding device 10 are respectively to implement the corresponding process in the point cloud decoding method. For the sake of brevity, they will not be described in detail here.
[0657] Figure 8 This is a schematic block diagram of the point cloud encoding device provided in the embodiments of this application.
[0658] like Figure 8 As shown, the point cloud encoding device 20 includes:
[0659] Information determination unit 21 is used to determine the classification information of the current point and the encoded points in the point cloud, and / or the distance information between the encoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs;
[0660] Reference point determination unit 22 is configured to determine K reference points for the current point from the encoded points based on at least one of the classification information and distance information, where K is a positive integer;
[0661] The prediction value determination unit 23 is used to determine the attribute prediction value of the current point based on the attribute information of the K reference points;
[0662] The encoding unit 24 is used to determine the attribute residual value of the current point based on the attribute prediction value of the current point.
[0663] In some embodiments, the reference point determination unit 22 is specifically used to determine the reference point determination mode corresponding to the current point; and to 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 distance information.
[0664] In some embodiments, the reference point determination mode is any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode.
[0665] In some embodiments, the reference point determination unit 22 is specifically used to determine the reference point determination mode corresponding to the current point based on the classification information of the current point.
[0666] In some embodiments, the reference point determination unit 22 is specifically configured to determine the reference point determination mode as a first reference point determination mode if the category of the current point is a first category; and to determine the reference point determination mode as a second reference point determination mode if the category of the current point is a second category. The second reference point determination mode and the first reference point determination mode are both any one of the first reference point 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.
[0667] In some embodiments, the reference point determination mode is the default mode.
[0668] In some embodiments, the reference point determination unit 22 is specifically used to obtain N candidate reference point determination patterns, wherein the N candidate reference point determination patterns are any N patterns among the first reference point determination pattern, the second reference point determination pattern, and the third reference point determination pattern, and N is a positive integer; and to determine one reference point candidate determination pattern as the reference point determination pattern from the N candidate reference point determination patterns.
[0669] In some embodiments, the reference point determination unit 22 is specifically used to determine the cost of the N candidate reference point determination modes; and to determine the candidate reference point determination mode with the lowest cost among the N candidate reference point determination modes as the reference point determination mode.
[0670] In some embodiments, the reference point determination unit 22 is specifically configured to: select P points closest to the current point from the encoded points according to the encoding order, where P is a positive integer; predict the P points using the j-th reference point candidate determination pattern among the N reference point candidate determination patterns to obtain the attribute prediction values of the P points under the j-th reference point candidate determination pattern, where j is a positive integer; and determine the cost of the j-th reference point candidate pattern based on the attribute prediction values of the P points under the j-th reference point candidate determination pattern.
[0671] In some embodiments, the reference point determination unit 22 is specifically configured to determine the attribute reconstruction values of the P points in the j-th reference point candidate determination mode based on the attribute prediction values of the P points in the j-th reference point candidate determination mode; and to determine the cost of the j-th reference point candidate determination mode 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.
[0672] In some embodiments, the encoding unit 24 is further configured to write a first identifier into the point cloud code stream, the first identifier being used to indicate the reference point determination mode corresponding to the current point.
[0673] In some embodiments, if the reference point determination mode is the first reference point determination mode, the reference point determination unit 22 is specifically used to select the K nearest encoded points to the current point from the encoded points according to the encoding order, and use them as the K reference points.
[0674] In some embodiments, if the reference point determination mode is the second reference point determination mode, the reference point determination unit 22 is specifically used to select K coded points whose classification information is consistent with the classification information of the current point from the coded points according to the encoding order, and use them as the K reference points.
[0675] In some embodiments, if the reference point determination mode is the third reference point determination mode, then the reference point determination unit 22 is specifically configured to determine the weight of the encoded point based on at least one of the classification information and distance information; determine the score of the encoded point based on the weight; and determine the K reference points from the encoded points based on the score.
[0676] In some embodiments, the reference point determination unit 22 is specifically used to determine the weight of the i-th point among the encoded points based on the classification information of the i-th point, where i is a positive integer.
[0677] In some embodiments, the reference point determination unit 22 is specifically used 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.
[0678] In some embodiments, the reference point determination unit 22 is specifically used to determine the weight of the i-th point as a first weight if the classification information of the i-th point is consistent with the classification information of the current point; and to determine the weight of the i-th point as a second weight if the classification information of the i-th point is inconsistent with the classification information of the current point.
[0679] In some embodiments, the reference point determination unit 22 is specifically used to determine the score of 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.
[0680] In some embodiments, the reference point determination unit 22 is specifically used to determine the score of the i-th point by multiplying the distance information between the i-th point and the current point by the weight of the i-th point.
[0681] In some embodiments, if the second weight is greater than the first weight, the reference point determination unit 22 is specifically used to determine the K points with the smallest scores among the encoded points as the K reference points.
[0682] In some embodiments, the prediction value determination unit 23 is specifically used to determine M prediction points from the K reference points, where M is a positive integer less than or equal to K; and to determine the attribute prediction value of the current point based on the attribute information of the M prediction points.
[0683] In some embodiments, the prediction value determination unit 23 is specifically used to determine the prediction point determination mode corresponding to the current point; and to determine M prediction points from the K reference points according to the prediction point determination mode.
[0684] In some embodiments, the prediction point determination mode is any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
[0685] In some embodiments, the prediction value determination unit 23 is specifically used to determine the prediction point determination mode based on the classification information of the current point.
[0686] In some embodiments, the prediction value determination unit 23 is specifically configured to determine the prediction point determination mode as a first prediction point determination mode if the category of the current point is a first category; and to determine the prediction point determination mode as a second prediction point determination mode if the category of the current point is a second category. The second prediction point determination mode and the first prediction point determination mode are both any one of the first prediction point 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.
[0687] In some embodiments, the prediction value determination unit 23 is specifically used to determine the prediction point determination mode based on the classification information of the K reference points.
[0688] In some embodiments, the prediction value determination unit 23 is specifically configured to determine the prediction point determination mode as a third prediction point determination mode if the number of reference points among the K reference points belonging to the same category as the current point is greater than or equal to a first threshold; and to determine the prediction point determination mode as a fourth prediction point determination mode if the number of reference points among the K reference points belonging to the same category as the current point is less than the first threshold. The fourth prediction point determination mode and the third prediction point determination mode are both 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.
[0689] In some embodiments, the prediction point determination mode is the default mode.
[0690] In some embodiments, the prediction value determination unit 23 is specifically used to obtain Q candidate prediction point determination patterns, where N is a positive integer; and to determine one prediction point candidate determination pattern from the Q prediction point candidate determination patterns as the prediction point determination pattern.
[0691] In some embodiments, the prediction value determination unit 23 is specifically used to determine the cost of the Q candidate prediction point determination modes; and to determine the prediction point candidate determination mode with the lowest cost among the Q prediction point candidate determination modes as the prediction point determination mode.
[0692] In some embodiments, the prediction value determination unit 23 is specifically configured to: select P points closest to the current point from the encoded points according to the encoding order, where P is a positive integer; predict the P points using the j-th prediction point candidate determination pattern among the Q prediction point candidate determination patterns, to obtain the attribute prediction values of the P points under the j-th prediction point candidate determination pattern, where j is a positive integer; and determine the cost of the j-th prediction point candidate pattern based on the attribute prediction values of the P points under the j-th prediction point candidate determination pattern.
[0693] In some embodiments, the prediction value determination unit 23 is specifically configured to determine the attribute reconstruction value of the P points in the j-th prediction point candidate determination mode based on the attribute prediction values of the P points in the j-th prediction point candidate determination mode; and to determine the cost of the j-th prediction point candidate determination mode based on the attribute reconstruction value of the P points in the j-th prediction point candidate determination mode and the encoded attribute value of the P points.
[0694] In some embodiments, the encoding unit 24 is further configured to write a second identifier into the point cloud code stream, the second identifier being used to indicate the prediction point determination mode corresponding to the current point.
[0695] In some embodiments, if the prediction point determination mode is the first prediction point determination mode, then the prediction value determination unit 23 is specifically used to determine the K reference points as the M prediction points, where M equals K.
[0696] In some embodiments, if the prediction point determination mode is the second prediction point determination mode, then the prediction value determination unit 23 is specifically used to select one reference point from the K reference points and determine it as the prediction point, where M equals 1.
[0697] In some embodiments, the prediction value determination unit 23 is specifically used to determine the reference point among the K reference points that is closest to the current point as the prediction point.
[0698] In some embodiments, the prediction value determination unit 23 is specifically used 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.
[0699] In some embodiments, the encoding unit 24 is further configured to write a first index into the point cloud code stream, the first index being used to indicate the first reference point.
[0700] In some embodiments, if the prediction point determination mode is the third prediction point determination mode, then the prediction value determination unit 23 is specifically used to determine the M reference points among the K reference points that have the same classification information as the current point and are closest to the current point as the M prediction points.
[0701] In some embodiments, if M is greater than 1, the prediction value determination unit 23 is specifically used to determine the prediction value calculation method based on the classification information of the M prediction points; and 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.
[0702] In some embodiments, the 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.
[0703] In some embodiments, the prediction value determination unit 23 is specifically configured to determine the prediction value calculation method as a first prediction value calculation method 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; and to determine the prediction value calculation method as a second prediction value calculation method if the number of prediction points of the same category as the current point among the M prediction points is less than the second threshold. The first prediction value calculation method and the second prediction value calculation method are both any one of the first prediction value calculation method, the second prediction value calculation method, and the third prediction value calculation method, and the first prediction value calculation method is different from the second prediction value calculation method.
[0704] In some embodiments, the prediction value determination unit 23 is specifically used to determine the prediction value calculation method as a third prediction value calculation method if the categories of the M prediction points and the current point are all the first category; and to determine the prediction value calculation method as a fourth prediction value calculation method if the categories of the M prediction points and the current point are all the second category. The third prediction value calculation method and the fourth prediction value calculation method are 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 different from the fourth prediction value calculation method.
[0705] In some embodiments, if the prediction value calculation method is the first prediction value calculation method, the prediction value determination unit 23 is specifically used to determine the reciprocal of the distance between each prediction point in the M prediction points and the current point as the first weight of each prediction point in the M prediction points; and to weight the attribute information of the M prediction points according to the first weight of each prediction point in the M prediction points to obtain the attribute prediction value of the current point.
[0706] In some embodiments, if the prediction value calculation method is the second prediction value calculation method, then the prediction value determination unit 23 is specifically used to determine the second weight of 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 weights; and to weight the attribute information of the M prediction points based on the second weight of each prediction point among the M prediction points to obtain the attribute prediction value of the current point.
[0707] In some embodiments, if the predicted value calculation method is the third predicted value calculation method, then the predicted value determination unit 23 is specifically used to determine the attribute weighted average of the M predicted points and use the attribute weighted average as a predicted value; determine M predicted values according to the attribute information of the M predicted points; and determine the attribute predicted value of the current point according to the predicted value and the M predicted values.
[0708] In some embodiments, the prediction value determination unit 23 is specifically used to determine a target weighted average method based on the classification information of the M prediction points; and to determine the attribute weighted average of the M prediction points using the target weighted average method.
[0709] In some embodiments, the target weighted average method is either a first weighted average method or a second weighted average method.
[0710] In some embodiments, the prediction value determination unit 23 is specifically configured to determine the target weighted average method as a first weighted average method if the number of prediction points of the M prediction points that are of the same category as the current point is greater than or equal to a second threshold; and to determine the target weighted average method as a second weighted average method if the number of prediction points of the M prediction points that are of the same category as the current point is less than the second threshold. The first weighted average method and the second weighted average method are either the first weighted average method or the second weighted average method, and the first weighted average method and the second weighted average method are different.
[0711] In some embodiments, the prediction value determination unit 23 is specifically configured to determine the target weighted average method as a third weighted average method if the categories of the M prediction points and the current point are both the first category; and to determine the target weighted average method as a fourth weighted average method if the categories of the M prediction points and the current point are both the second category. The third weighted average method and the fourth weighted average method are either the first weighted average method or the second weighted average method, and the third weighted average method and the fourth weighted average method are different.
[0712] In some embodiments, if the target weighted calculation method is the first weighted average method, the prediction value determination unit 23 is specifically used to determine the reciprocal of the distance between each prediction point in the M prediction points and the current point as the first weight of each prediction point in the M prediction points; and to weight the attribute information of the M prediction points according to the first weight of each prediction point in the M prediction points to obtain the attribute weighted average of the M prediction points.
[0713] In some embodiments, if the target weighted calculation method is the second weighted average method, then the prediction value determination unit 23 is specifically used to determine the second weight of 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 weights; and to weight the attribute information of the M prediction points according to the second weight of each prediction point among the M prediction points to obtain the attribute weighted average of the M prediction points.
[0714] In some embodiments, the prediction value determination unit 23 is specifically used to determine the target prediction value among the one prediction value and the M prediction values as the attribute prediction value of the current point.
[0715] In some embodiments, the encoding determination unit 24 is further configured to write a second index into the point cloud code stream, the second index being used to indicate the target predicted value.
[0716] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be found in the method embodiments. To avoid repetition, further details are omitted here. Specifically, Figure 8 The point cloud encoding device 20 shown can correspond to the corresponding subject in the point cloud encoding method of the present application embodiment, and the aforementioned and other operations and / or functions of each unit in the point cloud encoding device 20 are respectively to implement the corresponding process in the point cloud encoding method. For the sake of brevity, they will not be described in detail here.
[0717] The apparatus and system of the embodiments of this application have been described above from the perspective of functional units in conjunction with the accompanying drawings. It should be understood that these functional units can be implemented in hardware, in software instructions, or in a combination of hardware and software units. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the methods disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. Optionally, the software unit can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0718] Figure 9 This is a schematic block diagram of the electronic device provided in the embodiments of this application.
[0719] like Figure 9 As shown, the electronic device 30 can be the point cloud decoding device or the point cloud encoding device described in the embodiments of this application. The electronic device 30 may include:
[0720] The system includes a memory 33 for storing a computer program 34 and a processor 32 for transferring the program code 34 to the processor 32. In other words, the processor 32 can retrieve and run the computer program 34 from the memory 33 to implement the methods described in the embodiments of this application.
[0721] For example, the processor 32 can be used to execute the steps in the method 200 described above according to the instructions in the computer program 34.
[0722] In some embodiments of this application, the processor 32 may include, but is not limited to:
[0723] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0724] In some embodiments of this application, the memory 33 includes, but is not limited to:
[0725] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0726] In some embodiments of this application, the computer program 34 may be divided into one or more units, which are stored in the memory 33 and executed by the processor 32 to perform the method provided in this application. The one or more units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 34 in the electronic device 30.
[0727] like Figure 9 As shown, the electronic device 30 may further include:
[0728] Transceiver 33, which can be connected to processor 32 or memory 33.
[0729] 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. The transceiver 33 may include a transmitter and a receiver. The transceiver 33 may further include antennas, and the number of antennas may be one or more.
[0730] It should be understood that the various components in the electronic device 30 are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0731] Figure 10 This is a schematic block diagram of the point cloud encoding and decoding system provided in the embodiments of this application.
[0732] like Figure 10 As shown, the point cloud encoding and decoding system 40 may include a point cloud encoder 41 and a point cloud decoder 42, wherein the point cloud encoder 41 is used to execute the point cloud encoding method involved in the embodiments of this application, and the point cloud decoder 42 is used to execute the point cloud decoding method involved in the embodiments of this application.
[0733] This application also provides a bitstream generated according to the above encoding method.
[0734] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0735] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0736] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0737] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0738] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional units in the various embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0739] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A point cloud decoding method, characterized in that, include: Determine the classification information of the current point and the decoded points in the point cloud, and / or the distance information between the decoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs; Based on at least one of the classification information and distance information, determine K reference points for the current point from the decoded points, where K is a positive integer; Based on the attribute information of the K reference points, determine the predicted attribute value of the current point; Based on the predicted attribute values of the current point, determine the reconstructed attribute values of the current point; The step of determining K reference points for the current point from the decoded points based on at least one of the classification information and distance information includes: Determine the reference point determination mode corresponding to the current point, wherein the reference point determination mode is any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode; Based on the reference point determination pattern, and at least one of the classification information and distance information, determine K reference points for the current point from the decoded points; The method for determining the reference point corresponding to the current point includes: Based on the classification information of the current point, determine the reference point determination mode corresponding to the current point.
2. The method according to claim 1, characterized in that, The step of determining the reference point determination mode corresponding to the current point based on the classification information of the current point includes: If the category of the current point is the first category, then the reference point determination mode is determined to be the first reference point determination mode; If the current point is classified as the second category, then the reference point determination mode is determined to be the second reference point determination mode. The second reference point determination mode and the first reference point determination mode are both any one of the first reference point 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.
3. The method according to claim 1, characterized in that, The method for determining the reference point corresponding to the current point further includes: Decode the point cloud stream to obtain a first identifier, which is used to indicate the reference point determination mode corresponding to the current point; The reference point determination mode is determined based on the first identifier.
4. The method according to claim 1, characterized in that, The reference point determination mode is the default mode.
5. The method according to claim 1, characterized in that, The method for determining the reference point corresponding to the current point further includes: Obtain N candidate reference point determination patterns, wherein the N candidate reference point determination patterns are any N patterns among the first reference point determination pattern, the second reference point determination pattern, and the third reference point determination pattern, and N is a positive integer greater than 1; From the N candidate reference point determination patterns, one reference point candidate determination pattern is determined as the reference point determination pattern.
6. The method according to claim 5, characterized in that, The step of determining one reference point candidate determination pattern from the N reference point candidate determination patterns as the reference point determination pattern includes: The cost of determining the N candidate determination modes for reference points; The reference point determination mode with the lowest cost among the N reference point candidate determination modes is determined as the reference point determination mode.
7. The method according to claim 6, characterized in that, The cost of determining the N candidate modes for reference points includes: According to the decoding order, select P points that are closest to the current point from the decoded points, where P is a positive integer; For the j-th reference point candidate determination pattern among the N reference point candidate determination patterns, the j-th reference point candidate determination pattern is used to predict the P points to obtain the attribute prediction values of the P points under the j-th reference point candidate determination pattern, where j is a positive integer; The cost of the j-th reference point candidate mode is determined based on the attribute prediction values of the P points in the j-th reference point candidate mode.
8. The method according to claim 7, characterized in that, The cost of determining the candidate mode of the j-th reference point based on the attribute prediction values of the P points in the candidate mode of the j-th reference point includes: Based on the attribute prediction values of the P points in the j-th reference point candidate determination mode, determine the attribute reconstruction values of the P points in the j-th reference point candidate determination mode; The cost of 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.
9. The method according to any one of claims 1-8, characterized in that, If the reference point determination mode is the first reference point determination mode, then determining K reference points for the current point from the decoded points based on the reference point determination mode and at least one of the classification information and distance information includes: According to the decoding order, the K decoded points that are closest to the current point among the decoded points are determined as the K reference points.
10. The method according to claim 8, characterized in that, If the reference point determination mode is the second reference point determination mode, then determining K reference points for the current point from the decoded points based on the reference point determination mode and at least one of the classification information and distance information includes: According to the decoding order, select K decoded points whose classification information is consistent with the classification information of the current point from the decoded points, and use them as the K reference points.
11. The method according to claim 8, characterized in that, If the reference point determination mode is the third reference point determination mode, then determining K reference points for the current point from the decoded points based on the reference point determination mode and at least one of the classification information and distance information includes: The weight of the decoded point is determined based on at least one of the classification information and distance information; The score of the decoded point is determined based on the weights. Based on the scores, the K reference points are determined from the decoded points.
12. The method according to claim 11, characterized in that, Determining the weight of the decoded point based on at least one of the classification information and distance information includes: For the i-th point among the decoded points, the weight of the i-th point is determined based on the classification information of the i-th point, where i is a positive integer.
13. The method according to claim 12, characterized in that, The step of determining the weight of the i-th point based on the classification information of the i-th point includes: 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.
14. The method according to claim 13, characterized in that, The step of determining 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 includes: 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 the classification information of the i-th 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.
15. The method according to claim 14, characterized in that, Determining the score of the decoded point based on the weights includes: 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.
16. The method according to claim 15, characterized in that, The step of determining the score of 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, includes: The score of the i-th point is determined by multiplying the distance information between the i-th point and the current point by the weight of the i-th point.
17. The method according to claim 16, characterized in that, If the second weight is greater than the first weight, then determining the K reference points from the decoded points based on the score includes: The K points with the lowest scores among the decoded points are determined as the K reference points.
18. The method according to any one of claims 1-8, characterized in that, The step of determining the attribute prediction value of the current point based on the attribute information of the K reference points includes: M prediction points are determined from the K reference points, where M is a positive integer less than or equal to K; Based on the attribute information of the M prediction points, determine the attribute prediction value of the current point.
19. The method according to claim 18, characterized in that, The step of determining M prediction points from the K reference points includes: Determine the prediction point determination mode corresponding to the current point; Based on the prediction point determination pattern, M prediction points are determined from the K reference points.
20. The method according to claim 19, characterized in that, The prediction point determination mode is any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
21. The method according to claim 20, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: The prediction point determination mode is determined based on the classification information of the current point.
22. The method according to claim 21, characterized in that, The step of determining the prediction point determination mode based on the classification information of the current point includes: If the category of the current point is the first category, then the prediction point determination mode is determined to be the first prediction point determination mode; If the category of the current point is the second category, then the prediction point determination mode is determined to be the second prediction point determination mode. The second prediction point determination mode and the first 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 second prediction point determination mode is different from the first prediction point determination mode.
23. The method according to claim 20, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: The prediction point determination mode is determined based on the classification information of the K reference points.
24. The method according to claim 23, characterized in that, The step of determining the prediction point determination mode based on the classification information of the K reference points includes: If the number of reference points among the K reference points that belong to the same category as the current point is greater than or equal to the first threshold, then the prediction point determination mode is determined to be 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 a 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.
25. The method according to claim 20, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: Decode the point cloud stream to obtain a second identifier, which is used to indicate the prediction point determination mode corresponding to the current point; The prediction point determination mode is determined based on the second identifier.
26. The method according to claim 20, characterized in that, The prediction point determination mode is the default mode.
27. The method according to claim 20, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: Obtain Q candidate prediction point determination patterns, wherein the Q candidate prediction point determination patterns are any Q patterns among the first prediction point determination pattern, the second prediction point determination pattern, and the third prediction point determination pattern, and Q is a positive integer greater than 1; From the Q candidate prediction point determination patterns, one prediction point determination pattern is determined as the prediction point determination pattern.
28. The method according to claim 27, characterized in that, The step of determining one prediction point candidate determination pattern as the prediction point determination pattern from the Q prediction point candidate determination patterns includes: The cost of determining the candidate prediction modes for the Q prediction points; The prediction point determination mode is determined based on the cost of the Q prediction point candidate determination modes.
29. The method according to claim 28, characterized in that, The cost of determining the candidate prediction modes for the Q prediction points includes: According to the decoding order, select P points that are closest to the current point from the decoded points, where P is a positive integer; For the j-th prediction point candidate determination mode among the Q prediction point candidate determination modes, the j-th prediction point candidate determination mode is used to predict the P points to obtain the attribute prediction values of the P points under the j-th prediction point candidate determination mode, where j is a positive integer; The cost of the j-th prediction point candidate mode is determined based on the attribute prediction values of the P points in the j-th prediction point candidate mode.
30. The method according to claim 29, characterized in that, The cost of determining the candidate pattern for the j-th prediction point based on the attribute prediction values of the P points in the candidate pattern for the j-th prediction point includes: Based on the attribute prediction values of the P points in the candidate determination mode of the j-th prediction point, determine the attribute reconstruction values of the P points in the candidate determination mode of the j-th prediction point. The cost of the candidate prediction mode for the j-th prediction point is determined based on the attribute reconstruction values of the P points in the candidate prediction mode for the j-th prediction point and the decoded attribute values of the P points.
31. The method according to any one of claims 20-30, characterized in that, If the prediction point determination mode is the first prediction point determination mode, then determining M prediction points from the K reference points according to the prediction point determination mode includes: The K reference points are determined as the M prediction points, where M equals K.
32. The method according to claim 30, characterized in that, If the prediction point determination mode is the second prediction point determination mode, then determining M prediction points from the K reference points according to the prediction point determination mode includes: Select one reference point from the K reference points and determine it as the prediction point, where M equals 1.
33. The method according to claim 32, characterized in that, The step of selecting a reference point from the K reference points and determining it as the prediction point includes: The reference point that is closest to the current point among the K reference points is determined as the prediction point.
34. The method according to claim 32, characterized in that, The step of selecting a reference point from the K reference points and determining it as the prediction point includes: Decode the point cloud stream to obtain the first index corresponding to the current point. The first index is used to indicate the first reference point, which is the reference point among the K reference points whose attribute information is closest to that of the current point. The first reference point corresponding to the first index among the K reference points is determined as the prediction point.
35. The method according to claim 30, characterized in that, If the prediction point determination mode is the third prediction point determination mode, then determining M prediction points from the K reference points according to the prediction point determination mode includes: The M reference points among the K reference points that have the same classification information as the current point and are closest to the current point are determined as the M prediction points.
36. The method according to claim 18, characterized in that, If M is greater than 1, determining the attribute prediction value of the current point based on the attribute information of the M prediction points includes: Based on the classification information of the M prediction points, determine the method for calculating the prediction value; Based on the prediction calculation method and the attribute information of the M prediction points, the attribute prediction value of the current point is determined.
37. The method according to claim 36, characterized in that, The predicted value is calculated using any one of the first, second, and third predicted value calculation methods.
38. The method according to claim 37, characterized in that, The step of determining the prediction value calculation method based on the classification information of the M prediction points includes: If the number of prediction points of the M prediction points that are of the same category as the current point 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 the number of prediction points of the same category as the current point among the M prediction points is less than the second threshold, then the prediction value calculation method is determined to be the second prediction value calculation method. The first prediction value calculation method and the second prediction value calculation method are any one of the first prediction value calculation method, the second prediction value calculation method and the third prediction value calculation method, and the first prediction value calculation method is different from the second prediction value calculation method.
39. The method according to claim 37, characterized in that, The step of determining the prediction value calculation method based on the classification information of the M prediction points includes: If the categories of the M predicted points and the current point are all the first category, then the predicted value calculation method is determined to be the third predicted value calculation method; If the categories of the M predicted points and the current point are all the second category, then the predicted value calculation method is determined to be the fourth predicted value calculation method. The third predicted value calculation method and the fourth predicted 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 third predicted value calculation method is different from the fourth predicted value calculation method.
40. The method according to claim 37, characterized in that, If the predicted value calculation method is the first predicted value calculation method, then determining the attribute predicted value of the current point based on the predicted value calculation method and the attribute information of the M predicted points includes: The reciprocal of the distance between each of the M prediction points and the current point is determined as the first weight of each of the M prediction points. Based on the first weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
41. The method according to claim 37, characterized in that, If the predicted value calculation method is the second predicted value calculation method, then determining the attribute predicted value of the current point based on the predicted value calculation method and the attribute information of the M predicted points includes: For each of the M prediction points, a second weight is determined based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights. Based on the second weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
42. The method according to claim 37, characterized in that, If the predicted value calculation method is the third predicted value calculation method, then determining the attribute predicted value of the current point based on the predicted value calculation method and the attribute information of the M predicted points includes: Determine the attribute-weighted average of the M prediction points, and use the attribute-weighted average as a prediction value; Based on the attribute information of the M prediction points, determine M prediction values; Based on the one predicted value and the M predicted values, determine the attribute predicted value of the current point.
43. The method according to claim 42, characterized in that, Determining the attribute-weighted average of the M prediction points includes: Based on the classification information of the M prediction points, determine the target weighted average method; The attribute-weighted average of the M prediction points is determined using the target weighted averaging method.
44. The method according to claim 43, characterized in that, The target weighted average method can be either the first weighted average method or the second weighted average method.
45. The method according to claim 44, characterized in that, The step of determining the target weighted average method based on the classification information of the M prediction points includes: If the number of prediction points of the M prediction points that are of the same category as the current point is greater than or equal to the second threshold, then the target weighted average method is determined to be the first weighted average method. If the number of prediction points of 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 weighted average method. The first weighted average method and the second weighted average method are either the first weighted average method or the second weighted average method, and the first weighted average method and the second weighted average method are different.
46. The method according to claim 44, characterized in that, The step of determining the target weighted average method based on the classification information of the M prediction points includes: If the categories of the M predicted points and the current point are all the first category, then 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 the second category, then the target weighted average method is determined to be the fourth weighted average method. The third weighted average method and the fourth weighted average method are either the first weighted average method or the second weighted average method, and the third weighted average method is different from the fourth weighted average method.
47. The method according to claim 44, characterized in that, If the target weighted calculation method is the first weighted average method, then determining the attribute weighted average of the M prediction points using the target weighted average method includes: The reciprocal of the distance between each of the M prediction points and the current point is determined as the first weight of each of the M prediction points. Based on the first weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the weighted average of the attributes of the M prediction points.
48. The method according to claim 44, characterized in that, If the target weighted calculation method is the second weighted average method, then determining the attribute weighted average of the M prediction points based on the prediction value calculation method and the target weighted average method includes: For each of the M prediction points, a second weight is determined based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights. Based on the second weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the weighted average of the attributes of the M prediction points.
49. The method according to claim 42, characterized in that, Determining the attribute prediction value of the current point based on the one predicted value and the M predicted values includes: Decode the point cloud bitstream to obtain the second index, which is used to indicate the target prediction value; The target predicted value corresponding to the second index among the one predicted value and the M predicted values is determined as the attribute predicted value of the current point.
50. A point cloud encoding method, characterized in that, include: Determine the classification information of the current point and the encoded points in the point cloud, and / or the distance information between the encoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs; Based on at least one of the classification information and distance information, determine K reference points for the current point from the encoded points, where K is a positive integer; Based on the attribute information of the K reference points, determine the predicted attribute value of the current point; Based on the attribute prediction value of the current point, determine the attribute residual value of the current point; The step of determining K reference points for the current point from the encoded points based on at least one of the classification information and distance information includes: Determine the reference point determination mode corresponding to the current point, wherein the reference point determination mode is any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode; Based on the reference point determination pattern, and at least one of the classification information and distance information, determine K reference points for the current point from the encoded points; The method for determining the reference point corresponding to the current point includes: Based on the classification information of the current point, determine the reference point determination mode corresponding to the current point.
51. The method according to claim 50, characterized in that, The step of determining the reference point determination mode corresponding to the current point based on the classification information of the current point includes: If the category of the current point is the first category, then the reference point determination mode is determined to be the first reference point determination mode; If the current point is classified as the second category, then the reference point determination mode is determined to be the second reference point determination mode. The second reference point determination mode and the first reference point determination mode are both any one of the first reference point 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.
52. The method according to claim 50, characterized in that, The reference point determination mode is the default mode.
53. The method according to claim 50, characterized in that, The method for determining the reference point corresponding to the current point further includes: Obtain N candidate reference point determination patterns, wherein the N candidate reference point determination patterns are any N patterns among the first reference point determination pattern, the second reference point determination pattern, and the third reference point determination pattern, and N is a positive integer; From the N candidate reference point determination patterns, one reference point candidate determination pattern is determined as the reference point determination pattern.
54. The method according to claim 53, characterized in that, The step of determining one reference point candidate determination pattern from the N reference point candidate determination patterns as the reference point determination pattern includes: The cost of determining the N candidate determination modes for reference points; The reference point determination mode with the lowest cost among the N reference point candidate determination modes is determined as the reference point determination mode.
55. The method according to claim 54, characterized in that, The cost of determining the N candidate modes for reference points includes: According to the encoding order, select P points that are closest to the current point from the encoded points, where P is a positive integer; For the j-th reference point candidate determination pattern among the N reference point candidate determination patterns, the j-th reference point candidate determination pattern is used to predict the P points to obtain the attribute prediction values of the P points under the j-th reference point candidate determination pattern, where j is a positive integer; The cost of the j-th reference point candidate mode is determined based on the attribute prediction values of the P points in the j-th reference point candidate mode.
56. The method according to claim 55, characterized in that, The cost of determining the candidate mode of the j-th reference point based on the attribute prediction values of the P points in the candidate mode of the j-th reference point includes: Based on the attribute prediction values of the P points in the j-th reference point candidate determination mode, determine the attribute reconstruction values of the P points in the j-th reference point candidate determination mode; The cost of 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.
57. The method according to claim 50, characterized in that, The method further includes: A first identifier is written into the point cloud code stream. The first identifier is used to indicate the reference point determination mode corresponding to the current point.
58. The method according to any one of claims 50-57, characterized in that, If the reference point determination mode is the first reference point determination mode, then determining K reference points for the current point from the encoded points based on the reference point determination mode and at least one of the classification information and distance information includes: According to the encoding order, select the K nearest encoded points to the current point from the encoded points and use them as the K reference points.
59. The method according to claim 58, characterized in that, If the reference point determination mode is the second reference point determination mode, then determining K reference points for the current point from the encoded points based on the reference point determination mode and at least one of the classification information and distance information includes: According to the encoding order, select K encoded points whose classification information is consistent with the classification information of the current point from the encoded points, and use them as the K reference points.
60. The method according to claim 50, characterized in that, If the reference point determination mode is the third reference point determination mode, then determining K reference points for the current point from the encoded points based on the reference point determination mode and at least one of the classification information and distance information includes: The weight of the encoded point is determined based on at least one of the classification information and distance information; The score of the encoded point is determined based on the weights. Based on the scores, the K reference points are determined from the encoded points.
61. The method according to claim 60, characterized in that, Determining the weight of the encoded point based on at least one of the classification information and distance information includes: For the i-th point among the encoded points, the weight of the i-th point is determined based on the classification information of the i-th point, where i is a positive integer.
62. The method according to claim 61, characterized in that, The step of determining the weight of the i-th point based on the classification information of the i-th point includes: 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.
63. The method according to claim 62, characterized in that, The step of determining 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 includes: 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 the classification information of the i-th 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.
64. The method according to claim 63, characterized in that, Determining the score of the encoded point based on the weight includes: 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.
65. The method according to claim 64, characterized in that, The step of determining the score of 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, includes: The score of the i-th point is determined by multiplying the distance information between the i-th point and the current point by the weight of the i-th point.
66. The method according to claim 65, characterized in that, If the second weight is greater than the first weight, then determining the K reference points from the encoded points based on the score includes: The K points with the lowest scores among the encoded points are determined as the K reference points.
67. The method according to claim 50, characterized in that, The step of determining the attribute prediction value of the current point based on the attribute information of the K reference points includes: M prediction points are determined from the K reference points, where M is a positive integer less than or equal to K; Based on the attribute information of the M prediction points, determine the attribute prediction value of the current point.
68. The method according to claim 67, characterized in that, The step of determining M prediction points from the K reference points includes: Determine the prediction point determination mode corresponding to the current point; Based on the prediction point determination pattern, M prediction points are determined from the K reference points.
69. The method according to claim 68, characterized in that, The prediction point determination mode is any one of the first prediction point determination mode, the second prediction point determination mode, and the third prediction point determination mode.
70. The method according to claim 69, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: The prediction point determination mode is determined based on the classification information of the current point.
71. The method according to claim 70, characterized in that, The step of determining the prediction point determination mode based on the classification information of the current point includes: If the category of the current point is the first category, then the prediction point determination mode is determined to be the first prediction point determination mode; If the category of the current point is the second category, then the prediction point determination mode is determined to be the second prediction point determination mode. The second prediction point determination mode and the first 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 second prediction point determination mode is different from the first prediction point determination mode.
72. The method according to claim 69, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: The prediction point determination mode is determined based on the classification information of the K reference points.
73. The method according to claim 72, characterized in that, The step of determining the prediction point determination mode based on the classification information of the K reference points includes: If the number of reference points among the K reference points that belong to the same category as the current point is greater than or equal to the first threshold, then the prediction point determination mode is determined to be 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 a 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.
74. The method according to claim 69, characterized in that, The prediction point determination mode is the default mode.
75. The method according to claim 69, characterized in that, The determination of the prediction point determination mode corresponding to the current point includes: Obtain Q candidate prediction point determination patterns, where N is a positive integer; From the Q candidate prediction point determination patterns, one prediction point determination pattern is determined as the prediction point determination pattern.
76. The method according to claim 75, characterized in that, The step of determining one prediction point candidate determination pattern as the prediction point determination pattern from the Q prediction point candidate determination patterns includes: The cost of determining the candidate prediction modes for the Q prediction points; The prediction point determination mode with the lowest cost among the Q prediction point candidate determination modes is determined as the prediction point determination mode.
77. The method according to claim 76, characterized in that, The cost of determining the candidate prediction modes for the Q prediction points includes: According to the encoding order, select P points that are closest to the current point from the encoded points, where P is a positive integer; For the j-th prediction point candidate determination mode among the Q prediction point candidate determination modes, the j-th prediction point candidate determination mode is used to predict the P points to obtain the attribute prediction values of the P points under the j-th prediction point candidate determination mode, where j is a positive integer; The cost of the j-th prediction point candidate mode is determined based on the attribute prediction values of the P points in the j-th prediction point candidate mode.
78. The method according to claim 77, characterized in that, The cost of determining the candidate pattern for the j-th prediction point based on the attribute prediction values of the P points in the candidate pattern for the j-th prediction point includes: Based on the attribute prediction values of the P points in the candidate determination mode of the j-th prediction point, determine the attribute reconstruction values of the P points in the candidate determination mode of the j-th prediction point. The cost of the candidate prediction mode for the j-th prediction point is determined based on the attribute reconstruction values of the P points in the candidate prediction mode for the j-th prediction point, and the encoded attribute values of the P points.
79. The method according to claim 69, characterized in that, The method includes: A second identifier is written into the point cloud code stream. The second identifier is used to indicate the prediction point determination mode corresponding to the current point.
80. The method according to any one of claims 69-79, characterized in that, If the prediction point determination mode is the first prediction point determination mode, then determining M prediction points from the K reference points according to the prediction point determination mode includes: The K reference points are determined as the M prediction points, where M equals K.
81. The method according to claim 80, characterized in that, If the prediction point determination mode is the second prediction point determination mode, then determining M prediction points from the K reference points according to the prediction point determination mode includes: Select one reference point from the K reference points and determine it as the prediction point, where M equals 1.
82. The method according to claim 81, characterized in that, The step of selecting a reference point from the K reference points and determining it as the prediction point includes: The reference point that is closest to the current point among the K reference points is determined as the prediction point.
83. The method according to claim 81, characterized in that, The step of selecting a reference point from the K reference points and determining it as the prediction point includes: The first reference point among the K reference points that has the closest attribute information to the current point is determined as the prediction point.
84. The method according to claim 83, characterized in that, The method further includes: A first index is written into the point cloud code stream, and the first index is used to indicate the first reference point.
85. The method according to claim 80, characterized in that, If the prediction point determination mode is the third prediction point determination mode, then determining M prediction points from the K reference points according to the prediction point determination mode includes: The M reference points among the K reference points that have the same classification information as the current point and are closest to the current point are determined as the M prediction points.
86. The method according to claim 67, characterized in that, If M is greater than 1, determining the attribute prediction value of the current point based on the attribute information of the M prediction points includes: Based on the classification information of the M prediction points, determine the method for calculating the prediction value; Based on the prediction calculation method and the attribute information of the M prediction points, the attribute prediction value of the current point is determined.
87. The method according to claim 86, characterized in that, The predicted value is calculated using any one of the first, second, and third predicted value calculation methods.
88. The method according to claim 87, characterized in that, The step of determining the prediction value calculation method based on the classification information of the M prediction points includes: If the number of prediction points of the M prediction points that are of the same category as the current point 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 the number of prediction points of the same category as the current point among the M prediction points is less than the second threshold, then the prediction value calculation method is determined to be the second prediction value calculation method. The first prediction value calculation method and the second prediction value calculation method are any one of the first prediction value calculation method, the second prediction value calculation method and the third prediction value calculation method, and the first prediction value calculation method is different from the second prediction value calculation method.
89. The method according to claim 87, characterized in that, The step of determining the prediction value calculation method based on the classification information of the M prediction points includes: If the categories of the M predicted points and the current point are all the first category, then the predicted value calculation method is determined to be the third predicted value calculation method; If the categories of the M predicted points and the current point are all the second category, then the predicted value calculation method is determined to be the fourth predicted value calculation method. The third predicted value calculation method and the fourth predicted 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 third predicted value calculation method is different from the fourth predicted value calculation method.
90. The method according to claim 87, characterized in that, If the predicted value calculation method is the first predicted value calculation method, then determining the attribute predicted value of the current point based on the predicted value calculation method and the attribute information of the M predicted points includes: The reciprocal of the distance between each of the M prediction points and the current point is determined as the first weight of each of the M prediction points. Based on the first weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
91. The method according to claim 87, characterized in that, If the predicted value calculation method is the second predicted value calculation method, then determining the attribute predicted value of the current point based on the predicted value calculation method and the attribute information of the M predicted points includes: For each of the M prediction points, a second weight is determined based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights. Based on the second weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the attribute prediction value of the current point.
92. The method according to claim 87, characterized in that, If the predicted value calculation method is the third predicted value calculation method, then determining the attribute predicted value of the current point based on the predicted value calculation method and the attribute information of the M predicted points includes: Determine the attribute-weighted average of the M prediction points, and use the attribute-weighted average as a prediction value; Based on the attribute information of the M prediction points, determine M prediction values; Based on the one predicted value and the M predicted values, determine the attribute predicted value of the current point.
93. The method according to claim 87, characterized in that, Determining the attribute-weighted average of the M prediction points includes: Based on the classification information of the M prediction points, determine the target weighted average method; The attribute-weighted average of the M prediction points is determined using the target weighted averaging method.
94. The method according to claim 93, characterized in that, The target weighted average method can be either the first weighted average method or the second weighted average method.
95. The method according to claim 94, characterized in that, The step of determining the target weighted average method based on the classification information of the M prediction points includes: If the number of prediction points of the M prediction points that are of the same category as the current point is greater than or equal to the second threshold, then the target weighted average method is determined to be the first weighted average method. If the number of prediction points of 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 weighted average method. The first weighted average method and the second weighted average method are either the first weighted average method or the second weighted average method, and the first weighted average method and the second weighted average method are different.
96. The method according to claim 94, characterized in that, The step of determining the target weighted average method based on the classification information of the M prediction points includes: If the categories of the M predicted points and the current point are all the first category, then 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 the second category, then the target weighted average method is determined to be the fourth weighted average method. The third weighted average method and the fourth weighted average method are either the first weighted average method or the second weighted average method, and the third weighted average method is different from the fourth weighted average method.
97. The method according to claim 94, characterized in that, If the target weighted calculation method is the first weighted average method, then determining the attribute weighted average of the M prediction points using the target weighted average method includes: The reciprocal of the distance between each of the M prediction points and the current point is determined as the first weight of each of the M prediction points. Based on the first weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the weighted average of the attributes of the M prediction points.
98. The method according to claim 94, characterized in that, If the target weighted calculation method is the second weighted average method, then determining the attribute weighted average of the M prediction points based on the prediction value calculation method and the target weighted average method includes: For each of the M prediction points, a second weight is determined based on the position information of the prediction point and the current point, as well as the preset coordinate axis weights. Based on the second weight of each of the M prediction points, the attribute information of the M prediction points is weighted to obtain the weighted average of the attributes of the M prediction points.
99. The method according to claim 92, characterized in that, Determining the attribute prediction value of the current point based on the one predicted value and the M predicted values includes: The predicted value and the target predicted value among the M predicted values are determined as the attribute predicted value of the current point.
100. The method according to claim 99, characterized in that, The method further includes: A second index is written into the point cloud code stream, which is used to indicate the target predicted value.
101. A point cloud decoding device, characterized in that, include: An information determination unit is used to determine the classification information of the current point and the decoded points in the point cloud, and / or the distance information between the decoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs; A reference point determination unit is configured to determine K reference points for the current point from the decoded points based on at least one of the classification information and distance information, where K is a positive integer; The prediction value determination unit is used to determine the attribute prediction value of the current point based on the attribute information of the K reference points; A reconstruction unit is used to determine the reconstructed attribute value of the current point based on the attribute prediction value of the current point; The reference point determination unit is further configured to: Based on the classification information of the current point, the reference point determination mode corresponding to the current point is determined. The reference point determination mode is any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode. Based on the reference point determination pattern and at least one of the classification information and distance information, determine K reference points for the current point from the decoded points.
102. A point cloud encoding device, characterized in that, include: An information determination unit is used to determine the classification information of the current point and the encoded points in the point cloud, and / or the distance information between the encoded points and the current point, wherein the classification information is used to indicate the category to which the point belongs; A reference point determination unit is configured to determine K reference points for the current point from the encoded points based on at least one of the classification information and distance information, where K is a positive integer; The prediction value determination unit is used to determine the attribute prediction value of the current point based on the attribute information of the K reference points; The encoding unit is used to determine the attribute residual value of the current point based on the attribute prediction value of the current point; The reference point determination unit is further configured to: Based on the classification information of the current point, the reference point determination mode corresponding to the current point is determined. The reference point determination mode is any one of the first reference point determination mode, the second reference point determination mode, and the third reference point determination mode. Based on the reference point determination pattern and at least one of the classification information and distance information, determine K reference points for the current point from the encoded points.
103. An electronic device, characterized in that, include: Processor and memory; The memory is used to store computer programs; The processor is used to invoke and run a computer program stored in the memory to perform the method as described in any one of claims 1 to 49 or 50 to 100.
104. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 49 or 50 to 100.