Attribute encoding method, attribute decoding method, and electronic device
By considering the geometric and attribute distances between the point to be encoded and its neighboring points in point cloud coding, K target neighboring points are selected for attribute prediction, which solves the problem of information redundancy in point cloud coding and achieves lower bit rate coding.
Patent Information
- Application Number
- CN202310853890.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-07-12
AI Technical Summary
During the point cloud encoding process, the spatial distance between the point to be encoded and the adjacent predicted points is close, but the attribute values differ greatly, resulting in information redundancy in the encoded bitstream.
Based on the geometric distance and attribute distance between the point to be encoded and multiple candidate neighbor points, K first target neighbor points are determined, and attribute prediction is performed according to the attribute values of these neighbor points to generate an encoded bitstream.
The information redundancy of the encoded code stream is reduced, and the bit rate is reduced.
Smart Images

Figure CN119316597B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of coding, and particularly relates to an attribute encoding method, an attribute decoding method and an electronic device. BACKGROUND
[0002] A point cloud is a set of discrete points irregularly distributed in space, which expresses the spatial structure and surface attributes of a three-dimensional object or scene. In the encoding process of the point cloud, attribute information encoding is involved. At present, the nearest neighbor point corresponding to a to-be-encoded point is determined according to the geometric information of the encoded points, and then the attribute value of the nearest neighbor point is weightedly predicted to obtain the attribute prediction value of the to-be-encoded point.
[0003] However, there may be a case that the spatial distance between the to-be-encoded point and the neighboring prediction point is close, but the attribute values are quite different in the point cloud. If the nearest neighbor point is determined according to the geometric information of the encoded points, and the attribute of the to-be-encoded point is encoded based on the attribute value of the nearest neighbor point, an encoded code stream with information redundancy is easily obtained. SUMMARY
[0004] The attribute encoding method, the attribute decoding method and the electronic device provided in the embodiments of the present application can solve the technical problem that the encoded code stream has information redundancy.
[0005] In a first aspect, an attribute encoding method is provided, comprising:
[0006] The encoding end determines K first target neighbor points in the plurality of neighbor candidate points based on the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point in the plurality of candidate neighbor points; the candidate neighbor point is at least part of the encoded points in the plurality of encoded points, the attribute distance is determined based on the attribute information of the to-be-encoded point and the attribute information of the candidate neighbor point, and K is a positive integer greater than or equal to 1;
[0007] The encoding end performs attribute prediction on the to-be-encoded point according to the attribute value of each first target neighbor point to obtain the attribute prediction value of the to-be-encoded point;
[0008] The encoding end encodes the attribute residual of the to-be-encoded point to generate the encoded code stream corresponding to the to-be-encoded point; the attribute residual of the to-be-encoded point is determined based on the attribute prediction value of the to-be-encoded point and the original attribute value of the to-be-encoded point.
[0009] In a second aspect, an attribute decoding method is provided, comprising:
[0010] The decoding end parses the obtained encoded code stream to obtain a to-be-decoded point and a plurality of decoded points;
[0011] The decoding end determines K first target neighbor points in the plurality of neighbor candidate points based on geometric distances and attribute distances between the to-be-decoded point and each of a plurality of candidate neighbor points; the candidate neighbor points are at least part of the plurality of decoded points, the attribute distance is determined based on attribute information of the to-be-decoded point and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1;
[0012] The decoding end performs attribute prediction on the to-be-decoded point according to the attribute value of each first target neighbor point, and obtains an attribute prediction value of the to-be-decoded point.
[0013] The decoding end determines an attribute reconstruction value of the to-be-decoded point according to the attribute prediction value of the to-be-decoded point and an attribute residual of the to-be-decoded point; the attribute residual of the to-be-decoded point is obtained based on parsing of the encoded code stream.
[0014] In a third aspect, an attribute encoding apparatus is provided, comprising:
[0015] A first determining module is configured to determine K first target neighbor points in the plurality of neighbor candidate points based on geometric distances and attribute distances between the to-be-encoded point and each of a plurality of candidate neighbor points; the candidate neighbor points are at least part of the plurality of encoded points, the attribute distance is determined based on attribute information of the to-be-encoded point and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1.
[0016] A prediction module is configured to perform attribute prediction on the to-be-encoded point according to the attribute value of each first target neighbor point, and obtain an attribute prediction value of the to-be-encoded point.
[0017] A generation module is configured to encode an attribute residual of the to-be-encoded point, and generate an encoded code stream corresponding to the to-be-encoded point; the attribute residual of the to-be-encoded point is determined based on the attribute prediction value of the to-be-encoded point and an original attribute value of the to-be-encoded point.
[0018] In a fourth aspect, an attribute decoding apparatus is provided, comprising:
[0019] A parsing module is configured to parse an obtained encoded code stream, and obtain a to-be-decoded point and a plurality of decoded points.
[0020] A first determining module is configured to determine K first target neighbor points in the plurality of neighbor candidate points based on geometric distances and attribute distances between the to-be-decoded point and each of a plurality of candidate neighbor points; the candidate neighbor points are at least part of the plurality of decoded points, the attribute distance is determined based on attribute information of the to-be-decoded point and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1.
[0021] a prediction module configured to perform attribute prediction on the to-be-decoded point according to attribute values of each first target neighbor point, to obtain an attribute prediction value of the to-be-decoded point;
[0022] a second determination module configured to determine an attribute reconstruction value of the to-be-decoded point according to the attribute prediction value of the to-be-decoded point and an attribute residual of the to-be-decoded point, the attribute residual of the to-be-decoded point being obtained by parsing the encoded code stream.
[0023] In a fifth aspect, an electronic device is provided, which includes a processor and a memory, the memory storing programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement steps of the method according to the first aspect, or implement steps of the method according to the second aspect.
[0024] In a sixth aspect, a readable storage medium is provided, which stores programs or instructions, and the programs or instructions, when executed by a processor, implement steps of the method according to the first aspect, or implement steps of the method according to the second aspect.
[0025] In a seventh aspect, a chip is provided, which includes a processor and a communication interface, the communication interface being coupled to the processor, and the processor being configured to execute programs or instructions to implement the method according to the first aspect, or implement the method according to the second aspect.
[0026] In an eighth aspect, a computer program / program product is provided, which is stored in a storage medium, and the computer program / program product is executed by at least one processor to implement steps of the method according to the first aspect, or implement steps of the method according to the second aspect.
[0027] In the embodiments of the present application, K first target neighbor points are determined from a plurality of candidate neighbor points based on geometric distances and attribute distances between the to-be-encoded point and each candidate neighbor point; attribute prediction is performed on the to-be-encoded point according to attribute values of each first target neighbor point, to obtain an attribute prediction value of the to-be-encoded point; and attribute residuals of the to-be-encoded point are encoded to generate an encoded code stream corresponding to the to-be-encoded point. Compared with the related art in which only the geometric information of an already-encoded point is used to determine a nearest neighbor point, the present embodiments determine a nearest neighbor point based on geometric distances and attribute distances between the to-be-encoded point and each candidate neighbor point, so that the spatial distance between the nearest neighbor point and the to-be-encoded point is relatively short and the attribute values of the two points are also not greatly different, and then attribute encoding is performed on the to-be-encoded point based on the attribute value of the nearest neighbor point, to obtain an encoded code stream with less information redundancy, thereby reducing the code rate of the encoded code stream. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1is a partial framework schematic diagram of a G-PCC point cloud encoding device;
[0029] Figure 2 is a partial framework schematic diagram of a G-PCC point cloud decoding device;
[0030] Figure 3 is a schematic diagram of an application scenario of updating a nearest neighbor point;
[0031] Figure 4 is a schematic diagram of an application scenario of a method distribution relationship;
[0032] Figure 5 is a schematic diagram of a process of an attribute encoding method provided by an embodiment of the application;
[0033] Figure 6 is a schematic diagram of an application process of an attribute encoding method provided by an embodiment of the application;
[0034] Figure 7 is a schematic diagram of a process of an attribute decoding method provided by an embodiment of the application;
[0035] Figure 8 is a structural diagram of an attribute encoding device provided by an embodiment of the application;
[0036] Figure 9 is a structural diagram of an attribute decoding device provided by an embodiment of the application;
[0037] Figure 10 is a structural diagram of an electronic device provided by an embodiment of the application;
[0038] Figure 11 is a schematic diagram of a hardware structure of a terminal provided by an embodiment of the application. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the application will be clearly described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are some but not all of the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the application.
[0040] The terms "first", "second", and the like in the specification are used to distinguish between similar objects, and are not used to describe a particular sequential or chronological order. It is to be understood that such terms are used interchangeably, where appropriate, to refer to an embodiment of the application, and that embodiments of the application can be implemented in any order, unless otherwise specified herein. It is also to be understood that the terminology "first", "second", and the like can refer to a single object at different times, or to different objects. For example, the first object can be one or more, and the second object can be one or more. Furthermore, "or" as used in the specification is to be interpreted as "at least one of". For example, "A or B" covers the scenarios where: (1) A is included and B is not included; (2) B is included and A is not included; and (3) both A and B are included. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0041] The term "indicate" in the specification can be a direct indication (or explicit indication) or an indirect indication (or implicit indication). The direct indication can be understood as the sender explicitly informing the receiver of the specific information, the operation to be performed or the requested result, etc. in the indication sent by the sender. The indirect indication can be understood as the receiver determining the corresponding information according to the indication sent by the sender, or making a judgment and determining the operation to be performed or the requested result, etc. according to the judgment result.
[0042] The attribute encoding method in the embodiments of the present application corresponds to an attribute encoding device and an attribute decoding method corresponds to an attribute decoding device. The terminal can also be referred to as a terminal device or a user terminal (User Equipment, UE). The terminal can be a mobile phone, a tablet personal computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a notebook computer, a personal digital assistant (Personal Digital Assistant, PDA), a palm computer, a netbook, an ultra-mobile personal computer (Ultra-mobile Personal Computer, UMPC), a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) device, a virtual reality (Virtual Reality, VR) device, a robot, a wearable device, a flight vehicle, a vehicle user equipment (Vehicle User Equipment, VUE), a shipboard terminal, a pedestrian user equipment (Pedestrian User Equipment, PUE), a smart home (a home device with wireless communication function, such as a refrigerator, a television, a washing machine, or furniture, etc.), a game console, a personal computer (Personal Computer, PC), a teller machine, or a self-service machine, and the like terminal side device. The wearable device includes a smart watch, a smart bracelet, a smart earphone, smart glasses, smart jewelry (a smart bracelet, a smart necklace, a smart ring, a smart necklace, a smart ankle bracelet, a smart ankle chain, etc.), a smart wristband, smart clothing, and the like. The vehicle-mounted device can also be referred to as a vehicle-mounted terminal, a vehicle-mounted controller, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip, or a vehicle-mounted unit, and the like. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.
[0043] For the convenience of understanding, some contents related to the embodiments of the present application are described as follows:
[0044] Please refer to Figure 1 For example, Figure 1As shown, currently, in digital audio and video codec technical standards, a geometry-based point cloud compression (G-PCC) point cloud coding device can be used to encode the attribute information of a point cloud. Specifically, the attribute information of the point cloud can be color-converted and recolored. Then, based on the reconstructed geometric information, a region-adaptive transformation based on upsampling prediction or a lifting transformation based on hierarchical structure division can be performed on the recolored attribute information to obtain transform coefficients. The transform coefficients are then quantized to obtain quantized coefficients. Finally, the quantized coefficients are arithmetically coded to obtain an attribute bitstream.
[0045] See also Figure 2 ,like Figure 2 As shown, currently, in digital audio and video codec technical standards, a G-PCC point cloud decoding device can be used to decode the attribute information of the point cloud. It should be understood that the implementation process of the G-PCC point cloud decoding device for decoding the attribute information of the point cloud is the inverse process of its encoding process, and will not be repeated here.
[0046] It should be noted that the process of encoding the attribute information of the point cloud generally includes a lifting transformation based on the Level of Detail (LOD) structure and a prediction transformation based on the LOD structure.
[0047] In the lifting transformation based on the LOD structure, the points in the point cloud are first Morton sorted. Optionally, Morton sorting can be performed in the following ways:
[0048] With variable P i Represents a point in the input point cloud, the variable M i For P i The related Morton code. Each dimension of the geometric three-dimensional coordinates x, y, and z of a point is represented by a d-bit binary number:
[0049]
[0050] Among them, x l ,y l ,z l ∈{0,1} are the binary values corresponding to the highest bit (l=1) to the lowest bit (l=d) of x, y, and z, respectively. Morton sorting is performed on x, y, and z starting from the highest bit. The calculation formula for the Morton code of each point is as follows:
[0051]
[0052] Among them, m l'are the values of M from the highest bit (l'=1) to the lowest bit (l'=3d) respectively. After obtaining the Morton code M of each point in the point cloud, the points are rearranged in the order of the Morton code from small to large.
[0053] The LOD of the point cloud is constructed based on an iterative downsampling method, including but not limited to distance-based, sampling rate-based and octree structure, thereby establishing the hierarchical structure of the point cloud. In some embodiments, the sampling rate-based partitioning method is as follows: in order to divide the point cloud into four levels of detail, the indices of the points obtained by sorting the Morton values are sampled at a rate of y times, and one point in every y indices is divided into a refined level, and the rest are sampled into the lowest level LOD. For each additional refined level, the remaining points in the point indices that have not been sampled continue to be sampled at a rate of y times, and one point in every y indices is divided into a new refined level, and the rest are sampled into the detail level LOD. This iteration continues until all points are sampled to obtain the highest level of detail LOD, thereby constructing the final LOD structure of the point cloud.
[0054] An optional implementation is that the points of a lower level and the points of the same level that have been reconstructed can be used to predict the points of a higher level, and the points of the lower level and the same level are used as reference points.
[0055] Another optional implementation is to find the nearest neighbors of the current point to be coded from the reconstructed points in the coded frame, thereby performing attribute prediction. Specifically, let the Morton code of the current point to be coded be q, and find the first point in the previous coded frame whose Morton code is greater than or equal to q according to the point index order of the frame. Take all points in the LOD level of the point as a reference point set, search for points within a certain range, calculate the geometric distance of each point from the point to be coded, and compare it with the distance of the nearest neighbor point found in the same frame, and select the final multiple prediction points.
[0056] It should be noted that after determining the multiple neighboring points of the point to be coded, the orientation distribution needs to be judged so that the neighbor distribution can be multi-directional, thereby improving the prediction accuracy.
[0057] Specifically, two lists (List) List1 and List2 can be constructed, wherein List1 contains multiple nearest neighbors obtained using the existing G-PCC neighbor searching method, and List2 contains N points discarded in the process of updating the nearest neighbors. For example, N=3, and the generation processes of List1 and List2 are as shown in Figure 3 .
[0058] Figure 3 Eight neighbor points N0 to N7 are shown, and the distances between each neighbor point and the point to be coded are shown. In Figure 3In the middle, if the points in List1 such as P1 and P2, P1 and P0, P2 and P0 do not meet the direction strict opposite, it means that the distribution of the neighbor points is not extensive enough. Therefore, according to the candidate point sorting of List2, it is searched whether there is a neighbor point opposite to the point in List1 in List2, if there is and it meets certain geometric distance limit, the search is stopped and the farthest neighbor point in List1 is updated.
[0059] If there is no point in List2 that meets the above conditions, and the points in List1 such as P1 and P2, P1 and P0, P2 and P0 can meet the direction wide opposite of at least one pair of points, there is no need to update the farthest neighbor point.
[0060] If there is no point in List2 that meets the above conditions, and the points in List1 cannot meet the direction wide opposite of at least one pair of points, according to the candidate point sorting of List2, it is searched whether there is a candidate point opposite to the point in List1 in List2, if there is and it meets certain geometric distance limit, the search is stopped and the farthest neighbor point in List1 is updated.
[0061] It should be understood that the distribution relationship between points can be determined by Figure 4 judging the direction distribution relationship between points.
[0062] For example, in the application scenario shown in the figure, P is a point to be encoded, and a three-dimensional coordinate is constructed with the point to be encoded as the center of the coordinate axis. Figure 4
[0063] If a point is located in the region marked 0 and another point is located in the region marked 7, it is determined that the direction distribution relationship between the two points is strict opposite. If a point is located in the region marked 1 and another point is located in the region marked 6, it is determined that the direction distribution relationship between the two points is strict opposite. If a point is located in the region marked 2 and another point is located in the region marked 6, it is determined that the direction distribution relationship between the two points is strict opposite. If a point is located in the region marked 3 and another point is located in the region marked 4, it is determined that the direction distribution relationship between the two points is strict opposite.
[0064] If one point is located in the region of the identifier 0 and the other point is located in the region of the identifier 3, the identifier 5 or the identifier 6, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 1 and the other point is located in the region of the identifier 2, the identifier 4 or the identifier 7, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 2 and the other point is located in the region of the identifier 1, the identifier 4 or the identifier 7, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 3 and the other point is located in the region of the identifier 0, the identifier 5 or the identifier 6, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 4 and the other point is located in the region of the identifier 1, the identifier 2 or the identifier 7, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 5 and the other point is located in the region of the identifier 0, the identifier 3 or the identifier 6, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 6 and the other point is located in the region of the identifier 3, the identifier 5 or the identifier 0, it is determined that the azimuth distribution relationship of the two points is wide relative. If one point is located in the region of the identifier 7 and the other point is located in the region of the identifier 1, the identifier 2 or the identifier 4, it is determined that the azimuth distribution relationship of the two points is wide relative.
[0065] After the nearest neighbor points are determined, the prediction of the attribute information of the to-be-predicted point can be performed by the following formula:
[0066]
[0067] wherein A i is the predicted value of the attribute of the current point, k is the number of the neighbor points, A j is the attribute reconstruction value of the neighbor point, w j is the corresponding weight coefficient thereof, which is generally given by the following formula:
[0068]
[0069] wherein d ij is the distance between the neighbor point and the to-be-predicted point, f(d ij ) is a function related to d ij , that is, according to the distance between each neighbor point and the to-be-predicted point, the correlation is weakened with the increase of the distance, and thus the attribute reconstruction value of the neighbor point with smaller distance is given a larger weight.
[0070] In the prediction transformation based on the LOD structure, a rate-distortion optimization technique is introduced. That is, the prediction value and the corresponding prediction mode of each neighbor point are determined, and the selection of the prediction mode is performed by the rate-distortion method. Finally, the selected prediction mode and the quantized residual are jointly encoded into the code stream of the attribute information.
[0071] Thus, in the G-PCC point cloud attribute encoding process, only the nearest neighbor point corresponding to the to-be-encoded point is determined according to the geometric information of the encoded point, and then the attribute value of the nearest neighbor point is weighted predicted to obtain the attribute prediction value of the to-be-encoded point. However, there may be a case that the spatial distance between the to-be-encoded point and the neighboring prediction point is close, but the attribute values are quite different. If the nearest neighbor point is determined according to the geometric information of the encoded point, and the attribute of the to-be-encoded point is encoded based on the attribute value of the nearest neighbor point, the encoding code stream with information redundancy is easily obtained.
[0072] To solve the above technical problems, the present application provides an attribute encoding method, which can be applied to an encoding end. The attribute encoding method provided by the embodiments of the present application will be described in detail below in combination with the drawings and some embodiments and application scenarios.
[0073] Please refer to Figure 5 , Figure 5 is a flowchart of the attribute encoding method in the embodiments of the present application. The attribute encoding method provided in the embodiments includes the following steps:
[0074] S501, the encoding end determines K first target neighbor points in the plurality of neighbor candidate points based on the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point in the plurality of candidate neighbor points.
[0075] In this step, the point cloud can be color-converted and recolored to obtain a recolored geometric reconstructed point cloud, and the ordering of the points in the point cloud is determined based on the geometric information of the point cloud according to a space-filling curve. The above ordering manner includes but is not limited to Morton ordering and Hilbert ordering.
[0076] The point cloud after geometric ordering is divided by LOD to construct a hierarchical structure of the point cloud. The above division manner includes but is not limited to dividing the point cloud based on distance, sampling rate and octree structure.
[0077] An optional implementation is that after the points in the bottom level are encoded, the points in the bottom level and the reconstructed points in the same level are used to predict the points in the high level, and the points in the bottom level and the same level are used as reference points to obtain candidate neighbor points. Another optional implementation is that under a multi-frame sequence, the reconstructed points in the encoded frame can also be used for prediction, and the reference frame points with high correlation are used as reference points. At this time, the reference frame and the to-be-encoded point are in different time frames, and then the points in a certain search range in the reference points are used as neighbor candidate points.
[0078] It should be noted that the above candidate neighbor points are at least part of the encoded points.
[0079] In this step, after determining the candidate neighbor points, the geometric distance between the to-be-encoded point and each of the candidate neighbor points is obtained, and the attribute distance between the to-be-encoded point and each of the candidate neighbor points is determined, where the attribute distance is determined based on the attribute information of the to-be-encoded point and the attribute information of the candidate neighbor points. Alternatively, the attribute distance between the to-be-encoded point and the candidate neighbor points can be determined according to the difference between the attribute value of the to-be-encoded point and the attribute value of the candidate neighbor points.
[0080] Further, based on the geometric distance and the attribute distance between the to-be-encoded point and each of the candidate neighbor points, K first target neighbor points in the plurality of candidate neighbor points are determined, where K is a positive integer greater than or equal to 1. The first target neighbor points can be understood as K candidate neighbor points that are closest to the to-be-encoded point in terms of geometric distance and have the smallest difference in attribute value.
[0081] S502, the encoding end performs attribute prediction on the to-be-encoded point according to the attribute value of each first target neighbor point, to obtain an attribute prediction value of the to-be-encoded point.
[0082] An optional implementation is that the attribute prediction value of the to-be-encoded point can be calculated by the following formula:
[0083]
[0084] where predAttr represents the attribute prediction value of the current to-be-encoded point, nearestNeighNum represents the number of nearest neighbor points finally selected for predicting the to-be-encoded point, reconAttr[i] represents the reconstructed attribute value of the i th nearest neighbor point, and w[i] is the weight coefficient corresponding to the i th nearest neighbor point, which can be determined based on the target distance or the geometric distance between the to-be-encoded point and the first target neighbor point. Alternatively, the weight coefficient can be the reciprocal of the target distance between the to-be-encoded point and the first target neighbor point.
[0085] Another optional implementation is that the rate-distortion cost corresponding to each first target neighbor point is calculated, and then the first target neighbor point with the minimum rate-distortion cost is used to perform attribute prediction on the to-be-encoded point, to obtain the attribute prediction value of the to-be-encoded point.
[0086] S503, the encoding end encodes the attribute residual of the to-be-encoded point, to generate a coded bitstream corresponding to the to-be-encoded point.
[0087] It should be understood that the attribute residual of the to-be-encoded point is determined based on the attribute prediction value of the to-be-encoded point and the original attribute value of the to-be-encoded point. Alternatively, the difference between the original attribute value and the attribute prediction value of the to-be-encoded point can be determined as the attribute residual of the to-be-encoded point, and then the attribute residual of the to-be-encoded point is encoded to generate the coded bitstream corresponding to the to-be-encoded point.
[0088] In the embodiment of the present application, K first target neighbor points are determined from the plurality of neighbor candidate points based on the geometric distance and the attribute distance between the to-be-encoded point and each of the plurality of candidate neighbor points; the attribute of the to-be-encoded point is predicted based on the attribute value of each of the first target neighbor points to obtain an attribute prediction value of the to-be-encoded point; and the attribute residual of the to-be-encoded point is encoded to generate a corresponding encoded code stream of the to-be-encoded point. Compared with the related art in which only the geometric information of the already-encoded point is used to determine the nearest neighbor point, the nearest neighbor point is determined based on the geometric distance and the attribute distance between the to-be-encoded point and each of the candidate neighbor points in the embodiment, so that the spatial distance between the nearest neighbor point and the to-be-encoded point is relatively short and the attribute values of the two points are also not greatly different. Then, the attribute of the to-be-encoded point is encoded based on the attribute value of the nearest neighbor point to obtain an encoded code stream with less information redundancy, thereby reducing the code rate of the encoded code stream.
[0089] Optionally, the determining the K first target neighbor points from the plurality of neighbor candidate points based on the geometric distance and the attribute distance between the to-be-encoded point and each of the plurality of candidate neighbor points comprises:
[0090] calculating the geometric distance between the to-be-encoded point and each of the candidate neighbor points, and determining the attribute distance between the to-be-encoded point and each of the candidate neighbor points based on the attribute information of the to-be-encoded point and the attribute information of each of the candidate neighbor points;
[0091] determining a target distance between the to-be-encoded point and each of the candidate neighbor points based on the geometric distance and the attribute distance between the to-be-encoded point and each of the candidate neighbor points;
[0092] determining K first neighbor points from the plurality of candidate neighbor points corresponding to the minimum target distance;
[0093] updating the K first neighbor points based on the orientation distribution relationship between the to-be-encoded point and each of the first neighbor points to obtain the K first target neighbor points.
[0094] In the embodiment, the geometric information of the to-be-encoded point and the geometric information of each of the candidate neighbor points can be obtained, and then the geometric distance between the to-be-encoded point and each of the candidate neighbor points is calculated based on the geometric information of the to-be-encoded point and the geometric information of each of the candidate neighbor points. The geometric information includes geometric coordinates, which can be Cartesian coordinates, spherical coordinates or cylindrical coordinates, and the geometric distance between the to-be-encoded point and the candidate neighbor points can be the Euclidean distance or the Manhattan distance between the to-be-encoded point and the candidate neighbor points.
[0095] In this embodiment, the attribute information of the to-be-encoded point and the attribute information of each candidate neighbor point are obtained, and then the attribute distance between the to-be-encoded point and each candidate neighbor point is determined based on the attribute information of the to-be-encoded point and the attribute information of each candidate neighbor point. The attribute distance can represent the difference between the attribute information of the to-be-encoded point and the attribute information of the candidate neighbor point.
[0096] It should be understood that the attribute information includes two types, namely, reflectivity information and color information, and the color information includes Y component information, U component information and V component information.
[0097] After the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point are determined, the target distance between the to-be-encoded point and each candidate neighbor point can be determined based on the geometric distance and the attribute distance. Alternatively, the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point can be weighted and summed to obtain the target distance between the to-be-encoded point and each candidate neighbor point. For how to determine the target distance between the to-be-encoded point and each candidate neighbor point, please refer to subsequent embodiments.
[0098] The target distance can represent the correlation between the attribute information of the to-be-encoded point and the attribute information of the candidate neighbor point, and can also represent the correlation between the geometric information of the to-be-encoded point and the geometric information of the candidate neighbor point. Therefore, K first neighbor points corresponding to the minimum target distance among the plurality of candidate neighbor points can be determined, that is, the K first neighbor points are close to the to-be-encoded point in geometric distance, and the attribute information of the K first neighbor points is not much different from the attribute information of the to-be-encoded point.
[0099] In this embodiment, the K first neighbor points are updated according to the orientation distribution relationship between the to-be-encoded point and each first neighbor point, to obtain updated K first target neighbor points.
[0100] In this embodiment, the nearest neighbor point is determined according to the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point, and then the first target neighbor point close to the to-be-encoded point in space and close to the to-be-encoded point in attribute value is obtained.
[0101] In other embodiments, after the plurality of candidate neighbor points are determined, the geometric distance between the to-be-encoded point and each candidate neighbor point is calculated, the K first neighbor points are determined, and the K first neighbor points are updated according to the orientation distribution relationship between the to-be-encoded point and each first neighbor point. Then, the updated K first neighbor points are sorted according to the target distance between the to-be-encoded point and each updated first neighbor point, to obtain the K first target neighbor points.
[0102] In other embodiments, after determining the plurality of candidate neighbor points, a geometric distance between the to-be-encoded point and each candidate neighbor point is calculated, K first neighbor points are determined, and the K first neighbor points are updated according to a target distance between the to-be-encoded point and each first neighbor point. Then, K first target neighbor points are obtained according to a positional distribution relationship between the to-be-encoded point and each updated first neighbor point.
[0103] Optionally, the attribute distance between the to-be-encoded point and each candidate neighbor point is determined based on attribute information of the to-be-encoded point and attribute information of each candidate neighbor point, and includes:
[0104] For any first candidate neighbor point in the plurality of candidate neighbor points, an attribute gap value between an attribute value of the to-be-encoded point and an attribute value of the first candidate neighbor point is calculated, the attribute value of the to-be-encoded point is determined based on attribute information of the to-be-encoded point, the attribute value of the first candidate neighbor point is determined based on attribute information of the first candidate neighbor point, and the attribute information of the to-be-encoded point and the attribute information of the first candidate neighbor point are of the same attribute type.
[0105] A product of a weight value corresponding to the first candidate neighbor point and the attribute gap value is determined as the attribute distance between the to-be-encoded point and the first candidate neighbor point.
[0106] In this embodiment, the attribute distance between the to-be-encoded point and the first candidate neighbor point can be determined by the following formula:
[0107]
[0108] wherein attrDis represents attribute information of an encoded type of the to-be-encoded point, attrNeighbour represents attribute information of the first candidate neighbor point, and the two attribute information are of the same type, dimAttr represents a number of components contained in the attribute information, and wAttr[i] represents a preset weight of an i th component of the attribute information in calculating the attribute distance.
[0109] In this embodiment, since the attribute distance between the to-be-encoded point and the candidate neighbor point is determined based on the attribute information of the to-be-encoded point and the attribute information of the candidate neighbor point, the attribute distance between the to-be-encoded point and the candidate neighbor point can accurately represent the difference between the attribute information of the to-be-encoded point and the attribute information of each candidate neighbor point.
[0110] Optionally, the target distance between the to-be-encoded point and each candidate neighbor point is determined according to the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point, and includes:
[0111] For any second candidate neighbor point in the plurality of candidate neighbor points, a sum value between a first product corresponding to the second candidate neighbor point and a second product corresponding to the second candidate neighbor point is determined as a target distance between the to-be-encoded point and the second candidate neighbor point;
[0112] The first product is a product of a geometric distance weight value corresponding to the second candidate neighbor point and a geometric distance corresponding to the second candidate neighbor point, and the second product is a product of an attribute distance weight value corresponding to the second candidate neighbor point and an attribute distance corresponding to the second candidate neighbor point.
[0113] In the embodiment, the target distance between the to-be-encoded point and the second candidate neighbor point can be determined by the following formula:
[0114]
[0115] The overallDis represents the target distance, the geomDis represents the geometric distance, the attrDis[i] represents the i-th coded attribute distance of different types, the attrCodedNum represents the number of coded attribute information types, the geomW represents the weight corresponding to the geometric distance, and the attrW[i] represents the weight corresponding to the i-th coded attribute distance of different types.
[0116] Optionally, the weight corresponding to the i-th coded attribute distance of different types can be determined by the following formula:
[0117] attrW[i]=k·attrQuantParam+b
[0118] The k and b are any real numbers, and the attrQuantParam represents a preset attribute quantization parameter.
[0119] In other embodiments, the geometric distance and the attribute distance between the to-be-encoded point and the candidate neighbor point can also be weighted and summed to obtain the target distance between the to-be-encoded point and the candidate neighbor point.
[0120] Optionally, the updating the K first neighbor points according to the orientation distribution relationship between the to-be-encoded point and each first neighbor point comprises:
[0121] In a case where the orientation distribution relationship between the to-be-encoded point and any two first neighbor points is not directionally relative, a part of the first neighbor points with the farthest target distance from the to-be-encoded point in the K first neighbor points is updated as a second target neighbor point in the N second neighbor points.
[0122] The N second neighbor points are part of the plurality of candidate neighbor points excluding the K first neighbor points, and the second target neighbor point is a second neighbor point from the N second neighbor points that satisfies a preset condition, and N is a positive integer greater than or equal to 1.
[0123] The preset condition includes:
[0124] The target distance between the second neighbor point and the to-be-encoded point is less than or equal to a preset distance; and
[0125] The orientation between the second neighbor point and the to-be-encoded point is opposite to the orientation between any one of the first neighbor points and the to-be-encoded point, and the any one of the first neighbor points is a first neighbor point from the K first neighbor points excluding a first neighbor point that is farthest from the to-be-encoded point.
[0126] In this embodiment, the orientation distribution relationship between the to-be-encoded point and any two first neighbor points is determined, and the K first neighbor points are updated in a case where the orientation distribution relationship between the to-be-encoded point and any two first neighbor points is not opposite. For how to determine the orientation distribution relationship between the to-be-encoded point and any two first neighbor points, refer to the above embodiment, which is not repeated here.
[0127] The specific scheme for updating the K first neighbor points is as follows:
[0128] The N neighbor points from the plurality of candidate neighbor points excluding the K first neighbor points are determined as the N second neighbor points, and a second neighbor point from the N second neighbor points that satisfies a preset condition is determined as the second target neighbor point. The number of the second target neighbor point can be one or multiple.
[0129] The preset condition includes: the target distance between the second neighbor point and the to-be-encoded point is less than or equal to a preset distance; and the orientation between the second neighbor point and the to-be-encoded point is opposite to the orientation between any one of the first neighbor points and the to-be-encoded point, and the any one of the first neighbor points is a first neighbor point from the K first neighbor points excluding a first neighbor point that is farthest from the to-be-encoded point. Alternatively, the preset condition that the target distance between the second neighbor point and the to-be-encoded point is less than or equal to a preset distance can be replaced by the preset condition that the geometric distance between the second neighbor point and the to-be-encoded point is less than or equal to a preset distance.
[0130] For example, the target distance between the second neighbor point and the to-be-encoded point is less than a preset distance, the orientation between the second neighbor point and the to-be-encoded point is located in a region identified by 0 in Figure 4 and the orientation between the first neighbor point and the to-be-encoded point is located in a region identified by 1 in Figure 4If the region where the winning identifier 7 is located and the first neighbor point is not the first neighbor point with the farthest target distance from the to-be-encoded point among the K first neighbor points, it is determined that the second neighbor point is a second target neighbor point that meets the preset condition.
[0131] Optionally, the one first neighbor point with the farthest target distance from the to-be-encoded point among the K first neighbor points can be updated to one second target neighbor point among the N second neighbor points, or the multiple first neighbor points with the farthest target distance from the to-be-encoded point among the K first neighbor points can be updated to multiple second target neighbor points among the N second neighbor points. The embodiment does not limit the specific number of the second target neighbor points.
[0132] In the embodiment, by updating the part of the first neighbor points with the farthest target distance from the to-be-encoded point among the K first neighbor points to the second target neighbor points, the orientation distribution of the K first target neighbor points obtained after the update relative to the to-be-encoded point is improved, so as to improve the accuracy of determining the attribute prediction value of the to-be-encoded point by the K first target neighbor points.
[0133] Optionally, before the K first target neighbor points are determined based on the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point, the method further includes:
[0134] Obtaining point cloud data; the point cloud data includes a to-be-encoded point, multiple encoded points, and an encoding identifier;
[0135] In a case where attribute information of the multiple encoded points corresponds to different attribute types and the encoding identifier is used to represent that attribute encoding based on the attribute type is performed on the to-be-encoded point, the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point are determined.
[0136] In the embodiment, the point cloud data is obtained, and the point cloud data includes a to-be-encoded point, multiple encoded points, and an encoding identifier. The encoding identifier is also called an enabling identifier of attribute type prediction. Optionally, a sequence parameter set of the point cloud or an attribute parameter set of the point cloud includes the encoding identifier.
[0137] In a case where attribute information of the multiple encoded points corresponds to different attribute types and the encoding identifier is used to represent that attribute encoding based on the attribute type is performed on the to-be-encoded point, the attribute encoding method provided in the embodiment is used to perform attribute encoding on the to-be-encoded point, that is, the step of determining the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point is performed.
[0138] In the embodiment, the attribute coding method is used to code the to-be-coded point in the case that the coding identifier is set to represent that attribute coding based on attribute types is performed on the to-be-coded point, and attribute information of the plurality of coded points corresponds to different attribute types, that is, the different types of coded attribute information is introduced in attribute prediction to measure the correlation between the to-be-predicted point and the neighbor points, so as to improve the attribute coding efficiency.
[0139] For the technical effects generated by the attribute coding method provided in the embodiments of the present application, please refer to Table 1 and Table 2.
[0140] Table 1:
[0141] Y component U component V component Point cloud type 1 -6.5% -5.7% -6.3% Point cloud type 2 -4.5% -5.1% -6.1%
[0142] Table 2:
[0143] Reflectivity Point cloud type 3 -6.7% Point cloud type 4 -4.7%
[0144] In the table, the values in Table 1 and Table 2 are used to represent the code rate ratio between the code stream generated by the attribute coding provided in the embodiments of the present application and the code stream generated by using related technologies in the case that the peak signal-to-noise ratio is the same. It should be understood that the lower the value, the more the reduced code rate.
[0145] For example, "-6.5%" in the second row and the second column in Table 1 represents that the code stream corresponding to the Y component generated by the transform coefficient coding provided in the embodiments of the present application is reduced by 6.5% in code rate compared with the code stream corresponding to the Y component generated by using related technologies.
[0146] For the purpose of understanding the overall technical solution, please refer to Figure 6 As shown in Figure 6 , the candidate neighbor points corresponding to the to-be-coded point are determined, the geometric distance and the attribute distance between the to-be-coded point and each candidate neighbor point are calculated, then the target distance between the to-be-coded point and each candidate neighbor point is determined based on the geometric distance and the attribute distance, and the K first neighbor points are determined according to the target distance. After traversing all the candidate neighbor points, the K first neighbor points are updated based on the orientation distribution relationship between the to-be-coded point and each first neighbor point, K first target neighbor points are obtained, then the attribute prediction of the to-be-coded point is performed by using the K first target neighbor points, the attribute prediction value of the to-be-coded point is obtained, and the attribute prediction value is coded to obtain the coded code stream.
[0147] In other embodiments, a regression curve between the type of attribute information of the to-be-encoded point and the type of attribute information of the encoded point can be fitted by using the correlation between different types of attribute information. The type of attribute information of the to-be-encoded point is also referred to as a to-be-encoded type, and the type of attribute information of the encoded point is also referred to as an encoded type. Optionally, the form of the regression curve includes but is not limited to a linear function form. Optionally, L points can be sequentially selected from the point cloud, and the selected L points form a point set, where L can be a positive integer greater than or equal to 20. Based on the to-be-encoded type and the encoded type of the L points, model parameters are determined. For example, a fitting straight line y = ax + b between multiple attributes can be obtained by fitting a straight line by using a least square method. It should be noted that a straight line can also be fitted by using a method different from the least square method, such as a gradient descent method or a Gauss-Newton method.
[0148] For each to-be-encoded point, a predicted value of the to-be-encoded type is calculated by using the reconstructed attribute value of the encoded type and the prediction model, and then a prediction residual is obtained according to the predicted value and the original attribute value, and the prediction residual is encoded to obtain a code stream.
[0149] The decoding end parses the parameters of the prediction model, and then determines a predicted value corresponding to a to-be-decoded point according to the parameters, and obtains an attribute reconstruction value of the to-be-decoded point according to the predicted value and the prediction residual.
[0150] In other embodiments, a regression curve between the type of attribute information of the to-be-encoded point and the type of attribute information of the encoded point can be fitted by using the correlation between different types of attribute information.
[0151] For each to-be-encoded point, a predicted value of the to-be-encoded type is calculated by using the prediction model parameters of the to-be-encoded point, and the attribute residual of the to-be-encoded type is represented according to the attribute residual of the encoded type.
[0152] The decoding end parses the parameters of the prediction model, and then determines a predicted value corresponding to a to-be-decoded point according to the parameters, and obtains an attribute reconstruction value of the to-be-decoded point according to the predicted value and the prediction residual.
[0153] Please refer to Figure 7 , Figure 7 FIG. 1 is a flowchart of an attribute decoding method provided by an embodiment of the present application. The attribute decoding method provided by the embodiment includes the following steps:
[0154] In S701, the decoding end parses the obtained encoding code stream to obtain a to-be-decoded point and a plurality of decoded points.
[0155] In this step, the decoding end obtains the encoding code stream, and parses the encoding code stream to obtain the to-be-decoded point and the plurality of decoded points.
[0156] S702, the decoding end determines K first target neighbor points in the plurality of neighbor candidate points based on geometric distance and attribute distance between the to-be-decoded point and each candidate neighbor point in the plurality of candidate neighbor points.
[0157] An optional implementation is to predict the point at the high level by using the points at the bottom level and the points at the same level that have been reconstructed, and to use the points at the bottom level and the same level as reference points, so as to obtain the candidate neighbor points. Another optional implementation is to predict by using the reconstructed points in the decoded frame, and to use the reference frame points with high correlation as reference points, and then to use the points in a certain search range in the reference points as the neighbor candidate points.
[0158] The geometric distance and the attribute distance between the to-be-decoded point and each candidate neighbor point are calculated, and then K first target neighbor points in the plurality of neighbor candidate points are determined based on the geometric distance and the attribute distance.
[0159] The candidate neighbor points are part of the plurality of decoded points, the attribute distance is determined based on attribute information of the to-be-decoded point and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1.
[0160] S703, the decoding end performs attribute prediction on the to-be-decoded point according to the attribute value of each first target neighbor point, and obtains an attribute prediction value of the to-be-decoded point.
[0161] In this step, the same method as that of the encoding end can be applied to perform attribute prediction on the to-be-decoded point according to the attribute value of each first target neighbor point, and obtain the attribute prediction value of the to-be-decoded point, which is not repeated here.
[0162] S704, the decoding end determines an attribute reconstruction value of the to-be-decoded point according to the attribute prediction value of the to-be-decoded point and an attribute residual of the to-be-decoded point.
[0163] It should be understood that the attribute residual of the to-be-decoded point is obtained based on parsing of the encoding code stream. Optionally, a sum value of the attribute prediction value of the to-be-decoded point and the attribute residual of the to-be-decoded point is determined as the attribute reconstruction value of the to-be-decoded point.
[0164] Compared with the related art in which only the geometric information of the decoded point is used to determine the nearest neighbor point, the present embodiment determines the nearest neighbor point according to the geometric distance and the attribute distance between the to-be-decoded point and each candidate neighbor point, so that the spatial distance between the nearest neighbor point and the to-be-decoded point is relatively close and the attribute values of the two points also do not differ much, and then the attribute decoding of the to-be-decoded point is performed based on the attribute value of the nearest neighbor point, so as to complete the decoding of the code stream with less information redundancy.
[0165] Optionally, the determining the K first target neighbor points from the plurality of candidate neighbor points based on the geometric distance and the attribute distance between the to-be-decoded point and each of the plurality of candidate neighbor points comprises:
[0166] calculating the geometric distance between the to-be-decoded point and each of the plurality of candidate neighbor points, and determining the attribute distance between the to-be-decoded point and each of the plurality of candidate neighbor points based on the attribute information of the to-be-decoded point and the attribute information of each of the plurality of candidate neighbor points;
[0167] determining the target distance between the to-be-decoded point and each of the plurality of candidate neighbor points according to the geometric distance and the attribute distance between the to-be-decoded point and each of the plurality of candidate neighbor points;
[0168] determining the K first neighbor points from the plurality of candidate neighbor points corresponding to the minimum target distance;
[0169] updating the K first neighbor points according to the orientation distribution relationship between the to-be-decoded point and each of the K first neighbor points to obtain the K first target neighbor points.
[0170] In this embodiment, the Euclidean distance or Manhattan distance between the to-be-decoded point and the candidate neighbor point can be determined as the geometric distance between the to-be-decoded point and the candidate neighbor point. The attribute information of the to-be-decoded point and the attribute information of each of the plurality of candidate neighbor points are obtained, and then the attribute distance between the to-be-decoded point and each of the plurality of candidate neighbor points is determined based on the attribute information of the to-be-decoded point and the attribute information of each of the plurality of candidate neighbor points. Then, the target distance between the to-be-decoded point and each of the plurality of candidate neighbor points is determined based on the geometric distance and the attribute distance.
[0171] In this embodiment, the K candidate neighbor points corresponding to the minimum target distance from the plurality of candidate neighbor points can be determined as the K first neighbor points which are close to the to-be-decoded point in geometric distance and have attribute information close to that of the to-be-decoded point. Then, the K first neighbor points are updated according to the orientation distribution relationship between the to-be-decoded point and each of the K first neighbor points to obtain the updated K first target neighbor points.
[0172] Optionally, the determining the attribute distance between the to-be-decoded point and each of the plurality of candidate neighbor points based on the attribute information of the to-be-decoded point and the attribute information of each of the plurality of candidate neighbor points comprises:
[0173] For any first candidate neighbor point in the plurality of candidate neighbor points, an attribute gap value between an attribute value of the to-be-decoded point and an attribute value of the first candidate neighbor point is calculated; the attribute value of the to-be-decoded point is determined based on attribute information of the to-be-decoded point, and the attribute value of the first candidate neighbor point is determined based on attribute information of the first candidate neighbor point, and the attribute information of the to-be-decoded point and the attribute information of the first candidate neighbor point are of the same attribute type;
[0174] A product between a weight value corresponding to the first candidate neighbor point and the attribute gap value is determined as an attribute distance between the to-be-decoded point and the first candidate neighbor point.
[0175] In this embodiment, the attribute distance between the to-be-decoded point and each candidate neighbor point can be determined in a manner that the attribute distance is determined at the encoding end, which is not repeated here.
[0176] Optionally, the determining the target distance between the to-be-decoded point and each candidate neighbor point according to the geometric distance and the attribute distance between the to-be-decoded point and each candidate neighbor point comprises:
[0177] For any second candidate neighbor point in the plurality of candidate neighbor points, a sum value between a first product corresponding to the second candidate neighbor point and a second product corresponding to the second candidate neighbor point is determined as a target distance between the to-be-decoded point and the second candidate neighbor point;
[0178] The first product is a product of a geometric distance weight value corresponding to the second candidate neighbor point and a geometric distance corresponding to the second candidate neighbor point, and the second product is a product of an attribute distance weight value corresponding to the second candidate neighbor point and an attribute distance corresponding to the second candidate neighbor point.
[0179] In this embodiment, the target distance between the to-be-decoded point and each candidate neighbor point can be determined in a manner that the target distance is determined at the encoding end, which is not repeated here.
[0180] Optionally, the updating the K first neighbor points according to the orientation distribution relationship between the to-be-decoded point and each first neighbor point comprises:
[0181] In a case where the orientation distribution relationship between the to-be-decoded point and any two first neighbor points is not directionally relative, a part of the first neighbor points with a farthest target distance from the to-be-decoded point in the K first neighbor points is updated as a second target neighbor point in N second neighbor points.
[0182] The N second neighbor points are part of the plurality of candidate neighbor points excluding the K first neighbor points, the second target neighbor point is a second neighbor point in the N second neighbor points that satisfies a preset condition and has a minimum corresponding target distance, and N is a positive integer greater than or equal to 1.
[0183] The preset condition includes:
[0184] A target distance between the second neighbor point and the to-be-decoded point is less than or equal to a preset distance.
[0185] An orientation between the second neighbor point and the to-be-decoded point is opposite to an orientation between any one of the first neighbor points and the to-be-decoded point, and the any one of the first neighbor points is a first neighbor point in the K first neighbor points excluding a first neighbor point that has a farthest target distance from the to-be-decoded point.
[0186] In this embodiment, a distribution relationship between the to-be-decoded point and any two first neighbor points is determined, and the K first neighbor points are updated in a case where the distribution relationship is not opposite in direction.
[0187] The K first neighbor points can be updated by using a manner of updating the K first neighbor points at an encoding end, and this is not repeated here.
[0188] Optionally, the encoding code stream includes a decoding identifier, and before determining the K first target neighbor points in the plurality of candidate neighbor points based on a geometric distance and an attribute distance between the to-be-decoded point and each candidate neighbor point, the method further includes:
[0189] In a case where attribute information of the plurality of decoded points corresponds to different attribute types and the decoding identifier is used to represent that attribute decoding based on the attribute types is performed on the to-be-decoded point, the geometric distance and the attribute distance between the to-be-decoded point and each candidate neighbor point are determined.
[0190] In this embodiment, an encoding code stream transmitted by an encoding end includes an encoding identifier, in a case where attribute information of the plurality of decoded points corresponds to different attribute types and the decoding identifier is used to represent that attribute decoding based on the attribute types is performed on the to-be-decoded point, the to-be-decoded point is subjected to attribute decoding by using the attribute decoding method provided in this embodiment, that is, a step of determining the geometric distance and the attribute distance between the to-be-decoded point and each candidate neighbor point is performed.
[0191] The attribute encoding method provided in this embodiment can be performed by an attribute encoding device. In this embodiment, the attribute encoding method is taken as an example to illustrate the attribute encoding device provided in this embodiment.
[0192] like Figure 8 As shown, the embodiment of the present application further provides an attribute encoding device 800, including:
[0193] A first determination module 801 is configured to determine K first target neighbor points from the plurality of candidate neighbor points based on a geometric distance and an attribute distance between the point to be coded and each candidate neighbor point in the plurality of candidate neighbor points; the candidate neighbor points are at least some of the plurality of coded points, the attribute distance is determined based on attribute information of the point to be coded and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1;
[0194] A prediction module 802 is configured to perform attribute prediction on the point to be coded based on the attribute value of each first target neighbor point to obtain an attribute prediction value of the point to be coded;
[0195] The generating module 803 is configured to encode the attribute residual of the point to be encoded to generate an encoded bitstream corresponding to the point to be encoded; the attribute residual of the point to be encoded is determined based on the attribute prediction value of the point to be encoded and the original attribute value of the point to be encoded.
[0196] Optionally, the first determining module 801 is specifically configured to:
[0197] Calculating the geometric distance between the point to be coded and each candidate neighbor point, and determining the attribute distance between the point to be coded and each candidate neighbor point based on the attribute information of the point to be coded and the attribute information of each candidate neighbor point;
[0198] Determining a target distance between the point to be encoded and each candidate neighbor point according to a geometric distance and an attribute distance between the point to be encoded and each candidate neighbor point;
[0199] Determine the K candidate neighbor points with the smallest corresponding target distances among the multiple candidate neighbor points as K first neighbor points;
[0200] According to the azimuth distribution relationship between the point to be encoded and each first neighbor point, the K first neighbor points are updated to obtain the K first target neighbor points.
[0201] Optionally, the first determining module 801 is further specifically configured to:
[0202] For any first candidate neighbor point in the plurality of candidate neighbor points, an attribute gap value between an attribute value of the point to be encoded and an attribute value of the first candidate neighbor point is calculated; the attribute value of the point to be encoded is determined based on attribute information of the point to be encoded, and the attribute value of the first candidate neighbor point is determined based on attribute information of the first candidate neighbor point, and the attribute information of the point to be encoded and the attribute information of the first candidate neighbor point are of the same attribute type;
[0203] A product between a weight value corresponding to the first candidate neighbor point and the attribute gap value is determined as an attribute distance between the point to be encoded and the first candidate neighbor point.
[0204] Optionally, the first determining module 801 is further configured to:
[0205] For any second candidate neighbor point in the plurality of candidate neighbor points, a sum value between a first product corresponding to the second candidate neighbor point and a second product corresponding to the second candidate neighbor point is determined as a target distance between the point to be encoded and the second candidate neighbor point;
[0206] The first product is a product between a geometric distance weight value corresponding to the second candidate neighbor point and a geometric distance corresponding to the second candidate neighbor point, and the second product is a product between an attribute distance weight value corresponding to the second candidate neighbor point and an attribute distance corresponding to the second candidate neighbor point.
[0207] Optionally, the first determining module 801 is further configured to:
[0208] In a case where an orientation distribution relationship between the point to be encoded and any two first neighbor points is not directionally opposite, a part of the first neighbor points with a farthest target distance from the point to be encoded is updated as a second target neighbor point in N second neighbor points;
[0209] The N second neighbor points are part of the neighbor points in the plurality of candidate neighbor points except the K first neighbor points, the second target neighbor point is a second neighbor point in the N second neighbor points that satisfies a preset condition, and N is a positive integer greater than or equal to 1.
[0210] The preset condition includes:
[0211] A target distance between the second neighbor point and the point to be encoded is less than or equal to a preset distance; and
[0212] The orientation between the second neighbor point and the to-be-encoded point, and the orientation between any one of the first neighbor points and the to-be-encoded point, the any one of the first neighbor points being a first neighbor point other than the first neighbor point farthest from the to-be-encoded point in the K first neighbor points.
[0213] Optionally, the attribute encoding apparatus 800 further includes:
[0214] An acquisition module, configured to acquire point cloud data, the point cloud data including a to-be-encoded point, a plurality of already-encoded points, and an encoding identifier;
[0215] A second determination module, configured to determine a geometric distance and an attribute distance between the to-be-encoded point and each candidate neighbor point in a case where attribute information of the plurality of already-encoded points corresponds to different attribute types and the encoding identifier is used to represent that attribute encoding based on attribute types is performed on the to-be-encoded point.
[0216] Compared with the related art in which only the geometric information of the already-encoded points is used to determine the nearest neighbor point, the embodiment determines the nearest neighbor point according to the geometric distance and the attribute distance between the to-be-encoded point and each candidate neighbor point, so that the spatial distance between the nearest neighbor point and the to-be-encoded point is relatively short and the attribute values of the nearest neighbor point and the to-be-encoded point are also relatively close, and then the attribute encoding is performed on the to-be-encoded point based on the attribute values of the nearest neighbor point, to obtain an encoding code stream with less information redundancy, thereby reducing the code rate of the encoding code stream.
[0217] The apparatus embodiment corresponds to the attribute encoding method embodiment shown in Figure 5 The various implementation processes and implementation manners of the method embodiment with respect to the encoding end can be applied to the apparatus embodiment, and the same technical effects can be achieved.
[0218] The attribute decoding method provided in the embodiment of the application can be executed by an attribute decoding apparatus. In the embodiment of the application, the attribute decoding method is executed by an attribute decoding apparatus, and the attribute decoding apparatus provided in the embodiment of the application is described.
[0219] As shown in Figure 9 The attribute decoding apparatus 900 provided in the embodiment of the application includes:
[0220] A parsing module 901, configured to parse the acquired encoding code stream to obtain a to-be-decoded point and a plurality of already-decoded points;
[0221] The first determining module 902 is configured to determine K first target neighbor points from the plurality of candidate neighbor points based on geometric distances and attribute distances between the to-be-decoded point and each of the plurality of candidate neighbor points, wherein the candidate neighbor points are at least part of the plurality of decoded points, the attribute distance is determined based on attribute information of the to-be-decoded point and attribute information of a candidate neighbor point, and K is a positive integer greater than or equal to 1.
[0222] The prediction module 903 is configured to perform attribute prediction on the to-be-decoded point according to an attribute value of each first target neighbor point, and obtain an attribute prediction value of the to-be-decoded point.
[0223] The second determining module 904 is configured to determine an attribute reconstruction value of the to-be-decoded point based on the attribute prediction value of the to-be-decoded point and an attribute residual of the to-be-decoded point, wherein the attribute residual of the to-be-decoded point is obtained by parsing the encoding code stream.
[0224] Optionally, the first determining module 902 is specifically configured to:
[0225] calculate the geometric distance between the to-be-decoded point and each candidate neighbor point, and determine the attribute distance between the to-be-decoded point and each candidate neighbor point based on attribute information of the to-be-decoded point and attribute information of each candidate neighbor point;
[0226] determine a target distance between the to-be-decoded point and each candidate neighbor point according to the geometric distance and the attribute distance between the to-be-decoded point and each candidate neighbor point;
[0227] determine K first neighbor points from K candidate neighbor points corresponding to the smallest target distance in the plurality of candidate neighbor points;
[0228] update the K first neighbor points according to the orientation distribution relationship between the to-be-decoded point and each first neighbor point, and obtain the K first target neighbor points.
[0229] Optionally, the first determining module 902 is further specifically configured to:
[0230] For any first candidate neighbor point in the plurality of candidate neighbor points, calculate an attribute gap value between an attribute value of the to-be-decoded point and an attribute value of the first candidate neighbor point, wherein the attribute value of the to-be-decoded point is determined based on attribute information of the to-be-decoded point, the attribute value of the first candidate neighbor point is determined based on attribute information of the first candidate neighbor point, and the attribute information of the to-be-decoded point and the attribute information of the first candidate neighbor point are of the same attribute type.
[0231] a product between the weight value corresponding to the first candidate neighbor point and the attribute distance value is determined as an attribute distance between the to-be-decoded point and the first candidate neighbor point.
[0232] Optionally, the first determining module 902 is further configured to:
[0233] for any second candidate neighbor point in the plurality of candidate neighbor points, a sum value between a first product corresponding to the second candidate neighbor point and a second product corresponding to the second candidate neighbor point is determined as a target distance between the to-be-decoded point and the second candidate neighbor point;
[0234] wherein the first product is a product between a geometric distance weight value corresponding to the second candidate neighbor point and a geometric distance corresponding to the second candidate neighbor point, and the second product is a product between an attribute distance weight value corresponding to the second candidate neighbor point and an attribute distance corresponding to the second candidate neighbor point.
[0235] Optionally, the first determining module 902 is further configured to:
[0236] in a case where the orientation distribution relationship between the to-be-decoded point and any two first neighbor points is not direction relative, a part of the first neighbor points with a farthest target distance from the to-be-decoded point in the K first neighbor points is updated as a second target neighbor point in N second neighbor points;
[0237] wherein the N second neighbor points are part of the neighbor points in the plurality of candidate neighbor points except the K first neighbor points, the second target neighbor point is a second neighbor point in the N second neighbor points that satisfies a preset condition and corresponds to a smallest target distance, and N is a positive integer greater than or equal to 1.
[0238] the preset condition includes:
[0239] a target distance between the second neighbor point and the to-be-decoded point is less than or equal to a preset distance; and
[0240] an orientation between the second neighbor point and the to-be-decoded point is opposite to an orientation between any one first neighbor point and the to-be-decoded point, and the any one first neighbor point is a first neighbor point in the K first neighbor points except the first neighbor point with the farthest target distance from the to-be-decoded point.
[0241] Optionally, the attribute decoding apparatus 900 further includes:
[0242] The third determination module is configured to determine the geometric distance and attribute distance between the point to be decoded and each candidate neighbor point when the attribute information of the multiple decoded points corresponds to different attribute types and the decoding identifier is used to indicate that attribute decoding based on the attribute type is performed on the point to be decoded.
[0243] Compared with the related art, in which the nearest neighbor point is determined only based on the geometric information of the decoded point, this embodiment determines the nearest neighbor point based on the geometric distance and attribute distance between the point to be decoded and each candidate neighbor point, so that the spatial distance between the above-mentioned nearest neighbor point and the point to be decoded is relatively close and the attribute value difference is not large. Then, the attribute decoding of the point to be decoded is performed based on the attribute value of the above-mentioned nearest neighbor point, thereby completing the decoding of the code stream with less information redundancy.
[0244] The attribute decoding device provided in the embodiment of the present application can achieve Figure 7 The various processes implemented by the method embodiment achieve the same technical effect and are not described here again to avoid repetition.
[0245] The attribute encoding device and attribute decoding device in the embodiments of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the terminal can include but is not limited to the types of terminals listed above, and the other device can be a server, a network attached storage (NAS), etc., which is not specifically limited in the embodiments of the present application.
[0246] The attribute encoding device provided in the embodiment of the present application can achieve Figure 5 The various processes implemented by the method embodiment achieve the same technical effect and are not described here again to avoid repetition.
[0247] The attribute decoding device provided in the embodiment of the present application can achieve Figure 7 The various processes implemented by the method embodiment achieve the same technical effect and are not described here again to avoid repetition.
[0248] Alternatively, as Figure 10 As shown, an embodiment of the present application further provides an electronic device 1000, including a processor 1001 and a memory 1002, wherein the memory 1002 stores programs or instructions that can be run on the processor 1001. For example, when the electronic device 1000 is a terminal, the program or instruction is executed by the processor 1001 to implement the various steps of the above-mentioned attribute encoding method embodiment, or to implement the various steps of the above-mentioned attribute decoding method embodiment, and can achieve the same technical effect.
[0249] The embodiment of the present application further provides a terminal, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to execute a program or instruction to implement the following Figure 5 The steps in the method embodiment shown, or the implementation as shown Figure 7 The steps in the method embodiment shown. This terminal embodiment corresponds to the above-mentioned terminal side method embodiment, and each implementation process and implementation method of the above-mentioned method embodiment can be applied to this terminal embodiment and can achieve the same technical effect. Specifically, Figure 11 A schematic diagram of the hardware structure of a terminal for implementing an embodiment of the present application.
[0250] The terminal 1100 includes but is not limited to components such as a radio frequency unit 1101 , a network module 1102 , an audio output unit 1103 , an input unit 1104 , a sensor 1105 , a display unit 1106 , a user input unit 1107 , an interface unit 1108 , a memory 1109 , and a processor 1110 .
[0251] Those skilled in the art will understand that the terminal 1100 may also include a power supply (such as a battery) to power each component, and the power supply may be logically connected to the processor 1110 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 11 The terminal structure shown in the figure does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.
[0252] It should be understood that in an embodiment of the present application, the input unit 1104 may include a graphics processing unit (GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.
[0253] In the embodiments of the present application, the radio frequency unit 1101 can transmit the downlink data received from the network side device to the processor 1111 for processing; the radio frequency unit 1101 can send the uplink data to the network side device. Generally, the radio frequency unit 1101 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
[0254] The memory 1109 can be used to store software programs or instructions and various data. The memory 1109 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), etc. In addition, the memory 1109 can include a volatile memory or a non-volatile memory. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1109 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0255] The processor 1110 can include one or more processing units; optionally, the processor 1110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1110.
[0256] The processor 1101 is configured to perform the following operations:
[0257] determine K first target neighbor points in the plurality of neighbor candidate points based on geometric distances and attribute distances between the to-be-encoded point and each of the plurality of candidate neighbor points, the candidate neighbor points being at least part of the plurality of encoded points, the attribute distances being determined based on attribute information of the to-be-encoded point and attribute information of the candidate neighbor points, and K being a positive integer greater than or equal to 1;
[0258] perform attribute prediction on the to-be-encoded point according to attribute values of each of the first target neighbor points, to obtain an attribute prediction value of the to-be-encoded point;
[0259] encode an attribute residual of the to-be-encoded point, to generate an encoded code stream corresponding to the to-be-encoded point, the attribute residual of the to-be-encoded point being determined based on the attribute prediction value of the to-be-encoded point and an original attribute value of the to-be-encoded point.
[0260] Alternatively, the processor 1101 is further configured to perform the following operations:
[0261] parse the obtained encoded code stream, to obtain a to-be-decoded point and a plurality of decoded points;
[0262] determine K first target neighbor points in the plurality of neighbor candidate points based on geometric distances and attribute distances between the to-be-decoded point and each of the plurality of candidate neighbor points, the candidate neighbor points being at least part of the plurality of decoded points, the attribute distances being determined based on attribute information of the to-be-decoded point and attribute information of the candidate neighbor points, and K being a positive integer greater than or equal to 1;
[0263] perform attribute prediction on the to-be-decoded point according to attribute values of each of the first target neighbor points, to obtain an attribute prediction value of the to-be-decoded point;
[0264] determine an attribute reconstruction value of the to-be-decoded point based on the attribute prediction value of the to-be-decoded point and an attribute residual of the to-be-decoded point, the attribute residual of the to-be-decoded point being obtained based on parsing of the encoded code stream.
[0265] Embodiments of the present application also provide a readable storage medium having a program or instructions stored thereon, which, when executed by a processor, implement each process of the above attribute encoding method embodiments, or implement each process of the above attribute decoding method embodiments, and achieve the same technical effects. To avoid repetition, details are not described herein.
[0266] The processor is the processor in the terminal in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. In some examples, the readable storage medium can be a non-transitory readable storage medium.
[0267] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions to realize the processes of the attribute encoding method embodiments or the processes of the attribute decoding method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described herein.
[0268] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system chip, a system chip, a chip system or a system on chip, etc.
[0269] The embodiment of the present application further provides a computer program / program product stored in a storage medium, which is executed by at least one processor to realize the processes of the attribute encoding method embodiments or the processes of the attribute decoding method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described herein.
[0270] It should be noted that, in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from the described order, and various steps can be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.
[0271] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of a computer software product and a general hardware platform as necessary, and of course can also be realized by hardware. The computer software product is stored in a storage medium (such as a ROM, a RAM, a magnetic disc, an optical disc, etc.), and includes a plurality of instructions for enabling a terminal or a network side device to execute the method described in each embodiment of the present application.
[0272] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative rather than limiting. Those skilled in the art can make many forms of embodiments under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims, and these embodiments all belong to the protection of the present application.
Claims
1. A method for attribute encoding, characterized in that: include: The encoder determines, based on the geometric distance and attribute distance between the point to be encoded and each of the multiple candidate neighbor points, at least one first neighbor point and at least one second neighbor point from the multiple candidate neighbor points, and determines K first target neighbor points based on the azimuth distribution relationship between the point to be encoded and the at least one first neighbor point and the at least one second neighbor point; The candidate neighbor points are at least some of the coded points among the multiple coded points, the attribute distance is determined based on the attribute information of the point to be coded and the attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1; The encoder performs attribute prediction on the point to be encoded according to the attribute value of each first target neighbor point to obtain the attribute prediction value of the point to be encoded; The encoding end encodes the attribute residual of the to-be-encoded point to generate an encoding stream corresponding to the to-be-encoded point; The attribute residual of the point to be encoded is determined based on the attribute prediction value of the point to be encoded and the original attribute value of the point to be encoded.
2. The method according to claim 1, characterized in that The method of determining at least one first neighbor point and at least one second neighbor point among the multiple candidate neighbor points based on the geometric distance and attribute distance between the point to be encoded and each candidate neighbor point in the multiple candidate neighbor points, and determining K first target neighbor points according to the azimuth distribution relationship between the point to be encoded and the at least one first neighbor point and the at least one second neighbor point, includes: The encoder calculates a geometric distance between the point to be encoded and each candidate neighbor point, and determines an attribute distance between the point to be encoded and each candidate neighbor point based on attribute information of the point to be encoded and attribute information of each candidate neighbor point; The encoder determines, based on the geometric distance and attribute distance between the point to be encoded and each candidate neighbor point, a target distance between the point to be encoded and each candidate neighbor point; The encoder determines, from the plurality of candidate neighbor points, K candidate neighbor points with the smallest corresponding target distances as K first neighbor points; The encoding end updates the K first neighbor points according to the azimuth distribution relationship between the point to be encoded and the K first neighbor points, and the azimuth distribution relationship between the point to be encoded and the at least one second neighbor point, to obtain the K first target neighbor points.
3. The method according to claim 2, characterized in that The determining, based on the attribute information of the point to be coded and the attribute information of each candidate neighbor point, the attribute distance between the point to be coded and each candidate neighbor point includes: The encoder calculates, for any first candidate neighbor point among the multiple candidate neighbor points, an attribute difference value between an attribute value of the to-be-encoded point and an attribute value of the first candidate neighbor point; the attribute value of the to-be-encoded point is determined based on attribute information of the to-be-encoded point, the attribute value of the first candidate neighbor point is determined based on attribute information of the first candidate neighbor point, and the attribute information of the to-be-encoded point and the attribute information of the first candidate neighbor point are of the same attribute type; The encoder determines the attribute distance between the point to be encoded and the first candidate neighbor point based on the product of the weight value corresponding to the first candidate neighbor point and the attribute distance value.
4. The method according to claim 2, characterized in that The step of determining a target distance between the point to be coded and each candidate neighbor point according to a geometric distance and an attribute distance between the point to be coded and each candidate neighbor point comprises: The encoder determines, for any second candidate neighbor point among the plurality of candidate neighbor points, a sum of a first product corresponding to the second candidate neighbor point and a second product corresponding to the second candidate neighbor point as a target distance between the point to be encoded and the second candidate neighbor point; Among them, the first product is determined according to the product of the geometric distance weight value corresponding to the second candidate neighbor point and the geometric distance corresponding to the second candidate neighbor point, and the second product is determined according to the product of the attribute distance weight value corresponding to the second candidate neighbor point and the attribute distance corresponding to the second candidate neighbor point.
5. The method according to claim 2, characterized in that The updating of the K first neighbor points according to the azimuth distribution relationship between the point to be encoded and the K first neighbor points, and the azimuth distribution relationship between the point to be encoded and the at least one second neighbor point, includes: When the orientation distribution relationship between the point to be encoded and any two first neighboring points is not relative, the encoder updates the first neighboring points of the K first neighboring points that are farthest from the target distance between the point to be encoded and the second target neighboring points of the N second neighboring points; The N second neighbor points are some of the neighbor points in the multiple candidate neighbor points except the K first neighbor points, the second target neighbor point is a second neighbor point in the N second neighbor points that meets the preset conditions, and N is a positive integer greater than or equal to 1; The preset conditions include: The target distance between the second neighbor point and the point to be encoded is less than or equal to a preset distance; and The orientation between the second neighbor point and the point to be encoded is relative to the orientation between any one of the first neighbor points and the point to be encoded, and the any one of the first neighbor points is the first neighbor point among the K first neighbor points except the first neighbor point farthest from the target point to be encoded.
6. The method according to any one of claims 1 to 5, characterized in that Before the encoder determines, based on the geometric distance and attribute distance between the point to be encoded and each of the plurality of candidate neighbor points, at least one first neighbor point and at least one second neighbor point among the plurality of candidate neighbor points, and determines K first target neighbor points according to the azimuth distribution relationship between the point to be encoded and the at least one first neighbor point and the at least one second neighbor point, the method further includes: The encoding end obtains point cloud data; the point cloud data includes a point to be encoded, a plurality of encoded points and an encoding identifier; The encoding end determines the geometric distance and attribute distance between the point to be encoded and each candidate neighbor point when the attribute information of the multiple encoded points corresponds to different attribute types and the encoding identifier is used to represent the attribute encoding based on the attribute type performed on the point to be encoded.
7. A method for decoding attributes, characterized in that: include: The decoding end parses the obtained encoded code stream to obtain the point to be decoded and multiple decoded points; The decoding end determines at least one first neighbor point and at least one second neighbor point among the multiple candidate neighbor points based on the geometric distance and attribute distance between the point to be decoded and each candidate neighbor point in the multiple candidate neighbor points, and determines K first target neighbor points according to the azimuth distribution relationship between the point to be decoded and the at least one first neighbor point and the at least one second neighbor point; The candidate neighbor points are at least some of the decoded points among the multiple decoded points, the attribute distance is determined based on attribute information of the point to be decoded and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1; The decoding end predicts the attribute of the to-be-decoded point according to the attribute value of each first target neighbor point to obtain the attribute prediction value of the to-be-decoded point; The decoding end determines the attribute reconstruction value of the to-be-decoded point according to the attribute prediction value of the to-be-decoded point and the attribute residual of the to-be-decoded point; the attribute residual of the to-be-decoded point is obtained by parsing the encoded bitstream.
8. The method according to claim 7, characterized in that The method of determining at least one first neighbor point and at least one second neighbor point among the multiple candidate neighbor points based on the geometric distance and attribute distance between the point to be decoded and each candidate neighbor point in the multiple candidate neighbor points, and determining K first target neighbor points according to the azimuth distribution relationship between the point to be decoded and the at least one first neighbor point and the at least one second neighbor point, includes: The decoding end calculates the geometric distance between the point to be decoded and each candidate neighbor point, and determines the attribute distance between the point to be decoded and each candidate neighbor point based on the attribute information of the point to be decoded and the attribute information of each candidate neighbor point; The decoding end determines a target distance between the point to be decoded and each candidate neighbor point based on a geometric distance and an attribute distance between the point to be decoded and each candidate neighbor point; The decoding end determines K candidate neighbor points with the smallest corresponding target distances among the multiple candidate neighbor points as K first neighbor points; The decoding end updates the K first neighbor points according to the azimuth distribution relationship between the point to be decoded and the K first neighbor points, and the azimuth distribution relationship between the point to be decoded and the at least one second neighbor point, to obtain the K first target neighbor points.
9. The method according to claim 8, characterized in that The determining, based on the attribute information of the point to be decoded and the attribute information of each candidate neighbor point, the attribute distance between the point to be decoded and each candidate neighbor point includes: The decoding end calculates, for any first candidate neighbor point among the multiple candidate neighbor points, an attribute difference value between an attribute value of the to-be-decoded point and an attribute value of the first candidate neighbor point; the attribute value of the to-be-decoded point is determined based on attribute information of the to-be-decoded point, the attribute value of the first candidate neighbor point is determined based on attribute information of the first candidate neighbor point, and the attribute information of the to-be-decoded point and the attribute information of the first candidate neighbor point are of the same attribute type; The decoding end determines the attribute distance between the to-be-decoded point and the first candidate neighbor point according to the product of the weight value corresponding to the first candidate neighbor point and the attribute distance value.
10. The method according to claim 8, characterized in that The step of determining a target distance between the point to be decoded and each candidate neighbor point according to a geometric distance and an attribute distance between the point to be decoded and each candidate neighbor point comprises: The decoding end determines, for any second candidate neighbor point among the plurality of candidate neighbor points, a sum of a first product corresponding to the second candidate neighbor point and a second product corresponding to the second candidate neighbor point as a target distance between the to-be-decoded point and the second candidate neighbor point; Among them, the first product is determined according to the product of the geometric distance weight value corresponding to the second candidate neighbor point and the geometric distance corresponding to the second candidate neighbor point, and the second product is determined according to the product of the attribute distance weight value corresponding to the second candidate neighbor point and the attribute distance corresponding to the second candidate neighbor point.
11. The method according to claim 8, characterized in that The updating of the K first neighbor points according to the azimuth distribution relationship between the point to be decoded and the K first neighbor points, and the azimuth distribution relationship between the point to be decoded and the at least one second neighbor point, includes: The decoding end updates, when the orientation distribution relationship between the point to be decoded and any two first neighboring points is not relative, the first neighboring points among the K first neighboring points that are farthest from the target distance between the point to be decoded and the second target neighboring points among the N second neighboring points; The N second neighbor points are some of the neighbor points in the multiple candidate neighbor points except the K first neighbor points, the second target neighbor point is the second neighbor point among the N second neighbor points that meets the preset conditions and has the smallest target distance, and N is a positive integer greater than or equal to 1; The preset conditions include: The target distance between the second neighbor point and the point to be decoded is less than or equal to a preset distance; and The orientation between the second neighbor point and the point to be decoded is relative to the orientation between any one of the first neighbor points and the point to be decoded, and the any one of the first neighbor points is the first neighbor point among the K first neighbor points except the first neighbor point farthest from the target point to be decoded.
12. The method according to any one of claims 7 to 11, characterized in that The encoded bitstream includes a decoding identifier, and the decoding end determines at least one first neighbor point and at least one second neighbor point among the multiple candidate neighbor points based on a geometric distance and an attribute distance between the point to be decoded and each candidate neighbor point, and before determining K first target neighbor points based on an azimuth distribution relationship between the point to be decoded and the at least one first neighbor point and the at least one second neighbor point, the method further includes: The decoding end determines the geometric distance and attribute distance between the point to be decoded and each candidate neighbor point when the attribute information of the multiple decoded points corresponds to different attribute types and the decoding identifier is used to indicate that attribute decoding based on the attribute type is performed on the point to be decoded.
13. An attribute encoding device, characterized in that: include: A first determination module is configured to determine at least one first neighbor point and at least one second neighbor point among the multiple candidate neighbor points based on a geometric distance and an attribute distance between the point to be encoded and each of the multiple candidate neighbor points, and determine K first target neighbor points based on an azimuth distribution relationship between the point to be encoded and the at least one first neighbor point and the at least one second neighbor point; The candidate neighbor points are at least some of the coded points among the multiple coded points, the attribute distance is determined based on the attribute information of the point to be coded and the attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1; A prediction module, configured to perform attribute prediction on the point to be coded according to the attribute value of each first target neighbor point, to obtain the attribute prediction value of the point to be coded; A generating module, configured to encode the attribute residual of the to-be-encoded point to generate an encoding stream corresponding to the to-be-encoded point; The attribute residual of the point to be encoded is determined based on the attribute prediction value of the point to be encoded and the original attribute value of the point to be encoded.
14. The device according to claim 13, characterized in that The first determining module is specifically configured to: Calculating the geometric distance between the point to be coded and each candidate neighbor point, and determining the attribute distance between the point to be coded and each candidate neighbor point based on the attribute information of the point to be coded and the attribute information of each candidate neighbor point; Determining a target distance between the point to be encoded and each candidate neighbor point according to a geometric distance and an attribute distance between the point to be encoded and each candidate neighbor point; Determine the K candidate neighbor points with the smallest corresponding target distances among the multiple candidate neighbor points as K first neighbor points; According to the azimuth distribution relationship between the point to be encoded and the K first neighbor points, and the azimuth distribution relationship between the point to be encoded and the at least one second neighbor point, the K first neighbor points are updated to obtain the K first target neighbor points.
15. The device according to claim 14, characterized in that The first determining module is further specifically configured to: For any first candidate neighbor point among the multiple candidate neighbor points, calculating an attribute difference value between the attribute value of the point to be encoded and the attribute value of the first candidate neighbor point; The attribute value of the to-be-coded point is determined based on the attribute information of the to-be-coded point, and the attribute value of the first candidate neighbor point is determined based on the attribute information of the first candidate neighbor point, and the attribute information of the to-be-coded point and the attribute information of the first candidate neighbor point are of the same attribute type; The attribute distance between the point to be encoded and the first candidate neighbor point is determined according to the product of the weight value corresponding to the first candidate neighbor point and the attribute distance value.
16. The device according to claim 14, characterized in that The first determining module is further specifically configured to: For any second candidate neighbor point among the multiple candidate neighbor points, determine the sum of the first product corresponding to the second candidate neighbor point and the second product corresponding to the second candidate neighbor point as the target distance between the point to be encoded and the second candidate neighbor point; Among them, the first product is determined according to the product of the geometric distance weight value corresponding to the second candidate neighbor point and the geometric distance corresponding to the second candidate neighbor point, and the second product is determined according to the product of the attribute distance weight value corresponding to the second candidate neighbor point and the attribute distance corresponding to the second candidate neighbor point.
17. The device according to claim 14, characterized in that The first determining module is further specifically configured to: When the orientation distribution relationship between the point to be encoded and any two first neighbor points is not relative, the first neighbor points of the K first neighbor points that are farthest from the target distance between the point to be encoded are updated as the second target neighbor points of the N second neighbor points; The N second neighbor points are some of the neighbor points in the multiple candidate neighbor points except the K first neighbor points, the second target neighbor point is a second neighbor point in the N second neighbor points that meets the preset conditions, and N is a positive integer greater than or equal to 1; The preset conditions include: The target distance between the second neighbor point and the point to be encoded is less than or equal to a preset distance; and The orientation between the second neighbor point and the point to be encoded is relative to the orientation between any one of the first neighbor points and the point to be encoded, and the any one of the first neighbor points is the first neighbor point among the K first neighbor points except the first neighbor point farthest from the target point to be encoded.
18. The device according to any one of claims 13 to 17, characterized in that The device further comprises: An acquisition module is used to acquire point cloud data; the point cloud data includes a point to be coded, a plurality of coded points and a coding identifier; The second determination module is used to determine the geometric distance and attribute distance between the point to be encoded and each candidate neighbor point when the attribute information of the multiple encoded points corresponds to different attribute types and the encoding identifier is used to represent the attribute encoding based on the attribute type performed on the point to be encoded.
19. An attribute decoding device, characterized in that: include: The parsing module is used to parse the acquired coded stream to obtain the point to be decoded and multiple decoded points; A first determination module is configured to determine at least one first neighbor point and at least one second neighbor point among the multiple candidate neighbor points based on a geometric distance and an attribute distance between the point to be decoded and each of the multiple candidate neighbor points, and determine K first target neighbor points based on an azimuth distribution relationship between the point to be decoded and the at least one first neighbor point and the at least one second neighbor point; The candidate neighbor points are at least some of the decoded points among the multiple decoded points, the attribute distance is determined based on attribute information of the point to be decoded and attribute information of the candidate neighbor points, and K is a positive integer greater than or equal to 1; A prediction module, configured to perform attribute prediction on the to-be-decoded point according to the attribute value of each first target neighbor point, to obtain the attribute prediction value of the to-be-decoded point; The second determining module is configured to determine the attribute reconstruction value of the point to be decoded according to the attribute prediction value of the point to be decoded and the attribute residual of the point to be decoded; the attribute residual of the point to be decoded is obtained by parsing the encoded bitstream.
20. The device according to claim 19, characterized in that The first determining module is specifically configured to: Calculating the geometric distance between the point to be decoded and each candidate neighbor point, and determining the attribute distance between the point to be decoded and each candidate neighbor point based on the attribute information of the point to be decoded and the attribute information of each candidate neighbor point; Determining a target distance between the point to be decoded and each candidate neighbor point according to a geometric distance and an attribute distance between the point to be decoded and each candidate neighbor point; Determine the K candidate neighbor points with the smallest corresponding target distances among the multiple candidate neighbor points as K first neighbor points; According to the azimuth distribution relationship between the point to be decoded and the K first neighbor points, and the azimuth distribution relationship between the point to be decoded and the at least one second neighbor point, the K first neighbor points are updated to obtain the K first target neighbor points.
21. The device according to claim 20, characterized in that The first determining module is further specifically configured to: For any first candidate neighbor point among the multiple candidate neighbor points, calculating an attribute difference value between the attribute value of the to-be-decoded point and the attribute value of the first candidate neighbor point; The attribute value of the to-be-decoded point is determined based on the attribute information of the to-be-decoded point, the attribute value of the first candidate neighbor point is determined based on the attribute information of the first candidate neighbor point, and the attribute information of the to-be-decoded point and the attribute information of the first candidate neighbor point are of the same attribute type; The attribute distance between the to-be-decoded point and the first candidate neighbor point is determined according to the product of the weight value corresponding to the first candidate neighbor point and the attribute distance value.
22. The device according to claim 20, characterized in that The first determining module is further specifically configured to: For any second candidate neighbor point among the multiple candidate neighbor points, determine the sum of the first product corresponding to the second candidate neighbor point and the second product corresponding to the second candidate neighbor point as the target distance between the to-be-decoded point and the second candidate neighbor point; Among them, the first product is determined according to the product of the geometric distance weight value corresponding to the second candidate neighbor point and the geometric distance corresponding to the second candidate neighbor point, and the second product is determined according to the product of the attribute distance weight value corresponding to the second candidate neighbor point and the attribute distance corresponding to the second candidate neighbor point.
23. The device according to claim 20, characterized in that The first determining module is further specifically configured to: When the orientation distribution relationship between the to-be-decoded point and any two first neighboring points is not relative, the first neighboring points of the K first neighboring points that are farthest from the target distance between the to-be-decoded point and the first neighboring points are updated as the second target neighboring points of the N second neighboring points; The N second neighbor points are some of the neighbor points in the multiple candidate neighbor points except the K first neighbor points, the second target neighbor point is the second neighbor point among the N second neighbor points that meets the preset conditions and has the smallest target distance, and N is a positive integer greater than or equal to 1; The preset conditions include: The target distance between the second neighbor point and the point to be decoded is less than or equal to a preset distance; and The orientation between the second neighbor point and the point to be decoded is relative to the orientation between any one of the first neighbor points and the point to be decoded, and the any one of the first neighbor points is the first neighbor point among the K first neighbor points except the first neighbor point farthest from the target point to be decoded.
24. The device according to any one of claims 19 to 23, characterized in that The encoded code stream includes a decoding identifier, and the device further includes: The third determination module is configured to determine the geometric distance and attribute distance between the point to be decoded and each candidate neighbor point when the attribute information of the multiple decoded points corresponds to different attribute types and the decoding identifier is used to indicate that attribute decoding based on the attribute type is performed on the point to be decoded.
25. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the attribute encoding step according to any one of claims 1 to 6 or the attribute decoding step according to any one of claims 7 to 12 is implemented.
26. A readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the attribute encoding step according to any one of claims 1 to 6 is implemented, or the attribute decoding step according to any one of claims 7 to 12 is implemented.
Citation Information
Patent Citations
Neighbor weight-based parameter selection and transmission point cloud attribute encoding and decoding method and equipment
CN110572655A
Point cloud data processing method and device, storage medium and encoding and decoding equipment
CN115086658A