WO2021000334A1 - Data encoding method and device, data decoding method and device, and storage medium - Google Patents
Data encoding method and device, data decoding method and device, and storage medium Download PDFInfo
- Publication number
- WO2021000334A1 WO2021000334A1 PCT/CN2019/094764 CN2019094764W WO2021000334A1 WO 2021000334 A1 WO2021000334 A1 WO 2021000334A1 CN 2019094764 W CN2019094764 W CN 2019094764W WO 2021000334 A1 WO2021000334 A1 WO 2021000334A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- point cloud
- attribute value
- point
- value
- search range
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
Definitions
- the present invention relates to the field of data coding and decoding, in particular to a data coding and data decoding method, equipment and storage medium.
- Point cloud data can be collected by laser radar, laser scanner and other equipment.
- Point cloud data is a form of expression of a three-dimensional object or scene. It is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of the three-dimensional object or scene. In order to accurately reflect the information in the space, the number of discrete points required is huge.
- the point cloud data can be encoded and compressed.
- a point cloud data is usually composed of three-dimensional coordinates (x, y, z) describing coordinate information and attribute value information of the location, such as color (R, G, B) or reflectivity.
- the process of encoding the point cloud data includes position encoding and attribute encoding of the point cloud data. Among them, there are still areas that can be improved in the process of encoding the attribute of the point cloud data.
- the embodiment of the present invention provides a data encoding and data decoding method, device and storage medium, which reduces the algorithmic complexity of the data encoding and decoding process, and improves the efficiency of data encoding and decoding.
- an embodiment of the present invention provides a data encoding method, including:
- the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud, and the attribute value of the point cloud Encoding the residual of the value to obtain the first bitstream data, wherein the first bitstream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
- embodiments of the present invention provide another data encoding method, including:
- the attribute value of the point cloud is coded to obtain code stream data, wherein the code stream data does not include at least one point cloud indicating The point's attribute value is 0.
- an embodiment of the present invention provides a data decoding method, including:
- the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
- the code stream data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is performed Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
- the step of "compensating for the residual error of the attribute value of the point cloud in the code stream data" is skipped, and the code stream is The data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
- embodiments of the present invention provide another data decoding method, including:
- the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
- the code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include identification information.
- an embodiment of the present invention provides a data encoding device, which is characterized by comprising: a memory and a processor;
- the memory is used to store programs
- the processor is used to call the program, and when the program is executed, it is used to perform the following operations:
- the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud; Encoding the residual of the value to obtain the first bitstream data, wherein the first bitstream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
- an embodiment of the present invention provides another data encoding device, which is characterized by including: a memory and a processor;
- the memory is used to store programs
- the processor is used to call the program, and when the program is executed, it is used to perform the following operations:
- the attribute value of the point cloud is coded to obtain code stream data, wherein the code stream data does not include at least one point cloud indicating The point's attribute value is 0.
- an embodiment of the present invention provides a data decoding device, which is characterized by including: a memory and a processor;
- the memory is used to store programs
- the processor is used to call the program, and when the program is executed, it is used to perform the following operations:
- the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
- the code stream data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is performed Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
- the step of "compensating for the residual error of the attribute value of the point cloud in the code stream data" is skipped, and the code stream is The data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
- an embodiment of the present invention provides another data decoding device, which is characterized by comprising: a memory and a processor;
- the memory is used to store programs
- the processor is used to call the program, and when the program is executed, it is used to perform the following operations:
- the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
- the code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include identification information.
- an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned first or second aspect is implemented.
- the step of "predicting the attribute value of the point cloud" is skipped to encode the attribute value of the point cloud, which can greatly simplify
- the algorithm complexity of attribute coding reduces time overhead and improves the efficiency of attribute coding.
- FIG. 1 is a schematic diagram of an increasing sequence of Morton codes in a planar two-dimensional coordinate provided by an embodiment of the present invention
- FIG. 2 is a schematic diagram of the position coordinates corresponding to Morton codes in a two-dimensional coordinate system provided by an embodiment of the present invention
- FIG. 3 is a schematic diagram of Morton codes in a three-dimensional coordinate system provided by an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a data encoding process provided by an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of a data decoding method provided by an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a decoding process of existing point cloud data provided by an embodiment of the present invention.
- FIG. 7 is a schematic diagram of an encoding process of existing point cloud data according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of generating a hierarchical coding scheme according to an embodiment of the present invention.
- FIG. 9 is a schematic flowchart of a data encoding method provided by an embodiment of the present invention.
- FIG. 10 is a schematic flowchart of another data encoding method provided by an embodiment of the present invention.
- FIG. 11 is a schematic flowchart of a data decoding method provided by an embodiment of the present invention.
- FIG. 12 is a schematic flowchart of another data decoding method provided by an embodiment of the present invention.
- Figure 13 is a schematic structural diagram of a data encoding device provided by an embodiment of the present invention.
- Figure 14 is a schematic structural diagram of another data encoding device provided by an embodiment of the present invention.
- 15 is a schematic structural diagram of a data decoding device provided by an embodiment of the present invention.
- Figure 16 is a schematic structural diagram of another data decoding device provided by an embodiment of the present invention.
- the present invention aims at the problem that the G-PCC point cloud coding standard in the Moving Picture Experts Group (Moving Picture Experts Group, MEPG) has high complexity when encoding attributes, and proposes a method for encoding the attribute values of point cloud data When the encoding method and corresponding decoding method.
- MEPG Moving Picture Experts Group
- the attribute value of the point cloud data to be encoded is quantized first.
- FIG. 4 is taken as an example for illustration.
- FIG. 4 is a schematic diagram of a data encoding process provided by an embodiment of the present invention.
- the position coordinates of the input point cloud data are first quantized 42 by inputting the point cloud data 41, and the position coordinates after the quantization 42 can be selected whether to remove the duplicate coordinates 421, and then the position encoding 43 is performed and sent to the arithmetic Arithmetic coding 44 is performed in the coding engine.
- the attribute coding 46 is sequentially performed according to the attribute values corresponding to the order of the position coordinates after the position coding 43.
- the predictive coding scheme based on Morton code is a method of attribute coding of the point cloud data.
- the syntax element lifting_search_range when the syntax element lifting_search_range is not equal to 0, the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data, and the corresponding Morton code is obtained after obtaining the position coordinates.
- the point cloud points in the point cloud can be sorted according to the magnitude relationship of the Morton code, and the attribute value of the sorted point cloud can be predicted and coded to obtain the attribute of each point cloud point in the point cloud The residual of the value.
- the positions of the point cloud points that are ranked close in the three-dimensional space are also relatively close. Since the attribute values of the point cloud points with similar positions in the three-dimensional space are more likely to be similar, performing prediction processing on the sorted point cloud can reduce the bits consumed by the residual of the attribute value of the point cloud. Therefore, multiple zeros will appear in the residual of the attribute value of the point cloud.
- the residual for the current point cloud point, firstly encode an identifier 1, which is used to indicate whether multiple 0s are currently continuously present in the residual of the attribute value of the point cloud, and The number of consecutive occurrences of 0. For example, when the number of point clouds with a residual error of 0 consecutively appearing is greater than or equal to 1, the value of flag 1 is set to the number of consecutively appearing 0, and when 0 does not appear, the value of flag 1 is set to 0.
- the identifier 2 is coded, and the identifier 2 is used to indicate whether the value of the residual of the current point cloud point minus 1 is 0. For example, if the value of the residual minus 1 is 0, then the value of the flag 2 is 1. If the value of the residual of the current point cloud point minus 1 is not 0, then encode the specific value of the residual; or, if the value of the residual of the current point cloud point minus 1 is not 0, continue to code the logo 3. The flag 3 is used to indicate whether the value of the residual of the current point cloud point minus 2 is 0, if it is not 0, continue to encode the specific value of the residual.
- the value of flag 3 is set to 1, if it is not 0, the value of flag 3 is set to 0, and continue to encode the specific residual Numerical value.
- the flag 3 indicates that the residual of the current point cloud point is not 2
- the coding flag 4 is continued to indicate whether the value of the residual of the current point cloud point minus 3 is 0.
- the attribute value of the sorted point cloud is predicted and encoded, and the residual error of the attribute value of each point cloud point in the obtained point cloud may be positive or negative.
- the residual error of the attribute value of each point cloud point in the cloud is a signed value
- the residual error of the attribute value of the point cloud point can be sign converted according to a preset rule, that is, converted from a signed number to an unsigned number.
- the embodiment of the present invention may not perform sign conversion on the residual of the attribute value of the point cloud, which is not specifically limited herein.
- the corresponding search range when performing predictive encoding on the attribute values of the sorted point clouds, may be determined in the sorted point cloud according to the value of the syntax element lifting_search_range, and the point is located in the search range.
- the reference point cloud point of the current point cloud point is determined in the cloud point. According to the attribute value of the reference point cloud point and the attribute value of the current point cloud point, the residual error of the current point cloud point is determined.
- Figure 1 is a schematic diagram of an incremental sequence of Morton codes in a planar two-dimensional coordinate provided by an embodiment of the present invention
- Figure 2 is an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a Morton code in a three-dimensional coordinate system provided by an embodiment of the present invention.
- the Morton codes corresponding to each position coordinate are first calculated according to the position coordinates, and the Morton codes corresponding to each position coordinate are sorted.
- the corresponding relationship between the position coordinates and Morton codes is shown in FIG. 2; in some embodiments, the two-dimensional schematic diagram of the increasing order in the Morton code sorting is shown in FIG.
- the three-dimensional schematic diagram of the increasing sequence in the Morton code sorting is shown in FIG. 3.
- the position coordinates of the point cloud data can be obtained, and the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data, and the position coordinates are obtained.
- the point cloud points in the point cloud data can be sorted according to the Morton code, and the attribute values of the sorted point cloud can be directly coded.
- the coding method of the attribute value of the point cloud may be the same as the coding method of the residual of the attribute value of the point cloud in the foregoing embodiment.
- the identifier 1 which is used to indicate whether an attribute value of 0 appears from the current point cloud point, and the number of point clouds that continuously appear as an attribute value of 0. For example, when the number of point clouds with an attribute value of 0 consecutively appearing is greater than or equal to 1, the value of identifier 1 is set to the number of consecutively appearing 0, and when 0 does not appear, the value of identifier 1 is set to 0.
- code identifier 2 is used to indicate whether the value of the attribute value of the current point cloud point minus 1 is 0. For example, if the value of the attribute value minus 1 is 0, then the value of the flag 2 is 1. If the attribute value of the current point cloud point minus 1 is not 0, then encode the specific value of the attribute value; or if the attribute value of the current point cloud point minus 1 is not 0, continue to encode the identification 3. The identifier 3 is used to indicate whether the value of the attribute value of the current point cloud point minus 2 is 0, and if it is not 0, continue to encode the specific value of the attribute value.
- the value of the attribute value of the current point cloud point minus 2 is 0, the value of identifier 3 is set to 1, if it is not 0, the value of identifier 3 is set to 0, and the specific value of the attribute is coded Numerical value.
- the flag 3 indicates that the attribute value of the current point cloud point is not 2
- the coding flag 4 is continued to indicate whether the value of the attribute value of the current point cloud point minus 3 is 0.
- the grammar element lifting_search_range is equal to 0
- the residual error of the attribute value of each point cloud point is not encoded, but the attribute value of each point cloud point itself is encoded, and the attribute value of the point cloud point itself takes the probability of 0
- the attribute value of the point cloud is encoded, using the above-mentioned identifier 1, identifier 2, and identifier 3 will cause the redundancy of the code stream and waste the bits in the code stream. Therefore, in an example, when the syntax element lifting_search_range is equal to 0, the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data. After the Morton code corresponding to the position coordinate is obtained, the Morton code can be calculated according to the Morton code.
- the size relationship of sorts the point cloud points in the point cloud, directly encodes the attribute values of the sorted point cloud, and omits the above-mentioned identification 1, identification 2, identification 3, etc. in the encoding result. Because attribute values with similar spatial locations are closer, consecutively encoding the same value during encoding will be more conducive to improving the compression rate. Therefore, by deleting redundant identification information, the order of the point cloud points in the point cloud is retained, and the encoding is There is a certain improvement in performance.
- the "Calculate the Morton code corresponding to each position coordinate according to the position coordinates of the point cloud data" can be skipped, and the point cloud is calculated according to the magnitude relationship of the Morton code.
- the point cloud points in the data are sorted, and the identification information is determined according to the attribute values of the sorted point cloud points.
- the attribute value of the point cloud data is directly obtained, and the attribute value of the point cloud data is encoded.
- the present invention provides a data decoding method corresponding to the foregoing encoding method.
- FIG. 5 is an example to illustrate the data decoding method proposed in the embodiment of the present invention.
- FIG. 5 is provided by the embodiment of the present invention.
- a schematic flow chart of a data decoding method As shown in FIG. 5, the input code stream 51 to be decoded is first subjected to arithmetic decoding 52, the position information related code stream is decoded, and the reconstructed position coordinates are obtained through position decoding 53, inverse quantization 54. Correspondingly, according to the order of the position coordinates after the position decoding 83, the attribute value of the point cloud is decoded through the attribute decoding 55.
- the predictive decoding scheme based on Morton code is a method of decoding the attributes of the point cloud data.
- the value of the syntax element lifting_search_range of the point cloud data is decoded from the code stream data.
- the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data.
- the size relationship of the code sorts the point cloud points in the point cloud.
- the residual error of the attribute value of each point cloud point in the point cloud is corresponding to the sorted point cloud point.
- the residual error of the attribute value of the current point cloud point is 0 and the number of point cloud points with a residual error of 0 continuously appear according to the value of the identifier 1. For example, when the value of the identifier 1 is decoded to be non-zero, it is determined according to the specific value of the identifier 1 that the number of point cloud points with a residual error of 0 consecutively appears in the sorted point cloud from the current point cloud point.
- the value of the identifier 1 When the value of the identifier 1 is decoded to be 0, it is determined that the residual of the attribute value of the current point cloud point is not 0, and the specific value of the residual is continued to be decoded; or, when it is determined that the residual of the attribute value of the current point cloud point is not At 0, continue to decode the value of the identifier 2 from the code stream, and determine whether the residual of the attribute value of the current point cloud point is 1 according to the value of the identifier 2. For example, when the value of the identifier 2 is decoded as 1, it is determined that the residual of the attribute value of the current point cloud point is 1.
- the identifier 3 is decoded, and it is determined whether the residual error of the attribute of the current point cloud point is 2 according to the value of the identifier 3.
- the decoded value of the identifier 3 is 1, it is determined that the residual error of the attribute value of the current point cloud point is 2.
- the decoded value of the identifier 3 is 0, it is determined that the residual of the attribute value of the current point cloud point is not 2, and then the specific value of the residual of the attribute of the current point cloud point is continued to be decoded.
- the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data, and the Morton code corresponding to the position coordinate is obtained. After that, the point cloud points in the point cloud are sorted according to the magnitude relationship of the Morton code. Decoding the code stream data to obtain the attribute value of each point cloud point in the point cloud corresponds to the sorted point cloud point. Therefore, the code stream data is directly decoded to determine the attribute value of each point cloud point in the sorted point cloud. In the decoding process, the residual error of the attribute value of the point cloud point is omitted, and the algorithm complexity of the decoding process is reduced. degree.
- the code stream When decoding the attribute value of the current point cloud point, the code stream contains the identifier 1. First, according to the value of the identifier 1, it is determined whether the attribute value of the current point cloud point is 0 and the number of point cloud points with the attribute value 0 continuously appearing. For example, when it is decoded that the value of the identifier 1 is not 0, it is determined according to the specific value of the identifier 1 that the number of point cloud points with an attribute value of 0 consecutively appear in the sorted point cloud from the current point cloud point.
- the code stream continues to decode the value of identifier 2 and determine whether the attribute value of the current point cloud point is 1 according to the value of identifier 2. For example, when the value of the identifier 2 is decoded to be 1, it is determined that the attribute value of the current point cloud point is 1.
- the value of the identifier 2 When the value of the identifier 2 is decoded as 0, it is determined that the attribute value of the current point cloud point is not 1, then continue to decode the specific value of the attribute of the current point cloud point, or continue to decode the identifier 3 from the code stream, according to The value of the indicator 3 determines whether the attribute of the current point cloud point is 2. When the decoded value of the identifier 3 is 1, it is determined that the attribute value of the current point cloud point is 2. When the decoded value of the identifier 3 is 0, it is determined that the attribute value of the current point cloud point is not 2, and then the specific value of the attribute of the current point cloud point is continued to be decoded.
- the decoding end is based on the position of each point cloud. After sorting the point cloud by the Morton code corresponding to the coordinate, the attribute value itself of the current point cloud point in the sorted point cloud is directly decoded according to the code stream.
- the value of the lifting_search_range element when the value of the lifting_search_range element is decoded to be equal to 0, it is also possible to skip "Calculating the Morton code corresponding to each position coordinate according to the position coordinates of the point cloud data. After the Morton code, the point cloud points in the point cloud are sorted according to the magnitude relationship of the Morton code, and the code stream data is directly decoded to obtain the attribute value of each point cloud point in the point cloud.
- the value of the syntax element lifting_search_range is equal to 0 through this decoding, the bitstream data is directly decoded to obtain the attribute value of the point cloud, which can avoid decoding the attribute value of the redundant point cloud and reduce the algorithm complexity in the decoding process , Improve the efficiency of decoding.
- the data decoding method proposed by the present invention has lower algorithm complexity than the existing decoding method.
- Figure 6 is an example to illustrate the existing point cloud data compression decoding process.
- Figure 6 It is a schematic diagram of a decoding process of existing point cloud data provided by an embodiment of the present invention. As shown in Fig. 6, the bit stream data 61 to be decoded is obtained and arithmetic decoding 62 is performed, and the arithmetic decoded data is inversely quantized 64 through the octree coding 63 to obtain the position coordinates of the point cloud data and generate the hierarchical code Scheme 65.
- the data after arithmetic decoding 62 is inversely quantized 66, and the binary code stream data obtained by inverse quantization 66 is inversely predicted 67 based on the hierarchical coding scheme to obtain the attribute value of the point cloud data, and finally according to the attribute of the point cloud data Value and position coordinates to obtain the decoded point cloud data 68.
- the predictive coding scheme based on Morton code for the attribute coding of point cloud data has less process of generating the LOD layered scheme, and the computational complexity is greatly reduced. And the decoding process reduces part of the time overhead and computing resource overhead.
- the following is a schematic introduction to the LOD layering scheme.
- the LOD hierarchical scheme is a hierarchical coding scheme generated according to the reordered position coordinates after point cloud coding.
- the point cloud encoding process can be schematically illustrated in FIG. 7 as an example.
- FIG. 7 is a schematic diagram of an existing point cloud data encoding process provided by an embodiment of the present invention. As shown in FIG. 7, by inputting point cloud data 71, the position coordinates of the input point cloud data are quantified 72, and the position coordinates are processed to remove duplicate coordinates 721, and the position coordinates after the duplicate coordinates 721 are removed are octrees Code 73. In some embodiments, the octree code 73 is one of position codes.
- Attribute conversion 74 is performed on the attribute value of the input point cloud data, and the attribute value corresponding to the order of the reordered position coordinates after the octree code 73 is converted 74, and the attribute value is reordered according to the octree code 73
- the position coordinate generates a hierarchical coding scheme 75.
- the attribute value obtained by the attribute conversion 74 is predicted and encoded 76, and the residual of the attribute value obtained by the predictive encoding 76 is quantized 77, that is, binarized.
- the binary code stream obtained by the quantization 77 and the octree encoding 77 is subjected to arithmetic coding 78, thereby obtaining code stream data 79 after encoding the point cloud data.
- FIG. 8 is a schematic diagram of generating a hierarchical coding scheme according to an embodiment of the present invention.
- LOD layering is first performed according to the parameters of the LOD configuration. This is the LOD layering described in Figure 8.
- the process of LOD layering is shown in Figure 8.
- There is also the following layer will contain the points of the previous layer, which is the meaning of the different colors in the picture.
- P0, P2, P4, and P5 are the same color
- P1, P3, P6 are the same color
- P7, P8, P9 are the same color.
- first select the first point in the point cloud data place it on the first point of the LOD0 layer, and then start to traverse the point cloud points in turn, calculating the current point cloud point and the current layer already contained The distance between all points in the Cartesian coordinate system. If the minimum distance is greater than the search range set in the current LOD layer, the current point cloud point will be drawn to the current LOD layer.
- the process of the hierarchical coding scheme by sorting the calculated distances, several reference point cloud point cloud points with the smallest distance are selected, wherein the number of the reference point cloud point cloud points is Determined by the search range.
- a point cloud point is assigned to a LOD layer, there is no need to determine whether it still belongs to the next LOD layer, because the next layer contains the previous layer, so it must belong to The next LOD layer.
- the number of selected reference point cloud point cloud points may be less than the search range. After dividing the LOD layer, it is necessary to use the nearest point previously selected to assign the weight for prediction.
- the nearest reference point cloud point within the search range sorted by distance has been obtained previously, and then one reference point cloud point and two The reference point cloud point cloud point until the last reference point cloud point cloud point in the search range is used to obtain the weight distribution plan, wherein the type of the weight distribution plan is related to the reference point cloud point cloud point in the search range The numbers match.
- the one reference point cloud point when the one reference point cloud point is the one with the smallest distance as the reference point cloud point, its weight is 1 at this time.
- the two reference point cloud points In the case of the two reference point cloud points, the two point cloud points with the smallest distance are selected as the reference point cloud points.
- weights are assigned according to the distance between the two reference point cloud points and the point cloud point to be predicted.
- n point cloud points are selected as reference point cloud points, where n is the number of point cloud points in the search range, and the weight distribution method is the same as the previous one. In some embodiments, the longer the distance, the smaller the weight, and it is guaranteed that the weight sum is 1.
- the number of reference point cloud points needs to be selected. It should be noted here that the number of adjacent reference point cloud points that can be selected for a predicted point is less than or equal to the number of point cloud points in the search range of. Specifically, when the maximum number of reference point cloud points is limited to one, the sum of the quantified residuals between the predicted value (weight multiplied by the attribute value of the corresponding position) and the actual attribute value, this sum is the reference point cloud The cost when the maximum number of points is 1. Then it will traverse the cost when the maximum number of reference point cloud points is two. Until the maximum number of reference point cloud points is limited to the number of point cloud points in the search range, a scheme with the least cost and maximum reference point cloud points is finally selected, and the quantized residual value under this scheme is encoded.
- FIG. 9 is a schematic flowchart of a data encoding method according to an embodiment of the present invention.
- the method can be applied to a data encoding device, wherein the data encoding device can be set on a smart terminal (such as a mobile phone, a tablet computer, etc.).
- the embodiments of the present invention can also be applied to aircraft (such as unmanned aerial vehicles).
- the embodiments of the present invention can also be applied to other movable platforms (such as unmanned ships, unmanned aerial vehicles).
- the embodiment of the present invention does not make specific limitations.
- the method of the embodiment of the present invention includes the following steps.
- S901 Determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding.
- the data encoding device can determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate that the attribute value of the point cloud is performing prediction Search range during encoding.
- the syntax element may be the lifting_search_range syntax element mentioned above.
- the point cloud data may be obtained through one or more collection devices; in some embodiments, the collection devices may include, but are not limited to, imaging devices, laser radars, laser scanners and other equipment.
- the lidar is a perceptual sensor that can obtain three-dimensional information of the scene.
- the basic principle is to actively emit laser pulse signals to the detected object and obtain the reflected pulse signals.
- the depth information of the distance detector of the object to be measured is calculated; Know the launch direction, obtain the angle information of the measured object relative to the lidar; combine the aforementioned depth information and angle information to obtain a large number of detection points (called point cloud data).
- S902 When it is determined that the search range is not 0 according to the value of the syntax element, perform prediction processing on the attribute value of the point cloud to obtain the residual error of the attribute value of the point cloud,
- the first code stream data is obtained by encoding the residual of the attribute value of the attribute value, wherein the first code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0.
- the data encoding device may perform prediction processing on the attribute value of the point cloud to obtain the value of the attribute value of the point cloud Residual, the first bitstream data is obtained by encoding the residual of the attribute value of the point cloud, wherein the first bitstream data includes identification information, and the identification information is used to indicate the value of at least one point cloud point The residual of the attribute value is 0.
- the identification information may include at least one of the aforementioned identification 1, identification 2, and identification 3.
- the point cloud data further includes the position coordinates of the point cloud.
- the data encoding device performs Before performing the prediction processing on the attribute value of the point cloud, the Morton code corresponding to the position coordinates of the point cloud point in the point cloud can be calculated, and according to the Morton code of the point cloud point in the point cloud, the point cloud The point cloud points are sorted.
- the point cloud may be classified according to the order of the point cloud points in the point cloud and the search range. The attribute value is predicted.
- the data encoding device when the data encoding device predicts the attribute value of the point cloud according to the order of the point cloud points in the point cloud and the search range, it can determine the reference point of the current point cloud point Cloud point, the sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range, and according to the attribute value of the reference point cloud point and the current point cloud For the attribute value of the point cloud point, the residual of the attribute value of the point cloud point is calculated.
- the data encoding device may determine the residual of the attribute value of the point cloud point according to the attribute value of the reference point cloud point and the attribute value of the current point cloud point.
- the difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point is the residual error of the attribute value of the point cloud point.
- the data encoding device may calculate the point cloud according to the difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point The residual of the attribute value of the point.
- the data encoding device may calculate all data before encoding the attribute value of the point cloud to obtain the second code stream data.
- the Morton code corresponding to the position coordinates of the point cloud points in the point cloud is described, and the point cloud points in the point cloud are sorted according to the Morton code of the point cloud points in the point cloud.
- the data encoding device when it encodes the attribute value of the point cloud to obtain the second code stream data, it may encode the attribute value of the sorted point cloud to obtain the second code stream data .
- the data encoding device sorts the point cloud points in the point cloud according to the Morton code of the point cloud points
- the point cloud in the point cloud The Morton codes of the points are sorted, and the point cloud points corresponding to the Morton codes are sorted according to the Morton code sorting.
- the point cloud points in the point cloud include D1, D2, D3, D4, D5, D6, the Morton code corresponding to D1 is M1, the Morton code corresponding to D2 is M2, and the Morton code corresponding to D3 is M3.
- the Morton code corresponding to D4 is M4, the Morton code corresponding to D5 is M5, and the Morton code corresponding to D6 is M6.
- the order of Morton code is M2, M4, M5, M1, M6, M3, the point cloud points corresponding to the Morton code can be ordered according to the order of Morton code, and the point cloud can be determined
- the order of the points is: D2, D4, D5, D1, D6, D3.
- the identification information includes a first identification
- the first identification is used to indicate the number of point cloud points where the residual error of the attribute value is continuously 0. For example, assuming that the first identifier is 5, it can be determined that there are 5 point cloud points whose residual error of the attribute value is continuously 0.
- the first identification may be the identification 1 mentioned above.
- the identification information includes a second identification
- the second identification is used to indicate whether the residual of the attribute value of the current point cloud point is n, and n is a positive integer.
- the n is 1 or 2.
- the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero. For example, assuming that the second identifier is 1, it is used to indicate whether the difference between the residual of the attribute value of the current point cloud point and 1 is zero. For another example, assuming that the second identifier is 2, it is used to indicate whether the difference between the residual of the attribute value of the current point cloud point and 2 is zero.
- the second identification includes the identification 2 and/or the identification 3 mentioned above.
- the data encoding device when it is determined that the search range is not 0 according to the value of the syntax element, the data encoding device encodes the residual error of the attribute value of the point cloud to obtain the first bitstream data Previously, sign conversion can also be performed on the residual of the attribute value of the point cloud. In some embodiments, after the data decoding device performs sign conversion on the residual of the attribute value of the point cloud, it may encode the residual of the point cloud in accordance with the converted attribute value to obtain the first Stream data.
- the residual of the attribute value of the point cloud includes -1
- the residual -1 of the attribute value of the point cloud can be converted to 1 according to the preset rule -1-(2*(-1)), and the After the conversion, the residual of the attribute value of the point cloud of the residual 1 of the attribute value is encoded to obtain the first code stream data.
- the data encoding device may skip the step of "predicting the attribute value of the point cloud" and perform the The second code stream data is obtained by encoding the attribute value of the point cloud.
- the data encoding device when it is determined that the search range is 0 according to the value of the syntax element, encodes the attribute value of the point cloud to obtain the second code stream data, and may perform the The attribute value of the cloud is binarized and encoded to obtain the second code stream data.
- the data encoding device may also skip the "determining the point cloud in the point cloud according to the position of the point cloud The Morton code of the point, the step of sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud.
- the data encoding device may also skip the step of "signature conversion on the attribute value of the point cloud" and directly The second code stream data is obtained by encoding the attribute value of the point cloud. For example, assuming that the attribute value of the point cloud includes -1, the data encoding device can skip the step of performing symbol conversion on the attribute value -1 of the point cloud, and directly encode the attribute value -1 of the point cloud to obtain the second Stream data.
- the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud.
- the residual is encoded; when the search range determined by the value of the syntax element is 0, the step of "predicting the attribute value of the point cloud" is skipped, and the attribute value of the point cloud is encoded.
- FIG. 10 is a schematic flowchart of another data encoding method according to an embodiment of the present invention.
- the method can be applied to a data encoding device, wherein the explanation of the data encoding device is as described above.
- the method of the embodiment of the present invention includes the following steps.
- S1001 Determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding.
- the data encoding device can determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate that the attribute value of the point cloud is The search range for predictive coding.
- the data encoding device may encode the attribute value of the point cloud to obtain code stream data, wherein the code stream data Does not include an identifier indicating that the attribute value of at least one point cloud point is 0.
- the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0; in some embodiments, the code stream data does not include An identifier indicating whether the attribute value of the current point cloud point is 1; in some embodiments, the code stream data does not include an identifier used to indicate whether the difference between the attribute value of the current point cloud point and 1 is 0; In some embodiments, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2; in some embodiments, the code stream data does not include an identifier for indicating the current point cloud point An indicator of whether the difference between the attribute value of the point cloud point and 2 is 0.
- the data encoding device when the data encoding device encodes the attribute value of the point cloud to obtain bitstream data, it may perform binary encoding on the attribute value of the point cloud to obtain the bitstream data.
- the data encoding device may skip the step of "predicting the attribute value of the point cloud". In some embodiments, the step of "predicting the attribute value of the point cloud" occurs when it is determined that the search range is not 0 according to the value of the syntax element.
- the data encoding device may also skip the step of "predicting the attribute value of the point cloud” "Calculate the Morton code corresponding to the position coordinates of the point cloud points in the point cloud, and sort the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud" before the step A step of.
- the step of "predicting the attribute value of the point cloud” includes: determining a reference point cloud point of a current point cloud point, and the reference point cloud point is the same as the current point cloud point
- the sorting distance in the sorted point cloud is not greater than the search range, and the attribute value of the point cloud point is calculated according to the attribute value of the reference point cloud point and the attribute value of the current point cloud point Residual.
- the residual of the attribute value of the point cloud point may be the difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point.
- the data encoding device may also calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud, and perform the calculation on the Morton code of the point cloud point in the point cloud.
- the point cloud points in the point cloud are sorted.
- when the data encoding device encodes the attribute value of the point cloud to obtain code stream data it may encode the attribute value of the sorted point cloud to obtain code stream data. The specific embodiments are as described above, and will not be repeated here.
- the data decoding device may also skip the step of "signature conversion on the attribute value of the point cloud".
- the algorithm complexity of the attribute encoding can be greatly simplified, the time cost is reduced, and the The efficiency of attribute encoding.
- FIG. 11 is a schematic flowchart of a data decoding method provided by an embodiment of the present invention.
- the method can be applied to a data decoding device, where the data decoding method can be applied to a data decoding device.
- the decoding device can also be set on a smart terminal (such as a mobile phone, a tablet computer, etc.).
- the method of the embodiment of the present invention includes the following steps.
- S1101 Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the attribute value of the point cloud during predictive decoding. Search scope.
- the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the point cloud The search range of the attribute value during predictive decoding.
- the syntax element may be the aforementioned lifting_search_range; of course, in other embodiments, the syntax element may also include other expression forms, which are not specifically limited here.
- S1102 When it is determined that the search range is not 0 according to the value of the syntax element, decode the code stream data to obtain the residual error of the attribute value of the point cloud, and perform the calculation on the residual error of the attribute value of the point cloud. Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual error of the attribute value of at least one point cloud point is zero.
- the data decoding device when it is determined that the search range is not 0 according to the value of the syntax element, can decode the code stream data to obtain the residual error of the attribute value of the point cloud, The residual of the attribute value of the point cloud is compensated, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is zero.
- the data decoding device when the identification information does not include the first identification, when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may perform the inverse of binarization on the code stream data. Operation to obtain the attribute value of the point cloud.
- the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual error of the attribute value is continuously 0.
- the identification information includes a second identifier, and the second identifier is used to indicate whether the residual of the attribute value of the current point cloud point is n, where n is a positive integer; in some embodiments, The n is 1 or 2.
- the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero.
- the point cloud data further includes the position coordinates of the point cloud; when it is determined that the search range is not 0 according to the value of the syntax element, the decoding device performs the Before the residual error of the attribute value is compensated, the Morton code corresponding to the position coordinates of the point cloud point in the point cloud can be calculated, and the point cloud can be calculated according to the Morton code of the point cloud point in the point cloud. Sort the points in the point cloud. In one embodiment, when the data decoding device performs compensation processing on the residual error of the attribute value of the point cloud, the point cloud may be sorted according to the order of the point cloud points in the point cloud and the search range. The residual error of the attribute value is compensated.
- the data decoding device when the data decoding device performs compensation processing on the residuals of the attribute values of the point cloud according to the ordering of the point cloud points in the point cloud and the search range, the data decoding device may perform compensation processing according to the search range Determine the reference point cloud point of the current point cloud point, where the sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range, and according to the current point cloud The residual of the attribute value of the point and the attribute value of the reference point cloud point determine the attribute value of the current point cloud point.
- the data decoding device may determine the attribute value of the current point cloud point according to the residual of the attribute value of the current point cloud point and the attribute value of the reference point cloud point.
- the residual difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point is used to determine the attribute value of the current point cloud point.
- the point cloud points in the point cloud include D1, D2, D3, D4, D5, D6, and the order of the point cloud points is D2, D4, D5, D1, D6, D3, if the current If the point cloud point is D1, the data decoding device can determine the reference point cloud point of the current point cloud point D2 in D2, D4, and D5 before the current point cloud point D2 according to the search range 3 as D5, where The sorting distance between the reference point cloud points D2, D4, D5 and the current point cloud point D2 in the sorted point cloud is not greater than the search range 3.
- the data decoding device may determine the attribute value of the current point cloud point D2 according to the difference between the attribute value of the reference point cloud point D5 and the residual of the attribute value of the current point cloud point D2.
- the data decoding device may further perform compensation processing on the residual error of the attribute value of the point cloud
- the residuals of the attribute values of the point cloud undergo sign conversion.
- the specific implementation process and examples of performing symbol conversion on the residuals of the attribute values of the point cloud are described above, and will not be repeated here.
- the data decoding device after the data decoding device performs sign conversion on the residual of the attribute value of the point cloud, it may perform compensation processing on the residual of the point cloud in accordance with the converted attribute value.
- the data decoding device may skip "compensating for the residual error of the attribute value of the point cloud in the code stream data
- the step of "processing" is to decode the code stream data to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
- the data decoding device may perform a check on all the data when decoding the code stream data to obtain the attribute value of the point cloud.
- the bitstream data is subjected to the inverse operation of binarization to obtain the attribute value of the point cloud.
- the data decoding device may also skip the "calculate the position coordinates of the point cloud point in the point cloud" The step of sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud.
- the data decoding device may calculate the attribute value of the point cloud before decoding the code stream data Morton codes corresponding to the position coordinates of the point cloud points in the point cloud, and the point cloud points in the point cloud are sorted according to the Morton codes of the point cloud points in the point cloud.
- the data decoding device when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may decode the code stream data to obtain the attribute value of the sorted point cloud.
- the data decoding device may also skip the step of "signature conversion on the attribute value of the point cloud".
- the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, and when it is determined according to the value of the syntax element that the search range is not 0, the code stream The data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is compensated.
- the search range is determined to be 0 according to the value of the syntax element
- skip " The step of "compensating the residual error of the attribute value of the point cloud in the code stream data" is to decode the code stream data to obtain the attribute value of the point cloud.
- FIG. 12 is a schematic flowchart of another data decoding method provided by an embodiment of the present invention.
- the method can be applied to a data decoding device, and the explanation of the data decoding device is as described above.
- the method of the embodiment of the present invention includes the following steps.
- S1201 Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the attribute value of the point cloud during predictive decoding. Search scope.
- the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the point cloud The search range of the attribute value during predictive decoding.
- the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0; in some embodiments, the code stream data does not include To indicate whether the attribute value of the current point cloud point is 1; in some embodiments, the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 1 is 0 In some embodiments, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2; in some embodiments, the code stream data does not include an identifier for indicating An indicator of whether the difference between the attribute value of the current point cloud point and 2 is 0.
- the data decoding device when the search range is determined to be 0 according to the value of the syntax element, can decode the code stream data to obtain the attribute value of the point cloud, wherein the code stream The identification information is not included in the data.
- the data decoding device when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may perform the inverse operation of binarization on the code stream data to obtain the attribute value of the point cloud.
- the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0.
- the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 1.
- the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" occurs when the search range of the value of the syntax element of the point cloud data is not It is 0 o'clock.
- the data decoding device may also skip the step in the "pair of the attribute value of the point cloud in the code stream data Before the step of “compensating the residual error of the point cloud”, “calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud; compare the point cloud according to the Morton code of the point cloud point in the point cloud In the step of sorting the point cloud points.
- the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" includes: determining the reference point cloud point of the current point cloud point according to the search range , The sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range; according to the residual of the attribute value of the current point cloud point and the reference The attribute value of the point cloud point determines the attribute value of the current point cloud point.
- the data decoding device may also calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud, and compare the Morton code according to the Morton code of the point cloud point in the point cloud.
- the point cloud points in the point cloud are sorted.
- the data decoding device when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may decode the code stream data to obtain the attribute value of the sorted point cloud.
- the data decoding device may also skip the step of "signature conversion on the attribute value of the point cloud".
- the data decoding device may decode the bitstream data to obtain the attribute value of the point cloud.
- FIG. 13 is a schematic structural diagram of a data encoding device according to an embodiment of the present invention.
- the data encoding device includes a memory 1301, a processor 1302, and a data interface 1303.
- the memory 1301 may include a volatile memory (volatile memory); the memory 1301 may also include a non-volatile memory (non-volatile memory); the memory 1301 may also include a combination of the foregoing types of memories.
- the processor 1302 may be a central processing unit (CPU).
- the processor 1302 may further include a hardware data encoding device.
- the aforementioned hardware data encoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. For example, it may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
- ASIC application-specific integrated circuit
- PLD programmable logic device
- FPGA field-programmable gate array
- the memory 1301 is used to store a program, and when the program is executed, the processor 1302 can call the program stored in the memory 1301 to perform the following steps:
- the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud, and the attribute value of the point cloud Encoding the residual of the value to obtain the first bitstream data, wherein the first bitstream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
- the processor 1302 encodes the attribute value of the point cloud to obtain the second code stream data, specifically:
- the point cloud data further includes position coordinates of the point cloud
- the processor 1302 is further configured to: before performing prediction processing on the attribute value of the point cloud:
- processor 1302 When the processor 1302 performs prediction processing on the attribute value of the point cloud, it is specifically configured to:
- the attribute value of the point cloud is predicted.
- the "Determine Morton code of the point cloud point in the point cloud according to the position of the point cloud" is also skipped, and according to The step of sorting the point cloud points in the point cloud by the Morton code of the point cloud points in the point cloud.
- processor 1302 predicts the attribute value of the point cloud according to the order of the point cloud points in the point cloud and the search range, it is specifically configured to:
- a residual error of the attribute value of the point cloud point is calculated.
- the processor 1302 is further configured to: before encoding the attribute value of the point cloud to obtain the second code stream data:
- processor 1302 encodes the attribute value of the point cloud to obtain the second code stream data, it is specifically configured to:
- the second code stream data is obtained by encoding the attribute values of the sorted point cloud.
- the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual of the attribute value is continuously 0.
- the identification information includes a second identification, and the second identification is used to indicate whether the residual error of the attribute value of the current point cloud point is n, and n is a positive integer.
- n 1 or 2.
- the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero.
- the processor 1302 encodes the residual error of the attribute value of the point cloud to obtain the first bitstream data, using in:
- processor 1302 encodes the residual of the attribute value of the point cloud to obtain the first bitstream data, it is specifically configured to:
- the first bitstream data is obtained by encoding the residual of the point cloud in accordance with the converted attribute value.
- the step of "signature conversion on the attribute value of the point cloud" is also skipped.
- the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud.
- the residual is encoded; when the search range determined by the value of the syntax element is 0, the step of "predicting the attribute value of the point cloud" is skipped, and the attribute value of the point cloud is encoded.
- FIG. 14 is a schematic structural diagram of another data encoding device according to an embodiment of the present invention.
- the data encoding device includes a memory 1401, a processor 1402, and a data interface 1403.
- the memory 1401 may include a volatile memory (volatile memory); the memory 1401 may also include a non-volatile memory (non-volatile memory); the memory 1401 may also include a combination of the foregoing types of memories.
- the processor 1402 may be a central processing unit (CPU).
- the processor 1402 may further include a hardware data encoding device.
- the aforementioned hardware data encoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. For example, it may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
- ASIC application-specific integrated circuit
- PLD programmable logic device
- FPGA field-programmable gate array
- the memory 1401 is used to store programs, and when the programs are executed, the processor 1402 can call the programs stored in the memory 1401 to perform the following steps:
- the attribute value of the point cloud is coded to obtain code stream data, wherein the code stream data does not include at least one point cloud indicating The point's attribute value is 0.
- processor 1402 encodes the attribute value of the point cloud to obtain bitstream data, it is specifically used for:
- Binary encoding is performed on the attribute value of the point cloud to obtain code stream data.
- the step of "predicting the attribute value of the point cloud" is skipped.
- the step of "predicting the attribute value of the point cloud" occurs when it is determined that the search range is not 0 according to the value of the syntax element.
- the "calculation of the point cloud" before the step of "predicting the attribute value of the point cloud” is also skipped.
- the point cloud points in the point cloud are sorted according to the Morton code of the point cloud points in the point cloud".
- step of "predicting the attribute value of the point cloud” includes:
- processor 1402 is further configured to:
- processor 1402 encodes the attribute value of the point cloud to obtain code stream data, it is specifically used for:
- Code stream data is obtained by encoding the attribute values of the sorted point cloud.
- the step of "signature conversion on the attribute value of the point cloud" is also skipped.
- the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0.
- the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 1.
- the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 1 is 0.
- the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2.
- the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 2 is zero.
- the algorithm complexity of the attribute encoding can be greatly simplified, the time cost is reduced, and the The efficiency of attribute encoding.
- FIG. 15 is a schematic structural diagram of a data decoding device according to an embodiment of the present invention.
- the data decoding device includes a memory 1501, a processor 1502, and a data interface 1503.
- the memory 1501 may include a volatile memory (volatile memory); the memory 1501 may also include a non-volatile memory (non-volatile memory); the memory 1501 may also include a combination of the foregoing types of memories.
- the processor 1502 may be a central processing unit (CPU).
- the processor 1502 may further include a hardware data encoding device.
- the aforementioned hardware data encoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. For example, it may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
- ASIC application-specific integrated circuit
- PLD programmable logic device
- FPGA field-programmable gate array
- the memory 1501 is used to store a program, and when the program is executed, the processor 1502 can call the program stored in the memory 1501 to perform the following steps:
- the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
- the code stream data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is performed Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
- the step of "compensating for the residual error of the attribute value of the point cloud in the code stream data" is skipped, and the code stream is The data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
- the processor 1502 determines that the search range is 0 according to the value of the syntax element, decodes the code stream data to obtain the attribute value of the point cloud, and is specifically configured to:
- the inverse operation of binarization is performed on the code stream data to obtain the attribute value of the point cloud.
- the point cloud data further includes position coordinates of the point cloud
- the processor 1502 determines that the search range is not 0 according to the value of the syntax element, before performing compensation processing on the residual of the attribute value of the point cloud, it is further configured to:
- processor 1502 When the processor 1502 performs compensation processing on the residual error of the attribute value of the point cloud, it is specifically configured to:
- processor 1502 performs compensation processing on the residual error of the attribute value of the point cloud according to the order of the point cloud points in the point cloud and the search range, it is specifically configured to:
- the attribute value of the current point cloud point is determined according to the residual of the attribute value of the current point cloud point and the attribute value of the reference point cloud point.
- the "calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud" is skipped, and according to the point cloud The step of sorting the point cloud points in the point cloud by the Morton code of the point cloud points in the cloud.
- the processor 1502 determines that the search range is 0 according to the value of the syntax element, before decoding the code stream data to obtain the attribute value of the point cloud, it is further configured to:
- the processor 1502 decodes the code stream data to obtain the attribute value of the point cloud, it is specifically configured to:
- the code stream data is decoded to obtain the attribute value of the sorted point cloud.
- the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual of the attribute value is continuously 0.
- the identification information includes a second identification, and the second identification is used to indicate whether the residual of the attribute value of the current point cloud point is n, and n is a positive integer.
- n 1 or 2.
- the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero.
- the processor 1502 is further configured to: before performing compensation processing on the residual of the attribute value of the point cloud:
- processor 1502 When the processor 1502 performs compensation processing on the residual error of the attribute value of the point cloud, it is specifically configured to:
- Compensation processing is performed on the residual error conforming to the converted attribute value of the point cloud.
- the step of "signature conversion on the attribute value of the point cloud" is also skipped.
- the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, and when it is determined according to the value of the syntax element that the search range is not 0, the code stream The data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is compensated.
- the search range is determined to be 0 according to the value of the syntax element
- skip " The step of "compensating the residual error of the attribute value of the point cloud in the code stream data" is to decode the code stream data to obtain the attribute value of the point cloud.
- FIG. 16 is a schematic structural diagram of another data decoding device according to an embodiment of the present invention.
- the data decoding device includes a memory 1601, a processor 1602, and a data interface 1603.
- the memory 1601 may include a volatile memory (volatile memory); the memory 1601 may also include a non-volatile memory (non-volatile memory); the memory 1601 may also include a combination of the foregoing types of memories.
- the processor 1602 may be a central processing unit (CPU).
- the processor 1602 may further include a hardware data encoding device.
- the aforementioned hardware data encoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. For example, it may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
- ASIC application-specific integrated circuit
- PLD programmable logic device
- FPGA field-programmable gate array
- the memory 1601 is used to store a program, and when the program is executed, the processor 1602 can call the program stored in the memory 1601 to perform the following steps:
- the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
- the code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include identification information.
- processor 1602 decodes the code stream data to obtain the attribute value of the point cloud, it is specifically configured to:
- the inverse operation of binarization is performed on the code stream data to obtain the attribute value of the point cloud.
- code stream data does not include an identifier used to indicate that the attribute value of at least one point cloud point is 0, skip "checking the residual of the attribute value of the point cloud in the code stream data Compensation processing" steps.
- the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" occurs when the search range of the value of the syntax element of the point cloud data is not 0 .
- step of "compensating the residual error of the attribute value of the point cloud in the code stream data" includes:
- the attribute value of the current point cloud point is determined according to the residual of the attribute value of the current point cloud point and the attribute value of the reference point cloud point.
- processor 1602 is further configured to:
- the processor 1602 decodes the code stream data to obtain the attribute value of the point cloud, it is specifically used for:
- the code stream data is decoded to obtain the attribute value of the sorted point cloud.
- the step of "signature conversion on the attribute value of the point cloud" is also skipped.
- the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0.
- the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 1.
- the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 1 is 0.
- the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2.
- the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 2 is 0.
- the data decoding device may decode the bitstream data to obtain the attribute value of the point cloud.
- a computer-readable storage medium stores a computer program.
- the data encoding method described, or the data decoding method described in Figure 11 or Figure 12 can also implement the data encoding device of the corresponding embodiment of the present invention described in Figure 13 or Figure 14, or the present invention described in Figure 15 or 16.
- the data decoding device of the corresponding embodiment of the invention will not be repeated here.
- the computer-readable storage medium may be an internal storage unit of the device described in any of the foregoing embodiments, such as a hard disk or memory of the device.
- the computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a Smart Media Card (SMC), or a Secure Digital (SD) card , Flash Card, etc.
- the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device.
- the computer-readable storage medium is used to store the computer program and other programs and data required by the device.
- the computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
- the program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments.
- the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
本发明涉及数据编解码领域,尤其涉及一种数据编码、数据解码方法、设备及存储介质。The present invention relates to the field of data coding and decoding, in particular to a data coding and data decoding method, equipment and storage medium.
目前,通过激光雷达、激光扫描仪等设备可以采集得到点云数据。点云数据是三维物体或场景的一种表现形式,是由空间中一组无规则分布、表达三维物体或场景空间结构和表面属性的离散点集所构成。为了准确反映空间中的信息,所需离散点的数目是巨大的。为了减少点云数据存储和传输时所占用的带宽,可以对点云数据进行编码压缩处理。一个点云数据通常由描述坐标信息的三维坐标(x,y,z)以及该位置的属性值信息如颜色(R,G,B)或者反射率等属性构成。在对点云数据进行编码的过程中,包括点云数据的位置编码和属性编码,其中,对所述点云数据的属性编码的过程中还存在可以改进的地方。At present, point cloud data can be collected by laser radar, laser scanner and other equipment. Point cloud data is a form of expression of a three-dimensional object or scene. It is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of the three-dimensional object or scene. In order to accurately reflect the information in the space, the number of discrete points required is huge. In order to reduce the bandwidth occupied by point cloud data storage and transmission, the point cloud data can be encoded and compressed. A point cloud data is usually composed of three-dimensional coordinates (x, y, z) describing coordinate information and attribute value information of the location, such as color (R, G, B) or reflectivity. The process of encoding the point cloud data includes position encoding and attribute encoding of the point cloud data. Among them, there are still areas that can be improved in the process of encoding the attribute of the point cloud data.
发明内容Summary of the invention
本发明实施例提供了一种数据编码、数据解码方法、设备及存储介质,降低了数据编码、解码过程的算法复杂度,提高了数据编码、解码的效率。The embodiment of the present invention provides a data encoding and data decoding method, device and storage medium, which reduces the algorithmic complexity of the data encoding and decoding process, and improves the efficiency of data encoding and decoding.
第一方面,本发明实施例提供了一种数据编码方法,包括:In the first aspect, an embodiment of the present invention provides a data encoding method, including:
确定点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围;Determining a value of a syntax element of the point cloud data, the point cloud data including the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding;
当根据所述语法元素的取值确定所述搜索范围不为0时,对所述点云的属性值进行预测处理,得到所述点云的属性值的残差,对所述点云的属性值的残差进行编码得到第一码流数据,其中,所述第一码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0;When it is determined that the search range is not 0 according to the value of the syntax element, the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud, and the attribute value of the point cloud Encoding the residual of the value to obtain the first bitstream data, wherein the first bitstream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
当根据所述语法元素的取值确定所述搜索范围为0时,跳过所述“对所述点云的属性值进行预测处理”的步骤,对所述点云的属性值进行编码得到第二码流数据,其中,所述第二码流数据中不包括第一标识。When it is determined that the search range is 0 according to the value of the syntax element, skip the step of "predicting the attribute value of the point cloud", and encode the attribute value of the point cloud to obtain the first Two code stream data, wherein the second code stream data does not include the first identifier.
第二方面,本发明实施例提供了另一种数据编码方法,包括:In the second aspect, embodiments of the present invention provide another data encoding method, including:
确定点云数据的语法元素的取值,所述点云数据包括所述点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围;Determining a value of a syntax element of the point cloud data, the point cloud data including the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding;
当根据所述语法元素的取值确定所述搜索范围为0时,对所述点云的属性值进行编码得到码流数据,其中,所述码流数据中不包括用于指示至少一个点云点的属性值为0的标识。When it is determined that the search range is 0 according to the value of the syntax element, the attribute value of the point cloud is coded to obtain code stream data, wherein the code stream data does not include at least one point cloud indicating The point's attribute value is 0.
第三方面,本发明实施例提供了一种数据解码方法,包括:In the third aspect, an embodiment of the present invention provides a data decoding method, including:
从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围;Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
当根据所述语法元素的取值确定所述搜索范围不为0时,对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,其中,所述码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0;When it is determined that the search range is not 0 according to the value of the syntax element, the code stream data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is performed Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。When it is determined that the search range is 0 according to the value of the syntax element, the step of "compensating for the residual error of the attribute value of the point cloud in the code stream data" is skipped, and the code stream is The data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
第四方面,本发明实施例提供了另一种数据解码方法,包括:In the fourth aspect, embodiments of the present invention provide another data decoding method, including:
从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围;Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
当根据所述语法元素的取值确定所述搜索范围为0时,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括标识信息。When it is determined that the search range is 0 according to the value of the syntax element, the code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include identification information.
第五方面,本发明实施例提供了一种数据编码设备,其特征在于,包括:存储器和处理器;In a fifth aspect, an embodiment of the present invention provides a data encoding device, which is characterized by comprising: a memory and a processor;
所述存储器,用于存储程序;The memory is used to store programs;
所述处理器,用于调用所述程序,当所述程序被执行时,用于执行以下操作:The processor is used to call the program, and when the program is executed, it is used to perform the following operations:
确定点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围;Determining a value of a syntax element of the point cloud data, the point cloud data including the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding;
当根据所述语法元素的取值确定所述搜索范围不为0时,对所述点云的属 性值进行预测处理,得到所述点云的属性值的残差;对所述点云的属性值的残差进行编码得到第一码流数据,其中,所述第一码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0;When it is determined that the search range is not 0 according to the value of the syntax element, the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud; Encoding the residual of the value to obtain the first bitstream data, wherein the first bitstream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
当根据所述语法元素的取值确定所述搜索范围为0时,跳过所述“对所述点云的属性值进行预测处理”的步骤,对所述点云的属性值进行编码得到第二码流数据,其中,所述第二码流数据中不包括第一标识。When it is determined that the search range is 0 according to the value of the syntax element, skip the step of "predicting the attribute value of the point cloud", and encode the attribute value of the point cloud to obtain the first Two code stream data, wherein the second code stream data does not include the first identifier.
第六方面,本发明实施例提供了另一种数据编码设备,其特征在于,包括:存储器和处理器;In a sixth aspect, an embodiment of the present invention provides another data encoding device, which is characterized by including: a memory and a processor;
所述存储器,用于存储程序;The memory is used to store programs;
所述处理器,用于调用所述程序,当所述程序被执行时,用于执行以下操作:The processor is used to call the program, and when the program is executed, it is used to perform the following operations:
确定点云数据的语法元素的取值,所述点云数据包括所述点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围;Determining a value of a syntax element of the point cloud data, the point cloud data including the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding;
当根据所述语法元素的取值确定所述搜索范围为0时,对所述点云的属性值进行编码得到码流数据,其中,所述码流数据中不包括用于指示至少一个点云点的属性值为0的标识。When it is determined that the search range is 0 according to the value of the syntax element, the attribute value of the point cloud is coded to obtain code stream data, wherein the code stream data does not include at least one point cloud indicating The point's attribute value is 0.
第七方面,本发明实施例提供了一种数据解码设备,其特征在于,包括:存储器和处理器;In a seventh aspect, an embodiment of the present invention provides a data decoding device, which is characterized by including: a memory and a processor;
所述存储器,用于存储程序;The memory is used to store programs;
所述处理器,用于调用所述程序,当所述程序被执行时,用于执行以下操作:The processor is used to call the program, and when the program is executed, it is used to perform the following operations:
从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围;Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
当根据所述语法元素的取值确定所述搜索范围不为0时,对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,其中,所述码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0;When it is determined that the search range is not 0 according to the value of the syntax element, the code stream data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is performed Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码 得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。When it is determined that the search range is 0 according to the value of the syntax element, the step of "compensating for the residual error of the attribute value of the point cloud in the code stream data" is skipped, and the code stream is The data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
第八方面,本发明实施例提供了另一种数据解码设备,其特征在于,包括:存储器和处理器;In an eighth aspect, an embodiment of the present invention provides another data decoding device, which is characterized by comprising: a memory and a processor;
所述存储器,用于存储程序;The memory is used to store programs;
所述处理器,用于调用所述程序,当所述程序被执行时,用于执行以下操作:The processor is used to call the program, and when the program is executed, it is used to perform the following operations:
从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围;Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
当根据所述语法元素的取值确定所述搜索范围为0时,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括标识信息。When it is determined that the search range is 0 according to the value of the syntax element, the code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include identification information.
第九方面,本发明实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现如上述第一方面或第二方面所述的数据编码方法,或上述第三方面或第四方面所述的数据解码方法。In a ninth aspect, an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned first or second aspect is implemented. Data encoding method, or the data decoding method described in the third or fourth aspect above.
本发明实施例,通过在语法元素的取值确定的搜索范围为0时,跳过“对点云的属性值进行预测处理”的步骤,对点云的属性值进行编码,可以大幅度地简化对属性编码的算法复杂度,减少了时间开销,提高了属性编码的效率。In the embodiment of the present invention, when the search range determined by the value of the syntax element is 0, the step of "predicting the attribute value of the point cloud" is skipped to encode the attribute value of the point cloud, which can greatly simplify The algorithm complexity of attribute coding reduces time overhead and improves the efficiency of attribute coding.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, without creative work, other drawings can be obtained from these drawings.
图1是本发明实施例提供的一种平面二维坐标中莫顿码递增的顺序示意图;FIG. 1 is a schematic diagram of an increasing sequence of Morton codes in a planar two-dimensional coordinate provided by an embodiment of the present invention;
图2是本发明实施例提供的一种二维坐标系中位置坐标与莫顿码对应的示意图;FIG. 2 is a schematic diagram of the position coordinates corresponding to Morton codes in a two-dimensional coordinate system provided by an embodiment of the present invention;
图3是本发明实施例提供的一种三维坐标系中莫顿码的示意图;3 is a schematic diagram of Morton codes in a three-dimensional coordinate system provided by an embodiment of the present invention;
图4是本发明实施例提供的一种数据编码的流程示意图;4 is a schematic diagram of a data encoding process provided by an embodiment of the present invention;
图5是本发明实施例提供的一种数据解码方法的流程示意图;FIG. 5 is a schematic flowchart of a data decoding method provided by an embodiment of the present invention;
图6是本发明实施例提供的一种现有点云数据的解码流程示意图;6 is a schematic diagram of a decoding process of existing point cloud data provided by an embodiment of the present invention;
图7是本发明实施例提供的一种现有点云数据的编码流程示意图;FIG. 7 is a schematic diagram of an encoding process of existing point cloud data according to an embodiment of the present invention;
图8是本发明实施例提供的一种层次编码方案的生成示意图;FIG. 8 is a schematic diagram of generating a hierarchical coding scheme according to an embodiment of the present invention;
图9是本发明实施例提供的一种数据编码方法的流程示意图;FIG. 9 is a schematic flowchart of a data encoding method provided by an embodiment of the present invention;
图10是本发明实施例提供的另一种数据编码方法的流程示意图;10 is a schematic flowchart of another data encoding method provided by an embodiment of the present invention;
图11是本发明实施例提供的一种数据解码方法的流程示意图;FIG. 11 is a schematic flowchart of a data decoding method provided by an embodiment of the present invention;
图12是本发明实施例提供的另一种数据解码方法的流程示意图;12 is a schematic flowchart of another data decoding method provided by an embodiment of the present invention;
图13是本发明实施例提供的一种数据编码设备的结构示意图;Figure 13 is a schematic structural diagram of a data encoding device provided by an embodiment of the present invention;
图14是本发明实施例提供的另一种数据编码设备的结构示意图;Figure 14 is a schematic structural diagram of another data encoding device provided by an embodiment of the present invention;
图15是本发明实施例提供的一种数据解码设备的结构示意图;15 is a schematic structural diagram of a data decoding device provided by an embodiment of the present invention;
图16是本发明实施例提供的另一种数据解码设备的结构示意图。Figure 16 is a schematic structural diagram of another data decoding device provided by an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
本发明是针对动态图像专家组(Moving Picture Experts Group,MEPG)中G-PCC点云编码标准在对属性编码时存在较高复杂度的问题,提出的一种对点云数据的属性值进行编码时的编码方法以及对应的解码方法。在介绍本发明之前,首先对点云数据进行如下相关介绍。The present invention aims at the problem that the G-PCC point cloud coding standard in the Moving Picture Experts Group (Moving Picture Experts Group, MEPG) has high complexity when encoding attributes, and proposes a method for encoding the attribute values of point cloud data When the encoding method and corresponding decoding method. Before introducing the present invention, first, the following related introductions are made to the point cloud data.
在一些实施例中,对待编码的点云数据的属性值,首先进行量化操作。具体可以图4为例进行举例说明,图4是本发明实施例提供的一种数据编码的流程示意图。如图4所示,通过输入点云数据41对输入的点云数据的位置坐标先进行量化42,量化42后的位置坐标可以选择是否去除重复坐标421,之后再进行位置编码43并送入算术编码引擎中进行算术编码44。对于输入的点云数据的属性值,如果选择根据位置坐标选择去除重复坐标421,则进行属性转 换45,将合并的位置坐标对应的属性值进行合并,若未进行去除重复坐标421,则不进行属性转换。接着根据位置编码43后的位置坐标的顺序对应的属性值依次进行属性编码46。In some embodiments, the attribute value of the point cloud data to be encoded is quantized first. Specifically, FIG. 4 is taken as an example for illustration. FIG. 4 is a schematic diagram of a data encoding process provided by an embodiment of the present invention. As shown in Figure 4, the position coordinates of the input point cloud data are first quantized 42 by inputting the
在一个实施例中,基于莫顿码的预测编码方案是所述点云数据的属性编码的一种方法。在一个示例中,在基于莫顿码的预测编码方案中,当语法元素lifting_search_range不等于0时,可以根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,在得到位置坐标对应的莫顿码之后,可以根据莫顿码的大小关系对所述点云中的点云点进行排序,并对排序后的点云的属性值进行预测编码,得到点云中各点云点的属性值的残差。排序后的点云中,排位相靠近的点云点在三维空间中的位置也比较靠近。由于在三维空间中位置相近的点云点的属性值相似的可能性较大,因此对排序后的点云进行预测处理,可以降低点云的属性值的残差所耗费的比特。因此,点云的属性值的残差中会出现多个0。在一个具体实施例中,在对残差进行编码时,对于当前点云点,首先编码标识1,该标识1用于指示点云的属性值的残差中当前是否连续出现多个0,以及连续出现0的次数。例如,当连续出现残差为0的点云的数目大于等于1时,将标识1取值为连续出现0的数目,当未出现0时,将标识1取值为0。In one embodiment, the predictive coding scheme based on Morton code is a method of attribute coding of the point cloud data. In an example, in the predictive coding scheme based on Morton code, when the syntax element lifting_search_range is not equal to 0, the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data, and the corresponding Morton code is obtained after obtaining the position coordinates. After the Morton code, the point cloud points in the point cloud can be sorted according to the magnitude relationship of the Morton code, and the attribute value of the sorted point cloud can be predicted and coded to obtain the attribute of each point cloud point in the point cloud The residual of the value. In the sorted point cloud, the positions of the point cloud points that are ranked close in the three-dimensional space are also relatively close. Since the attribute values of the point cloud points with similar positions in the three-dimensional space are more likely to be similar, performing prediction processing on the sorted point cloud can reduce the bits consumed by the residual of the attribute value of the point cloud. Therefore, multiple zeros will appear in the residual of the attribute value of the point cloud. In a specific embodiment, when encoding the residual, for the current point cloud point, firstly encode an
当标识1用于指示当前未出现为0的残差的点云点时,编码标识2,该标识2用于指示当前点云点的残差减1之后的值是否为0。例如,若残差减1之后的值为0,则将标识2取值为1。若该当前点云点的残差减1之后的值不为0,则编码该残差的具体数值;或者,若该当前点云点的残差减1之后的值不为0,继续编码标识3,该标识3用于指示该当前点云点的残差减2之后的值是否为0,若不为0则继续编码该残差的具体数值。例如,若该当前点云点的残差减2之后的值为0,则将标识3取值为1,若不为0,则将标识3取值为0,并继续编码该残差的具体数值。可选地,还可以在标识3指示当前点云点的残差不为2时,继续编码标识4,用于指示当前点云点的残差减3之后的值是否为0。When the
在某些实施例中,所述对排序后的点云的属性值进行预测编码,得到的点云中各点云点的属性值的残差可以是正数,也可以是负数,当所述点云中各点云点的属性值的残差为有符号的数值时,可以根据预设规则将所述点云点属性值的残差进行符号转换,即从有符号数转换为无符号数。例如,假设点云的属 性值的残差为-1,则可以根据预设规则-1-(2*(-1))将点云的属性值的残差-1转换为1;又例如,假设点云的属性值的残差为1,则根据预设规则2*1将点云的属性值的残差转换为2。当然在其他实施例中,本发明实施例也可以不对所述点云的属性值的残差进行符号转换,在此不做具体限定。In some embodiments, the attribute value of the sorted point cloud is predicted and encoded, and the residual error of the attribute value of each point cloud point in the obtained point cloud may be positive or negative. When the point When the residual error of the attribute value of each point cloud point in the cloud is a signed value, the residual error of the attribute value of the point cloud point can be sign converted according to a preset rule, that is, converted from a signed number to an unsigned number. For example, assuming that the residual of the attribute value of the point cloud is -1, the residual -1 of the attribute value of the point cloud can be converted to 1 according to the preset rule -1-(2*(-1)); for another example, Assuming that the residual error of the attribute value of the point cloud is 1, the residual error of the attribute value of the point cloud is converted to 2 according to the
在某些实施例中,所述对排序后的点云的属性值进行预测编码时,可以根据语法元素lifting_search_range的值在排序后的点云中确定对应的搜索范围,在位于该搜索范围内点云点中确定处当前点云点的参考点云点。根据所述参考点云点的属性值和当前点云点的属性值,确定当前点云点的残差。In some embodiments, when performing predictive encoding on the attribute values of the sorted point clouds, the corresponding search range may be determined in the sorted point cloud according to the value of the syntax element lifting_search_range, and the point is located in the search range. The reference point cloud point of the current point cloud point is determined in the cloud point. According to the attribute value of the reference point cloud point and the attribute value of the current point cloud point, the residual error of the current point cloud point is determined.
具体可以结合图1、图2、图3进行举例说明,其中,图1是本发明实施例提供的一种平面二维坐标中莫顿码递增的顺序示意图,图2是本发明实施例提供的一种二维坐标系中位置坐标与莫顿码对应的示意图,图3是本发明实施例提供的一种三维坐标系中莫顿码的示意图。在基于莫顿码的预测编码方案中,首先会根据位置坐标计算每个位置坐标对应的莫顿码,并对每个位置坐标对应的莫顿码进行排序。在某些实施例中,所述位置坐标与莫顿码的对应关系如图2所示;在某些实施例中,所述莫顿码的排序中递增顺序的二维平面示意图如图1所示,所述莫顿码的排序中递增顺序的三维平面示意图如图3所示。Specific examples can be illustrated in conjunction with Figure 1, Figure 2, and Figure 3. Among them, Figure 1 is a schematic diagram of an incremental sequence of Morton codes in a planar two-dimensional coordinate provided by an embodiment of the present invention, and Figure 2 is an embodiment of the present invention. A schematic diagram of position coordinates in a two-dimensional coordinate system corresponding to Morton codes. FIG. 3 is a schematic diagram of a Morton code in a three-dimensional coordinate system provided by an embodiment of the present invention. In a predictive coding scheme based on Morton codes, the Morton codes corresponding to each position coordinate are first calculated according to the position coordinates, and the Morton codes corresponding to each position coordinate are sorted. In some embodiments, the corresponding relationship between the position coordinates and Morton codes is shown in FIG. 2; in some embodiments, the two-dimensional schematic diagram of the increasing order in the Morton code sorting is shown in FIG. As shown, the three-dimensional schematic diagram of the increasing sequence in the Morton code sorting is shown in FIG. 3.
在一个实施例中,当点云数据的语法元素lifting_search_range等于0时,可以获取点云数据的位置坐标,并根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,在得到位置坐标对应的莫顿码之后,可以根据莫顿码对所述点云数据中的点云点进行排序,并直接对排序后的点云的属性值进行编码。对点云的属性值的编码方式可以和上述实施例中对点云的属性值的残差的编码方式相同。例如,对当前点云点,首先编码标识1,该标识1用于指示从当前点云点开始是否出现为0的属性值,以及连续出现为0的属性值的点云数目。例如,当连续出现属性值为0的点云的数目大于等于1时,将标识1取值为连续出现0的数目,当未出现0时,将标识1取值为0。In one embodiment, when the syntax element lifting_search_range of the point cloud data is equal to 0, the position coordinates of the point cloud data can be obtained, and the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data, and the position coordinates are obtained. After the corresponding Morton code, the point cloud points in the point cloud data can be sorted according to the Morton code, and the attribute values of the sorted point cloud can be directly coded. The coding method of the attribute value of the point cloud may be the same as the coding method of the residual of the attribute value of the point cloud in the foregoing embodiment. For example, for the current point cloud point, firstly encode the
当标识1用于指示当前未出现为0的属性值的点云点时,编码标识2,该标识2用于指示当前点云点的属性值减1之后的值是否为0。例如,若属性值减1之后的值为0,则将标识2取值为1。若该当前点云点的属性值减1之后的值不为0,则编码该属性值的具体数值;或者,若该当前点云点的属性值减1之后的值不为0,继续编码标识3,该标识3用于指示该当前点云点的属性 值减2之后的值是否为0,若不为0则继续编码该属性值的具体数值。例如,若该当前点云点的属性值减2之后的值为0,则将标识3取值为1,若不为0,则将标识3取值为0,并继续编码该属性值的具体数值。可选地,还可以在标识3指示当前点云点的属性值不为2时,继续编码标识4,用于指示当前点云点的属性值减3之后的值是否为0。When
由于在语法元素lifting_search_range等于0时不是对各点云点的属性值的残差进行编码,而是对各点云点的属性值本身进行编码,点云点的属性值本身取值为0的概率较低,编码对点云的属性值时采用上述的标识1、标识2和标识3会造成码流的冗余,浪费码流中的比特位。因此,在一个示例中,当语法元素lifting_search_range等于0时,可以根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,在得到位置坐标对应的莫顿码之后,可以根据莫顿码的大小关系对所述点云中的点云点进行排序,直接对排序后的点云的属性值进行编码,且在编码结果中省去上述标识1、标识2、标识3等等。因为空间位置相近的属性值较为接近,在编码时连续编码相同的值会更有利于提高压缩率,因此通过删除冗余标识信息,保留对所述点云中的点云点的排序,对编码性能有一定提升。Since when the grammar element lifting_search_range is equal to 0, the residual error of the attribute value of each point cloud point is not encoded, but the attribute value of each point cloud point itself is encoded, and the attribute value of the point cloud point itself takes the probability of 0 If the attribute value of the point cloud is encoded, using the above-mentioned
在某些实施例中,在语法元素lifting_search_range等于0时,由于不是对各点云点的属性值的残差进行编码,而是对各点云点的属性值本身进行编码,没有对点云的属性值进行预测处理的操作,因此点云的属性值不会出现负值,可以跳过“对点云的属性值进行符号转换”的步骤,简化lifting_search_range等于0的编码操作。In some embodiments, when the syntax element lifting_search_range is equal to 0, since the residual error of the attribute value of each point cloud point is not encoded, but the attribute value itself of each point cloud point is encoded, there is no point cloud The attribute value is predicted. Therefore, the attribute value of the point cloud will not have a negative value. You can skip the step of "signature conversion of the attribute value of the point cloud" to simplify the coding operation of lifting_search_range equal to 0.
在一个实施例中,当语法元素lifting_search_range等于0时,可以跳过所述“根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,根据莫顿码的大小关系对所述点云数据中的点云点进行排序,根据排序后的点云点的属性值确定标识信息”的步骤,直接获取点云数据的属性值,对点云数据的属性值进行编码。In one embodiment, when the syntax element lifting_search_range is equal to 0, the "Calculate the Morton code corresponding to each position coordinate according to the position coordinates of the point cloud data" can be skipped, and the point cloud is calculated according to the magnitude relationship of the Morton code. The point cloud points in the data are sorted, and the identification information is determined according to the attribute values of the sorted point cloud points. The attribute value of the point cloud data is directly obtained, and the attribute value of the point cloud data is encoded.
当语法元素lifting_search_range等于0时,也可以保留“根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,根据莫顿码的大小关系对所述点云数据中的点云点进行排序,根据排序后的点云点的属性值确定标识信息”的步骤。由于对点云中的点云点的排序需要消耗一些时间,会增加方案实现的复杂 度,因此通过删除冗余标识信息以及对点云点的排序,可以减少排序消耗的时间,进一步降低算法复杂度。When the grammatical element lifting_search_range is equal to 0, it is also possible to keep "Calculate the Morton code corresponding to each position coordinate according to the position coordinates of the point cloud data, and sort the point cloud points in the point cloud data according to the magnitude relationship of the Morton code. , According to the sorted point cloud point attribute value to determine the identification information" step. Since it takes some time to sort the point cloud points in the point cloud, it will increase the complexity of the solution. Therefore, by deleting redundant identification information and sorting the point cloud points, you can reduce the time consumed for sorting and further reduce the complexity of the algorithm degree.
可见,通过这种通过在语法元素为0时直接对点云的属性值进行编码的实施方式,可以避免编码了冗余的点云的属性值的残差连续为0的数目,以及点云的属性值的残差减1之后的值是否为零的标识信息,以及点云的属性值的残差减1之后的值是否为1的标识信息,由于不编码这些标识信息,所以点云的属性值残差也不需要进行减2操作,大幅简化了对属性编码的算法复杂度。It can be seen that through this implementation of directly encoding the attribute value of the point cloud when the syntax element is 0, the number of consecutively 0 residuals of the attribute value of the redundant point cloud can be avoided, and the number of points cloud The identification information of whether the value of the residual of the attribute value minus 1 is zero, and the identification information of whether the value of the residual of the attribute value of the point cloud minus 1 is 1. Since these identification information are not encoded, the attribute of the point cloud The value residual does not need to be subtracted by 2, which greatly simplifies the algorithm complexity of encoding attributes.
在一个实施例中,本发明提供了与上述编码方法对应的一种数据解码方法,具体可以图5为例对本发明实施例提出的数据解码方法进行举例说明,图5是本发明实施例提供的一种数据解码方法的流程示意图。如图5所示,对输入的待解码的码流51先进行算术解码52,解码位置信息相关码流,通过位置解码53,逆量化54,得到重建的位置坐标。相应地,按照位置解码83后的位置坐标的顺序,通过属性解码55解码出点云的属性值。In one embodiment, the present invention provides a data decoding method corresponding to the foregoing encoding method. Specifically, FIG. 5 is an example to illustrate the data decoding method proposed in the embodiment of the present invention. FIG. 5 is provided by the embodiment of the present invention. A schematic flow chart of a data decoding method. As shown in FIG. 5, the
在一个实施例中,基于莫顿码的预测解码方案是所述点云数据的属性解码的一种方法。在一个示例中,从码流数据中解码点云数据的语法元素lifting_search_range的取值。当解码出所述语法元素lifting_search_range的取值不等于0时,可以先根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,在得到位置坐标对应的莫顿码之后,根据莫顿码的大小关系对所述点云中的点云点进行排序。对码流数据进行解码得到点云中各点云点的属性值的残差则对应于排序后的点云点。In one embodiment, the predictive decoding scheme based on Morton code is a method of decoding the attributes of the point cloud data. In an example, the value of the syntax element lifting_search_range of the point cloud data is decoded from the code stream data. When the value of the syntax element lifting_search_range is not equal to 0 after decoding, the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data. After obtaining the Morton code corresponding to the position coordinate, according to Morton The size relationship of the code sorts the point cloud points in the point cloud. After decoding the code stream data, the residual error of the attribute value of each point cloud point in the point cloud is corresponding to the sorted point cloud point.
在解码当前点云点的属性值的残差时,首先根据标识1的取值确定当前点云点的属性值的残差是否为0以及连续出现残差为0的点云点的数量。例如,当解码出标识1的取值非0时,根据标识1的具体取值确定,在排序后的点云中从当前点云点开始连续出现残差为0的点云点的数量。When decoding the residual of the attribute value of the current point cloud point, first determine whether the residual error of the attribute value of the current point cloud point is 0 and the number of point cloud points with a residual error of 0 continuously appear according to the value of the
当解码出标识1的取值为0时,确定当前点云点的属性值残差非0,并继续解码出该残差的具体数值;或者,当确定当前点云点的属性值残差非0时,从码流中继续解码出标识2的取值,根据该标识2的取值确定当前点云点的属性值的残差是否为1。例如,当解码出标识2的取值为1时,确定当前点云点的属性值的残差为1。当解码出标识2的取值为0时,确定当前点云点的属性值的残差不为1,则继续解码该当前点云点的属性的残差的具体数值,或者从 码流中继续解码出标识3,根据该标识3的取值确定当前点云点的属性的残差是否为2。当解码出标识3的取值为1时,确定当前点云点的属性值的残差为2。当解码出标识3的取值为0时,确定当前点云点的属性值的残差不为2,则继续解码该当前点云点的属性的残差的具体数值。When the value of the
解码出排序后的点云中各点云点的属性值的残差后,对该残差进行补偿处理,确定所述排序后的点云中各点云点的属性值。After decoding the residual of the attribute value of each point cloud point in the sorted point cloud, compensation processing is performed on the residual to determine the attribute value of each point cloud point in the sorted point cloud.
在一个实施例中,当解码出所述语法元素lifting_search_range的取值等于0时,可以先根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,在得到位置坐标对应的莫顿码之后,根据莫顿码的大小关系对所述点云中的点云点进行排序。对码流数据进行解码得到点云中各点云点的属性值则对应于排序后的点云点。因此直接对码流数据进行解码确定排序后的点云中各点云点的属性值,在解码过程中省去了对点云点的属性值的残差进行解码,降低了解码过程的算法复杂度。In one embodiment, when the value of lifting_search_range of the syntax element is decoded to be equal to 0, the Morton code corresponding to each position coordinate can be calculated according to the position coordinates of the point cloud data, and the Morton code corresponding to the position coordinate is obtained. After that, the point cloud points in the point cloud are sorted according to the magnitude relationship of the Morton code. Decoding the code stream data to obtain the attribute value of each point cloud point in the point cloud corresponds to the sorted point cloud point. Therefore, the code stream data is directly decoded to determine the attribute value of each point cloud point in the sorted point cloud. In the decoding process, the residual error of the attribute value of the point cloud point is omitted, and the algorithm complexity of the decoding process is reduced. degree.
在解码当前点云点的属性值时,码流中包含标识1,首先根据标识1的取值确定当前点云点的属性值是否为0以及连续出现属性值为0的点云点的数量。例如,当解码出标识1的取值非0时,根据标识1的具体取值确定,在排序后的点云中从当前点云点开始连续出现属性值为0的点云点的数量。When decoding the attribute value of the current point cloud point, the code stream contains the
当解码出标识1的取值为0时,确定当前点云点的属性值非0,并继续解码出该属性值的具体数值;或者,当确定当前点云点的属性值非0时,从码流中继续解码出标识2的取值,根据该标识2的取值确定当前点云点的属性值是否为1。例如,当解码出标识2的取值为1时,确定当前点云点的属性值为1。当解码出标识2的取值为0时,确定当前点云点的属性值不为1,则继续解码该当前点云点的属性的具体数值,或者从码流中继续解码出标识3,根据该标识3的取值确定当前点云点的属性是否为2。当解码出标识3的取值为1时,确定当前点云点的属性值为2。当解码出标识3的取值为0时,确定当前点云点的属性值不为2,则继续解码该当前点云点的属性的具体数值。When the value of the
在一个实施例中,当码流中所述语法元素lifting_search_range的取值等于0时,码流中不存在上述提到的标识1、标识2和标识3,解码端在根据各点云点的位置坐标对应的莫顿码对点云排序后,直接根据码流解码出排序后的点云中当前点云点的属性值本身。In one embodiment, when the value of the lifting_search_range syntax element in the code stream is equal to 0, the
在一个实施例中,当解码出所述语法元素lifting_search_range的取值等于0时,还可以跳过“根据点云数据的位置坐标计算每个位置坐标对应的莫顿码,在得到位置坐标对应的莫顿码之后,根据莫顿码的大小关系对所述点云中的点云点进行排序”的步骤,直接对码流数据进行解码得到点云中各点云点的属性值。通过这种解码出语法元素lifting_search_range的取值等于0时,直接对码流数据解码得到点云的属性值,可以避免对冗余的点云的属性值进行解码,降低解码过程中的算法复杂度,提高了解码的效率。In an embodiment, when the value of the lifting_search_range element is decoded to be equal to 0, it is also possible to skip "Calculating the Morton code corresponding to each position coordinate according to the position coordinates of the point cloud data. After the Morton code, the point cloud points in the point cloud are sorted according to the magnitude relationship of the Morton code, and the code stream data is directly decoded to obtain the attribute value of each point cloud point in the point cloud. When the value of the syntax element lifting_search_range is equal to 0 through this decoding, the bitstream data is directly decoded to obtain the attribute value of the point cloud, which can avoid decoding the attribute value of the redundant point cloud and reduce the algorithm complexity in the decoding process , Improve the efficiency of decoding.
在一个实施例中,本发明提出的数据解码方法与现有解码方法相比,算法复杂度更低,具体可以图6为例对现有的点云数据压缩的解码流程进行举例说明,图6是本发明实施例提供的一种现有点云数据的解码流程示意图。如图6所示,获取待解码的码流数据61对其进行算术解码62,通过八叉树编码63对算术解码后的数据进行逆量化64,得到点云数据的位置坐标,并生成层次编码方案65。通过对算术解码62后的数据进行逆量化66,并基于所述层次编码方案对逆量化66得到的二进制码流数据进行逆预测67,得到点云数据的属性值,最后根据点云数据的属性值和位置坐标,得到解码的点云数据68。In one embodiment, the data decoding method proposed by the present invention has lower algorithm complexity than the existing decoding method. Specifically, Figure 6 is an example to illustrate the existing point cloud data compression decoding process. Figure 6 It is a schematic diagram of a decoding process of existing point cloud data provided by an embodiment of the present invention. As shown in Fig. 6, the
所述基于莫顿码的预测编码方案对点云数据进行属性编码的方案与LOD分层方案相比,少了生成LOD分层方案的过程,计算复杂度都有较大幅度的降低,对编码和解码过程都减少了部分时间开销以及计算资源的开销。下面对LOD分层方案进行示意性介绍。Compared with the LOD layered scheme, the predictive coding scheme based on Morton code for the attribute coding of point cloud data has less process of generating the LOD layered scheme, and the computational complexity is greatly reduced. And the decoding process reduces part of the time overhead and computing resource overhead. The following is a schematic introduction to the LOD layering scheme.
所述LOD分层方案是根据点云编码后重排序的位置坐标生成的层次编码方案。在一个实施例中,所述点云的编码流程可以图7为例进行示意性说明,图7是本发明实施例提供的一种现有点云数据的编码流程示意图。如图7所示,通过输入点云数据71,对输入的点云数据的位置坐标进行量化72,并对位置坐标进行去除重复坐标721处理,对去除重复坐标721后的位置坐标进行八叉树编码73,在某些实施例中,所述八叉树编码73是位置编码中的一种。通过对输入的点云数据的属性值进行属性转换74,并对八叉树编码73后重排序的位置坐标的顺序对应的属性值进行属性转换74,以及根据八叉树编码73后重排序的位置坐标生成层次编码方案75。基于层次编码方案75对属性转换74得到的属性值进行预测编码76,并对预测编码76得到的属性值的残差进行量化77即二值化。将量化77和八叉树编码77得到的二进制码流进行算术编码 78,从而得到对点云数据编码后的码流数据79。The LOD hierarchical scheme is a hierarchical coding scheme generated according to the reordered position coordinates after point cloud coding. In an embodiment, the point cloud encoding process can be schematically illustrated in FIG. 7 as an example. FIG. 7 is a schematic diagram of an existing point cloud data encoding process provided by an embodiment of the present invention. As shown in FIG. 7, by inputting
在一个实施例,所述根据八叉树编码73后重排序的位置坐标生成层次编码方案75的示意图如图8所示,图8是本发明实施例提供的一种层次编码方案的生成示意图。如图8所示,在实际编码过程中,首先会根据LOD配置的参数来进行LOD分层,这个就是图8中所描述的LOD分层,如图8所示展示了LOD分层这个过程,还有就是后面的层会包含有前面层的点,也就是图中不同的颜色所代表的意思。其中,P0、P2、P4、P5为相同颜色,P1、P3、P6为相同颜色,P7、P8、P9为相同颜色。在实际实现过程中,先选择点云数据中的第一个点,将其放在LOD0层的第一个点,接着开始依次遍历点云点,计算当前点云点和当前层里面已经含有的所有点之间在笛卡尔坐标系下的距离,如果最小的距离大于当前LOD层设置的搜索范围,则当前点云点就会被划入到当前LOD层。In an embodiment, the schematic diagram of generating the
在一个实施例中,在层次编码方案这个过程中,通过对计算得到的距离进行排序,选择出距离最小的若干个参考点云点云点,其中,所述参考点云点云点的数目是由搜索范围确定的。在某些实施例中,一个点云点被划入一个LOD层后,后续就不需要再接着判断他是否还属于下一个LOD层,因为下一层是包含上一层的,所以他一定属于下一个LOD层。并且在LOD0层的前面几个点,由于在LOD内的点数比较少所以选择出的参考点云点云点的数目有可能小于搜索范围。在划分结束LOD层之后,需要利用前面选择的最临近的点来分配预测时的权重。在一些实施例中,对每个点云点,在前面已经得到了按照距离排序的最邻近的在搜索范围内的参考点云点,接下来会按照1个参考点云点云点,2个参考点云点云点一直到搜索范围内的最后一个参考点云点云点来分别求出权重分配方案,其中,所述权重分配方案的种类与在搜索范围内的参考点云点云点的数目相匹配。In one embodiment, in the process of the hierarchical coding scheme, by sorting the calculated distances, several reference point cloud point cloud points with the smallest distance are selected, wherein the number of the reference point cloud point cloud points is Determined by the search range. In some embodiments, after a point cloud point is assigned to a LOD layer, there is no need to determine whether it still belongs to the next LOD layer, because the next layer contains the previous layer, so it must belong to The next LOD layer. And in the first few points of the LOD0 layer, because the number of points in the LOD is relatively small, the number of selected reference point cloud point cloud points may be less than the search range. After dividing the LOD layer, it is necessary to use the nearest point previously selected to assign the weight for prediction. In some embodiments, for each point cloud point, the nearest reference point cloud point within the search range sorted by distance has been obtained previously, and then one reference point cloud point and two The reference point cloud point cloud point until the last reference point cloud point cloud point in the search range is used to obtain the weight distribution plan, wherein the type of the weight distribution plan is related to the reference point cloud point cloud point in the search range The numbers match.
在一个实施例中,所述1个参考点云点时是距离最小的1个点云点作为参考点云点,这时他的权重即为1。所述2个参考点云点时就是选择距离最小的2个点云点作为参考点云点,这时会根据这两个参考点云点和待预测点云点之间的距离来分配权重。直到搜索范围内的最后一个参考点云点时,选择n个点云点作为参考点云点,所述n为所述搜索范围内的点云点数目,所述权重分配方法与前面相同。在某些实施例中,距离越远权重越小,并保证权重和为1。In one embodiment, when the one reference point cloud point is the one with the smallest distance as the reference point cloud point, its weight is 1 at this time. In the case of the two reference point cloud points, the two point cloud points with the smallest distance are selected as the reference point cloud points. At this time, weights are assigned according to the distance between the two reference point cloud points and the point cloud point to be predicted. Until the last reference point cloud point in the search range, n point cloud points are selected as reference point cloud points, where n is the number of point cloud points in the search range, and the weight distribution method is the same as the previous one. In some embodiments, the longer the distance, the smaller the weight, and it is guaranteed that the weight sum is 1.
在一个实施例中,在分配完权重后,需要选择参考点云点数,在这里需要注意,对一个预测点可以选择的临近参考点云点的数目是小于或等于搜索范围内点云点的数目的。具体会遍历限定参考点云点最大为1个时,这时预测值(权重乘以对应位置的属性值)与实际属性值的残差经过量化后的值之和,这个和即为参考点云点数目最大为1时的代价。接着会遍历限定参考点云点数目最大为2个时的代价。直至限定参考点云点数目最大为搜索范围中点云点的数目时,最终选择一个代价最小的最大参考点云点数的方案,编码这个方案下量化后的残差值。In one embodiment, after the weights are assigned, the number of reference point cloud points needs to be selected. It should be noted here that the number of adjacent reference point cloud points that can be selected for a predicted point is less than or equal to the number of point cloud points in the search range of. Specifically, when the maximum number of reference point cloud points is limited to one, the sum of the quantified residuals between the predicted value (weight multiplied by the attribute value of the corresponding position) and the actual attribute value, this sum is the reference point cloud The cost when the maximum number of points is 1. Then it will traverse the cost when the maximum number of reference point cloud points is two. Until the maximum number of reference point cloud points is limited to the number of point cloud points in the search range, a scheme with the least cost and maximum reference point cloud points is finally selected, and the quantized residual value under this scheme is encoded.
由于在LOD生成的过程中,判断一个点云点是否属于当前LOD层需要计算该点云点与当前LOD层内已经含有的所有点云点之间的笛卡尔坐标系下的距离,这个计算过程随着LOD层内含有的点云点数的增多而激增,生成LOD的过程复杂度为O(n 2),因此这种复杂度会随着点云数据中点云点数的增多而使系统的编码速度成为系统瓶颈。 Since in the process of LOD generation, judging whether a point cloud point belongs to the current LOD layer, it is necessary to calculate the distance in the Cartesian coordinate system between the point cloud point and all the point cloud points already contained in the current LOD layer. This calculation process With the increase of the number of point cloud points contained in the LOD layer, it increases sharply. The complexity of the process of generating LOD is O(n 2 ), so this complexity will increase the number of point cloud points in the point cloud data and cause the system to encode Speed becomes a system bottleneck.
下面结合附图对本发明实施例提供的数据编码、数据解码方法进行示意性说明。The data encoding and data decoding methods provided by the embodiments of the present invention will be schematically described below in conjunction with the accompanying drawings.
具体请参见图9,图9是本发明实施例提供的一种数据编码方法的流程示意图。所述方法可以应用于数据编码设备,其中,所述数据编码设备可以设置在智能终端(如手机、平板电脑等)上。在某些实施例中,本发明实施例还可应用于飞行器(如无人机)上,在其他实施例中,本发明实施例还可以应用于其他可移动平台(如无人船、无人汽车、机器人等)上,本发明实施例不做具体限定。具体地,本发明实施例的所述方法包括如下步骤。Please refer to FIG. 9 for details. FIG. 9 is a schematic flowchart of a data encoding method according to an embodiment of the present invention. The method can be applied to a data encoding device, wherein the data encoding device can be set on a smart terminal (such as a mobile phone, a tablet computer, etc.). In some embodiments, the embodiments of the present invention can also be applied to aircraft (such as unmanned aerial vehicles). In other embodiments, the embodiments of the present invention can also be applied to other movable platforms (such as unmanned ships, unmanned aerial vehicles). For automobiles, robots, etc., the embodiment of the present invention does not make specific limitations. Specifically, the method of the embodiment of the present invention includes the following steps.
S901:确定点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围。S901: Determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding.
本发明实施例中,数据编码设备可以确定点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围。例如,该语法元素可以是上文中提到的语法元素lifting_search_range。In the embodiment of the present invention, the data encoding device can determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate that the attribute value of the point cloud is performing prediction Search range during encoding. For example, the syntax element may be the lifting_search_range syntax element mentioned above.
在一些实施例中,所述点云数据可以通过一个或多个采集设备获取得到;在某些实施例中,所述采集设备可以包括但不限于拍摄装置、激光雷达、激光 扫描仪等设备。In some embodiments, the point cloud data may be obtained through one or more collection devices; in some embodiments, the collection devices may include, but are not limited to, imaging devices, laser radars, laser scanners and other equipment.
在某些实施例中,所述激光雷达是一种感知传感器,可以获得场景的三维信息。其基本原理为主动对被探测对象发射激光脉冲信号,并获得其反射回来的脉冲信号,根据发射信号和接收信号之间的时间差计算被测对象的距离探测器的深度信息;基于激光雷达的已知发射方向,获得被测对象相对激光雷达的角度信息;结合前述深度信息和角度信息得到海量的探测点(称为点云数据)。In some embodiments, the lidar is a perceptual sensor that can obtain three-dimensional information of the scene. The basic principle is to actively emit laser pulse signals to the detected object and obtain the reflected pulse signals. According to the time difference between the transmitted signal and the received signal, the depth information of the distance detector of the object to be measured is calculated; Know the launch direction, obtain the angle information of the measured object relative to the lidar; combine the aforementioned depth information and angle information to obtain a large number of detection points (called point cloud data).
S902:当根据所述语法元素的取值确定所述搜索范围不为0时,对所述点云的属性值进行预测处理,得到所述点云的属性值的残差,对所述点云的属性值的残差进行编码得到第一码流数据,其中,所述第一码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0。S902: When it is determined that the search range is not 0 according to the value of the syntax element, perform prediction processing on the attribute value of the point cloud to obtain the residual error of the attribute value of the point cloud, The first code stream data is obtained by encoding the residual of the attribute value of the attribute value, wherein the first code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0.
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围不为0时,数据编码设备可以对所述点云的属性值进行预测处理,得到所述点云的属性值的残差,对所述点云的属性值的残差进行编码得到第一码流数据,其中,所述第一码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0。例如,该标识信息可以包括上文提到的标识1、标识2、标识3中的至少一个。In the embodiment of the present invention, when it is determined that the search range is not 0 according to the value of the syntax element, the data encoding device may perform prediction processing on the attribute value of the point cloud to obtain the value of the attribute value of the point cloud Residual, the first bitstream data is obtained by encoding the residual of the attribute value of the point cloud, wherein the first bitstream data includes identification information, and the identification information is used to indicate the value of at least one point cloud point The residual of the attribute value is 0. For example, the identification information may include at least one of the
在一个实施例中,所述点云数据还包括所述点云的位置坐标,当根据所述语法元素的取值确定所述搜索范围不为0时,所述数据编码设备对所述点云的属性值进行预测处理之前,可以计算所述点云中的点云点的位置坐标对应的莫顿码,并根据所述点云中的点云点的莫顿码,对所述点云中的点云点进行排序。在某些实施例中,所述数据编码设备对所述点云的属性值进行预测处理时,可以根据所述点云中的点云点的排序和所述搜索范围,对所述点云的属性值进行预测处理。In an embodiment, the point cloud data further includes the position coordinates of the point cloud. When it is determined that the search range is not 0 according to the value of the syntax element, the data encoding device performs Before performing the prediction processing on the attribute value of the point cloud, the Morton code corresponding to the position coordinates of the point cloud point in the point cloud can be calculated, and according to the Morton code of the point cloud point in the point cloud, the point cloud The point cloud points are sorted. In some embodiments, when the data encoding device performs predictive processing on the attribute value of the point cloud, the point cloud may be classified according to the order of the point cloud points in the point cloud and the search range. The attribute value is predicted.
在一个实施例中,所述数据编码设备根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值进行预测处理时,可以确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围,并根据所述参考点云点的属性值和所述当前点云点的属性值,计算所述点云点的属性值的残差。In one embodiment, when the data encoding device predicts the attribute value of the point cloud according to the order of the point cloud points in the point cloud and the search range, it can determine the reference point of the current point cloud point Cloud point, the sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range, and according to the attribute value of the reference point cloud point and the current point cloud For the attribute value of the point cloud point, the residual of the attribute value of the point cloud point is calculated.
在一些实施例中,所述数据编码设备在根据所述参考点云点的属性值和所述当前点云点的属性值,计算所述点云点的属性值的残差时,可以确定所述参 考点云点的属性值和所述当前点云点的属性值之差为所述点云点的属性值的残差。In some embodiments, the data encoding device may determine the residual of the attribute value of the point cloud point according to the attribute value of the reference point cloud point and the attribute value of the current point cloud point. The difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point is the residual error of the attribute value of the point cloud point.
例如,假设语法元素的值对应的搜索范围为3,所述数据编码设备根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值进行预测处理时,可以确定与当前点云点相邻的在当前点云点之前的3个参考点云点,其中,这3个参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围3。在确定出当前点云点的3个参考点云点之后,所述数据编码设备可以根据所述参考点云点的属性值和所述当前点云点的属性值之差,计算所述点云点的属性值的残差。For example, assuming that the search range corresponding to the value of the syntax element is 3, when the data encoding device predicts the attribute value of the point cloud according to the order of the point cloud points in the point cloud and the search range, Determine the three reference point cloud points that are adjacent to the current point cloud point and before the current point cloud point, where the three reference point cloud points and the current point cloud points are sorted in the sorted point cloud The distance is not greater than the
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据编码设备对所述点云的属性值进行编码得到第二码流数据之前,可以计算所述点云中的点云点的位置坐标对应的莫顿码,并根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序。在某些实施例中,所述数据编码设备对所述点云的属性值进行编码得到第二码流数据时,可以对所述排序后的点云的属性值进行编码得到第二码流数据。In one embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may calculate all data before encoding the attribute value of the point cloud to obtain the second code stream data. The Morton code corresponding to the position coordinates of the point cloud points in the point cloud is described, and the point cloud points in the point cloud are sorted according to the Morton code of the point cloud points in the point cloud. In some embodiments, when the data encoding device encodes the attribute value of the point cloud to obtain the second code stream data, it may encode the attribute value of the sorted point cloud to obtain the second code stream data .
在一些实施例中,所述数据编码设备在根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序时,可以对所述点云中的点云点的莫顿码进行排序,并根据所述莫顿码的排序对与所述莫顿码对应的点云点进行排序。In some embodiments, when the data encoding device sorts the point cloud points in the point cloud according to the Morton code of the point cloud points, the point cloud in the point cloud The Morton codes of the points are sorted, and the point cloud points corresponding to the Morton codes are sorted according to the Morton code sorting.
例如,假设点云中的点云点包括D1、D2、D3、D4、D5、D6,D1对应的莫顿码为M1,D2对应的莫顿码为M2,D3对应的莫顿码为M3,D4对应的莫顿码为M4,D5对应的莫顿码为M5,D6对应的莫顿码为M6。如果莫顿码的排序为M2、M4、M5、M1、M6、M3,则可以根据所述莫顿码的排序对与所述莫顿码对应的点云点进行排序,并确定所述点云点的排序为:D2、D4、D5、D1、D6、D3。For example, assuming that the point cloud points in the point cloud include D1, D2, D3, D4, D5, D6, the Morton code corresponding to D1 is M1, the Morton code corresponding to D2 is M2, and the Morton code corresponding to D3 is M3. The Morton code corresponding to D4 is M4, the Morton code corresponding to D5 is M5, and the Morton code corresponding to D6 is M6. If the order of Morton code is M2, M4, M5, M1, M6, M3, the point cloud points corresponding to the Morton code can be ordered according to the order of Morton code, and the point cloud can be determined The order of the points is: D2, D4, D5, D1, D6, D3.
在一个实施例中,所述标识信息包括第一标识,所述第一标识用于指示出现属性值的残差连续为0的点云点的数量。例如,假设第一标识为5,则可以确定所述属性值的残差连续为0的点云点的数量有5个。例如,该第一标识可以是上文中提到的标识1。In an embodiment, the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual error of the attribute value is continuously 0. For example, assuming that the first identifier is 5, it can be determined that there are 5 point cloud points whose residual error of the attribute value is continuously 0. For example, the first identification may be the
在一个实施例中,所述标识信息包括第二标识,所述第二标识用于指示当前点云点的属性值的残差是否为n,n为正整数。在某些实施例中,所述n为 1或2。在某些实施例中,所述第二标识具体用于指示当前点云点的属性值的残差与n的差值是否为0。例如,假设第二标识为1,则用于指示当前点云点的属性值的残差与1的差值是否为0。又例如,假设第二标识为2,则用于指示当前点云点的属性值的残差与2的差值是否为0。例如,该第二标识包括上文中提到的标识2和/或标识3。In an embodiment, the identification information includes a second identification, and the second identification is used to indicate whether the residual of the attribute value of the current point cloud point is n, and n is a positive integer. In some embodiments, the n is 1 or 2. In some embodiments, the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero. For example, assuming that the second identifier is 1, it is used to indicate whether the difference between the residual of the attribute value of the current point cloud point and 1 is zero. For another example, assuming that the second identifier is 2, it is used to indicate whether the difference between the residual of the attribute value of the current point cloud point and 2 is zero. For example, the second identification includes the
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围不为0时,所述数据编码设备在对所述点云的属性值的残差进行编码得到第一码流数据之前,还可以对所述点云的属性值的残差进行符号转换。在某些实施例中,所述数据解码设备在对所述点云的属性值的残差进行符号转换之后,可以对所述点云进行符合转换后的属性值的残差进行编码得到第一码流数据。例如,假设点云的属性值的残差包括-1,则可以根据预设规则-1-(2*(-1))将点云的属性值的残差-1转换为1,并对包括转换后的属性值的残差1的点云的属性值的残差进行编码得到第一码流数据。In an embodiment, when it is determined that the search range is not 0 according to the value of the syntax element, the data encoding device encodes the residual error of the attribute value of the point cloud to obtain the first bitstream data Previously, sign conversion can also be performed on the residual of the attribute value of the point cloud. In some embodiments, after the data decoding device performs sign conversion on the residual of the attribute value of the point cloud, it may encode the residual of the point cloud in accordance with the converted attribute value to obtain the first Stream data. For example, assuming that the residual of the attribute value of the point cloud includes -1, the residual -1 of the attribute value of the point cloud can be converted to 1 according to the preset rule -1-(2*(-1)), and the After the conversion, the residual of the attribute value of the point cloud of the residual 1 of the attribute value is encoded to obtain the first code stream data.
S903:当根据所述语法元素的取值确定所述搜索范围为0时,跳过所述“对所述点云的属性值进行预测处理”的步骤,对所述点云的属性值进行编码得到第二码流数据,其中,所述第二码流数据中不包括第一标识。S903: When it is determined that the search range is 0 according to the value of the syntax element, skip the step of "predicting the attribute value of the point cloud", and encode the attribute value of the point cloud Obtain the second code stream data, where the second code stream data does not include the first identifier.
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据编码设备可以跳过所述“对所述点云的属性值进行预测处理”的步骤,对所述点云的属性值进行编码得到第二码流数据。In the embodiment of the present invention, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may skip the step of "predicting the attribute value of the point cloud" and perform the The second code stream data is obtained by encoding the attribute value of the point cloud.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据编码设备对所述点云的属性值进行编码得到第二码流数据时,可以对所述点云的属性值进行二值化编码得到第二码流数据。In one embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device encodes the attribute value of the point cloud to obtain the second code stream data, and may perform the The attribute value of the cloud is binarized and encoded to obtain the second code stream data.
可见,当根据语法元素的取值确定搜索范围为0时,通过跳过“对所述点云的属性值进行预测处理”的步骤,直接对点云的属性值进行二值化编码,可以大幅度地简化对属性编码的算法复杂度,提高属性编码的效率。It can be seen that when the search range is determined to be 0 according to the value of the syntax element, by skipping the step of "predicting the attribute value of the point cloud", directly binarizing the attribute value of the point cloud can be greatly improved. Simplify the algorithm complexity of attribute coding greatly, and improve the efficiency of attribute coding.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据编码设备还可以跳过所述“根据所述点云的位置确定所述点云中的点云点的莫顿码,根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may also skip the "determining the point cloud in the point cloud according to the position of the point cloud The Morton code of the point, the step of sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时, 所述数据编码设备还可以跳过“对所述点云的属性值进行符号转换”的步骤,直接对点云的属性值进行编码得到第二码流数据。例如,假设点云的属性值包括-1,则数据编码设备可以跳过对所述点云的属性值-1进行符号转换的步骤,直接对该点云的属性值-1进行编码得到第二码流数据。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may also skip the step of "signature conversion on the attribute value of the point cloud" and directly The second code stream data is obtained by encoding the attribute value of the point cloud. For example, assuming that the attribute value of the point cloud includes -1, the data encoding device can skip the step of performing symbol conversion on the attribute value -1 of the point cloud, and directly encode the attribute value -1 of the point cloud to obtain the second Stream data.
本发明实施例中,当语法元素的取值确定的搜索范围不为0时,通过对点云的属性值进行预测处理,得到点云的属性值的残差,以对点云的属性值的残差进行编码;当语法元素的取值确定的搜索范围为0时,跳过“对点云的属性值进行预测处理”的步骤,对点云的属性值进行编码。通过这种实施方式,可以大幅度地简化对属性编码的算法复杂度,减少了时间开销,提高了属性编码的效率。In the embodiment of the present invention, when the search range determined by the value of the syntax element is not 0, the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud. The residual is encoded; when the search range determined by the value of the syntax element is 0, the step of "predicting the attribute value of the point cloud" is skipped, and the attribute value of the point cloud is encoded. Through this implementation manner, the algorithm complexity of the attribute encoding can be greatly simplified, the time overhead is reduced, and the efficiency of the attribute encoding is improved.
请参见图10,图10是本发明实施例提供的另一种数据编码方法的流程示意图。所述方法可以应用于数据编码设备,其中,所述数据编码设备的解释如前所述。具体地,本发明实施例的所述方法包括如下步骤。Please refer to FIG. 10, which is a schematic flowchart of another data encoding method according to an embodiment of the present invention. The method can be applied to a data encoding device, wherein the explanation of the data encoding device is as described above. Specifically, the method of the embodiment of the present invention includes the following steps.
S1001:确定点云数据的语法元素的取值,所述点云数据包括所述点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围。S1001: Determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding.
本发明实施例中,数据编码设备可以确定点云数据的语法元素的取值,所述点云数据包括所述点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围。In the embodiment of the present invention, the data encoding device can determine the value of the syntax element of the point cloud data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate that the attribute value of the point cloud is The search range for predictive coding.
S1002:当根据所述语法元素的取值确定所述搜索范围为0时,对所述点云的属性值进行编码得到码流数据,其中,所述码流数据中不包括用于指示至少一个点云点的属性值为0的标识。S1002: When it is determined that the search range is 0 according to the value of the syntax element, the attribute value of the point cloud is encoded to obtain code stream data, wherein the code stream data does not include at least one indicating The point cloud point attribute value is 0.
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据编码设备可以对所述点云的属性值进行编码得到码流数据,其中,所述码流数据中不包括用于指示至少一个点云点的属性值为0的标识。In the embodiment of the present invention, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may encode the attribute value of the point cloud to obtain code stream data, wherein the code stream data Does not include an identifier indicating that the attribute value of at least one point cloud point is 0.
在某些实施例中,所述码流数据中不包括用于指示出现属性值连续为0的点云点的数量的标识;在某些实施例中,所述码流数据中不包括用于指示当前点云点的属性值是否为1的标识;在某些实施例中,所述码流数据中不包括用于指示当前点云点的属性值与1的差值是否为0的标识;在某些实施例中, 所述码流数据中不包括用于指示当前点云点的属性值是否为2的标识;在某些实施例中,所述码流数据中不包括用于指示当前点云点的属性值与2的差值是否为0的标识。In some embodiments, the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0; in some embodiments, the code stream data does not include An identifier indicating whether the attribute value of the current point cloud point is 1; in some embodiments, the code stream data does not include an identifier used to indicate whether the difference between the attribute value of the current point cloud point and 1 is 0; In some embodiments, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2; in some embodiments, the code stream data does not include an identifier for indicating the current point cloud point An indicator of whether the difference between the attribute value of the point cloud point and 2 is 0.
在一个实施例中,所述数据编码设备对所述点云的属性值进行编码得到码流数据时,可以对所述点云的属性值进行二值化编码得到码流数据。In one embodiment, when the data encoding device encodes the attribute value of the point cloud to obtain bitstream data, it may perform binary encoding on the attribute value of the point cloud to obtain the bitstream data.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据编码设备可以跳过“对所述点云的属性值进行预测处理”的步骤。在某些实施例中,所述“对所述点云的属性值进行预测处理”的步骤是发生在当根据所述语法元素的取值确定所述搜索范围不为0时。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may skip the step of "predicting the attribute value of the point cloud". In some embodiments, the step of "predicting the attribute value of the point cloud" occurs when it is determined that the search range is not 0 according to the value of the syntax element.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据编码设备还可以跳过在所述“对所述点云的属性值进行预测处理”的步骤之前的“计算所述点云中的点云点的位置坐标对应的莫顿码,根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data encoding device may also skip the step of "predicting the attribute value of the point cloud" "Calculate the Morton code corresponding to the position coordinates of the point cloud points in the point cloud, and sort the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud" before the step A step of.
在一个实施例中,所述“对所述点云的属性值进行预测处理”的步骤,包括:确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围,并根据所述参考点云点的属性值和所述当前点云点的属性值计算所述点云点的属性值的残差。在某些实施例中,所述点云点的属性值的残差可以是所述参考点云点的属性值与所述当前点云点的属性值之差。In one embodiment, the step of "predicting the attribute value of the point cloud" includes: determining a reference point cloud point of a current point cloud point, and the reference point cloud point is the same as the current point cloud point The sorting distance in the sorted point cloud is not greater than the search range, and the attribute value of the point cloud point is calculated according to the attribute value of the reference point cloud point and the attribute value of the current point cloud point Residual. In some embodiments, the residual of the attribute value of the point cloud point may be the difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point.
在一个实施例中,所述数据编码设备还可以计算所述点云中的点云点的位置坐标对应的莫顿码,并根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序。在某些实施例中,所述数据编码设备对所述点云的属性值进行编码得到码流数据时,可以对所述排序后的点云的属性值进行编码得到码流数据。具体实施例举例如前所述,此处不再赘述。In an embodiment, the data encoding device may also calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud, and perform the calculation on the Morton code of the point cloud point in the point cloud. The point cloud points in the point cloud are sorted. In some embodiments, when the data encoding device encodes the attribute value of the point cloud to obtain code stream data, it may encode the attribute value of the sorted point cloud to obtain code stream data. The specific embodiments are as described above, and will not be repeated here.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据解码设备还可以跳过“对所述点云的属性值进行符号转换”的步骤。In one embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may also skip the step of "signature conversion on the attribute value of the point cloud".
在一个实施例中,在当根据所述语法元素的取值确定所述搜索范围不为0时,存在“对所述点云的属性值的残差进行符号转换”的步骤。In an embodiment, when it is determined that the search range is not 0 according to the value of the syntax element, there is a step of "sign conversion of the residual of the attribute value of the point cloud".
本发明实施例中,通过在语法元素的取值确定的搜索范围为0时,对点云的属性值进行编码,可以大幅度地简化对属性编码的算法复杂度,减少了时间 开销,提高了属性编码的效率。In the embodiment of the present invention, by encoding the attribute value of the point cloud when the search range determined by the value of the syntax element is 0, the algorithm complexity of the attribute encoding can be greatly simplified, the time cost is reduced, and the The efficiency of attribute encoding.
请参见图11,图11是本发明实施例提供的一种数据解码方法的流程示意图,所述方法可以应用于数据解码设备,其中,所述数据解码方法可以应用于数据解码设备,所述数据解码设备也可以设置在智能终端(如手机、平板电脑等)上。具体地,本发明实施例的所述方法包括如下步骤。Please refer to FIG. 11, which is a schematic flowchart of a data decoding method provided by an embodiment of the present invention. The method can be applied to a data decoding device, where the data decoding method can be applied to a data decoding device. The decoding device can also be set on a smart terminal (such as a mobile phone, a tablet computer, etc.). Specifically, the method of the embodiment of the present invention includes the following steps.
S1101:从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围。S1101: Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the attribute value of the point cloud during predictive decoding. Search scope.
本发明实施例中,数据解码设备可以从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围。在某些实施例中,所述语法元素可以为前述的lifting_search_range;当然在其他实施例中,所述语法元素还可以包括其他表述形式,在此不做具体限定。In the embodiment of the present invention, the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the point cloud The search range of the attribute value during predictive decoding. In some embodiments, the syntax element may be the aforementioned lifting_search_range; of course, in other embodiments, the syntax element may also include other expression forms, which are not specifically limited here.
S1102:当根据语法元素的取值确定所述搜索范围不为0时,对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,其中,所述码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0。S1102: When it is determined that the search range is not 0 according to the value of the syntax element, decode the code stream data to obtain the residual error of the attribute value of the point cloud, and perform the calculation on the residual error of the attribute value of the point cloud. Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual error of the attribute value of at least one point cloud point is zero.
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围不为0时,数据解码设备可以对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,其中,所述码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0。In the embodiment of the present invention, when it is determined that the search range is not 0 according to the value of the syntax element, the data decoding device can decode the code stream data to obtain the residual error of the attribute value of the point cloud, The residual of the attribute value of the point cloud is compensated, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is zero.
在一个实施例中,当所述标识信息不包括第一标识时,数据解码设备解码所述码流数据得到所述点云的属性值时,可以对所述码流数据进行二值化的逆操作得到所述点云的属性值。In an embodiment, when the identification information does not include the first identification, when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may perform the inverse of binarization on the code stream data. Operation to obtain the attribute value of the point cloud.
在某些实施例中,所述标识信息包括第一标识,所述第一标识用于指示出现属性值的残差连续为0的点云点的数量。在某些实施例中,所述标识信息包括第二标识,所述第二标识用于指示当前点云点的属性值的残差是否为n,n为正整数;在某些实施例中,所述n为1或2。在某些实施例中,所述第二标识具体用于指示当前点云点的属性值的残差与n的差值是否为0。In some embodiments, the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual error of the attribute value is continuously 0. In some embodiments, the identification information includes a second identifier, and the second identifier is used to indicate whether the residual of the attribute value of the current point cloud point is n, where n is a positive integer; in some embodiments, The n is 1 or 2. In some embodiments, the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero.
在一个实施例中,所述点云数据还包括所述点云的位置坐标;当根据所述语法元素的取值确定所述搜索范围不为0时,所述解码设备对所述点云的属性值的残差进行补偿处理之前,可以计算所述点云中的点云点的位置坐标对应的莫顿码,并根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序。在一个实施例中,所述数据解码设备对所述点云的属性值的残差进行补偿处理时,可以根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值的残差进行补偿处理。In an embodiment, the point cloud data further includes the position coordinates of the point cloud; when it is determined that the search range is not 0 according to the value of the syntax element, the decoding device performs the Before the residual error of the attribute value is compensated, the Morton code corresponding to the position coordinates of the point cloud point in the point cloud can be calculated, and the point cloud can be calculated according to the Morton code of the point cloud point in the point cloud. Sort the points in the point cloud. In one embodiment, when the data decoding device performs compensation processing on the residual error of the attribute value of the point cloud, the point cloud may be sorted according to the order of the point cloud points in the point cloud and the search range. The residual error of the attribute value is compensated.
在一个实施例中,所述数据解码设备根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值的残差进行补偿处理时,可以根据所述搜索范围确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围,并根据所述当前点云点的属性值的残差和所述参考点云点的属性值确定所述当前点云点的属性值。In an embodiment, when the data decoding device performs compensation processing on the residuals of the attribute values of the point cloud according to the ordering of the point cloud points in the point cloud and the search range, the data decoding device may perform compensation processing according to the search range Determine the reference point cloud point of the current point cloud point, where the sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range, and according to the current point cloud The residual of the attribute value of the point and the attribute value of the reference point cloud point determine the attribute value of the current point cloud point.
在一些实施例中,所述数据解码设备在根据所述当前点云点的属性值的残差和所述参考点云点的属性值确定所述当前点云点的属性值时,可以根据所述参考点云点的属性值与所述当前点云点的属性值的残差之差,确定所述当前点云点的属性值。In some embodiments, the data decoding device may determine the attribute value of the current point cloud point according to the residual of the attribute value of the current point cloud point and the attribute value of the reference point cloud point. The residual difference between the attribute value of the reference point cloud point and the attribute value of the current point cloud point is used to determine the attribute value of the current point cloud point.
例如,假设所述搜索范围为3,点云中的点云点包括D1、D2、D3、D4、D5、D6,点云点的排序为D2、D4、D5、D1、D6、D3,如果当前点云点为D1,则所述数据解码设备可以根据所述搜索范围3,当前点云点D2之前的D2、D4、D5中确定当前点云点D2的参考点云点为D5,其中,所述参考点云点D2、D4、D5与所述当前点云点D2在所述排序后的点云中的排序距离不大于所述搜索范围3。所述数据解码设备可以根据所述参考点云点D5的属性值与所述当前点云点D2的属性值的残差之间的差值,确定所述当前点云点D2的属性值。For example, assuming that the search range is 3, the point cloud points in the point cloud include D1, D2, D3, D4, D5, D6, and the order of the point cloud points is D2, D4, D5, D1, D6, D3, if the current If the point cloud point is D1, the data decoding device can determine the reference point cloud point of the current point cloud point D2 in D2, D4, and D5 before the current point cloud point D2 according to the
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围不为0时,所述数据解码设备在对所述点云的属性值的残差进行补偿处理之前,还可以对所述点云的属性值的残差进行符号转换。在某些实施例中,所述对所述点云的属性值的残差进行符号转换的具体实施过程及举例如前所述,此处不再赘述。在一个实施例中,所述数据解码设备在对所述点云的属性值的残差进行符号转换之后,可以对所述点云进行符合转换后的属性值的残差进行补偿处理。In an embodiment, when it is determined that the search range is not 0 according to the value of the syntax element, the data decoding device may further perform compensation processing on the residual error of the attribute value of the point cloud The residuals of the attribute values of the point cloud undergo sign conversion. In some embodiments, the specific implementation process and examples of performing symbol conversion on the residuals of the attribute values of the point cloud are described above, and will not be repeated here. In one embodiment, after the data decoding device performs sign conversion on the residual of the attribute value of the point cloud, it may perform compensation processing on the residual of the point cloud in accordance with the converted attribute value.
S1103:当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。S1103: When it is determined that the search range is 0 according to the value of the syntax element, skip the step of "compensating for the residual error of the attribute value of the point cloud in the bitstream data", and perform The code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据解码设备可以跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。In the embodiment of the present invention, when the search range is determined to be 0 according to the value of the syntax element, the data decoding device may skip "compensating for the residual error of the attribute value of the point cloud in the code stream data The step of "processing" is to decode the code stream data to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据解码设备在对所述码流数据解码得到所述点云的属性值时,可以对所述码流数据进行二值化的逆操作得到所述点云的属性值。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may perform a check on all the data when decoding the code stream data to obtain the attribute value of the point cloud. The bitstream data is subjected to the inverse operation of binarization to obtain the attribute value of the point cloud.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据解码设备还可以跳过所述“计算所述点云中的点云点的位置坐标对应的莫顿码,根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may also skip the "calculate the position coordinates of the point cloud point in the point cloud" The step of sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据解码设备对所述码流数据解码得到所述点云的属性值之前,可以计算所述点云中的点云点的位置坐标对应的莫顿码,并根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序。在一个实施例中,所述数据解码设备在对所述码流数据解码得到所述点云的属性值时,可以对码流数据解码得到所述排序后的点云的属性值。In an embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may calculate the attribute value of the point cloud before decoding the code stream data Morton codes corresponding to the position coordinates of the point cloud points in the point cloud, and the point cloud points in the point cloud are sorted according to the Morton codes of the point cloud points in the point cloud. In an embodiment, when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may decode the code stream data to obtain the attribute value of the sorted point cloud.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据解码设备还可以跳过“对所述点云的属性值进行符号转换”的步骤。In one embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may also skip the step of "signature conversion on the attribute value of the point cloud".
本发明实施例中,数据解码设备可以从码流数据中解码点云数据的语法元素的取值,当根据所述语法元素的取值确定所述搜索范围不为0时,对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码得到所述点云的属性值。通过这种实施方式,可以降低解码过程中的算法复杂度,提高了解码的效率。In the embodiment of the present invention, the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, and when it is determined according to the value of the syntax element that the search range is not 0, the code stream The data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is compensated. When the search range is determined to be 0 according to the value of the syntax element, skip " The step of "compensating the residual error of the attribute value of the point cloud in the code stream data" is to decode the code stream data to obtain the attribute value of the point cloud. Through this implementation manner, the algorithm complexity in the decoding process can be reduced, and the decoding efficiency can be improved.
请参见图12,图12是本发明实施例提供的另一种数据解码方法的流程示意图,所述方法可以应用于数据解码设备,所述数据解码设备的解释如前所述。具体地,本发明实施例的所述方法包括如下步骤。Please refer to FIG. 12, which is a schematic flowchart of another data decoding method provided by an embodiment of the present invention. The method can be applied to a data decoding device, and the explanation of the data decoding device is as described above. Specifically, the method of the embodiment of the present invention includes the following steps.
S1201:从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围。S1201: Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the attribute value of the point cloud during predictive decoding. Search scope.
本发明实施例中,数据解码设备可以从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围。In the embodiment of the present invention, the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the value of the point cloud The search range of the attribute value during predictive decoding.
在某些实施例中,所述码流数据中不包括用于指示出现属性值连续为0的点云点的数量的标识;在某些实施例中,,所述码流数据中不包括用于指示当前点云点的属性值是否为1的标识;在某些实施例中,所述码流数据中不包括用于指示当前点云点的属性值与1的差值是否为0的标识;在某些实施例中,所述码流数据中不包括用于指示当前点云点的属性值是否为2的标识;在某些实施例中,所述码流数据中不包括用于指示当前点云点的属性值与2的差值是否为0的标识。In some embodiments, the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0; in some embodiments, the code stream data does not include To indicate whether the attribute value of the current point cloud point is 1; in some embodiments, the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 1 is 0 In some embodiments, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2; in some embodiments, the code stream data does not include an identifier for indicating An indicator of whether the difference between the attribute value of the current point cloud point and 2 is 0.
S1202:当根据所述语法元素的取值确定所述搜索范围为0时,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。S1202: When it is determined that the search range is 0 according to the value of the syntax element, decode the code stream data to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information .
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,数据解码设备可以对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。In the embodiment of the present invention, when the search range is determined to be 0 according to the value of the syntax element, the data decoding device can decode the code stream data to obtain the attribute value of the point cloud, wherein the code stream The identification information is not included in the data.
在一个实施例中,数据解码设备对所述码流数据解码得到所述点云的属性值时,可以对所述码流数据进行二值化的逆操作得到所述点云的属性值。In an embodiment, when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may perform the inverse operation of binarization on the code stream data to obtain the attribute value of the point cloud.
在一个实施例中,所述码流数据中不包括用于指示出现属性值连续为0的点云点的数量的标识。所述码流数据中不包括用于指示当前点云点的属性值是否为1的标识。In an embodiment, the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0. The code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 1.
在一个实施例中,所述“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤是发生在所述点云数据的语法元素的取值的搜索范围不为0时。In an embodiment, the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" occurs when the search range of the value of the syntax element of the point cloud data is not It is 0 o'clock.
在一个实施例中,当所述点云数据的语法元素的取值的搜索范围为0时,数据解码设备还可以跳过在所述“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤之前的“计算所述点云中的点云点的位置坐标对应的莫顿码;根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。In an embodiment, when the search range of the value of the syntax element of the point cloud data is 0, the data decoding device may also skip the step in the "pair of the attribute value of the point cloud in the code stream data Before the step of “compensating the residual error of the point cloud”, “calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud; compare the point cloud according to the Morton code of the point cloud point in the point cloud In the step of sorting the point cloud points.
在一个实施例中,所述“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,包括:根据所述搜索范围确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围;根据所述当前点云点的属性值的残差和所述参考点云点的属性值确定所述当前点云点的属性值。In an embodiment, the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" includes: determining the reference point cloud point of the current point cloud point according to the search range , The sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range; according to the residual of the attribute value of the current point cloud point and the reference The attribute value of the point cloud point determines the attribute value of the current point cloud point.
在一个实施例中,所述数据解码设备还可以计算所述点云中的点云点的位置坐标对应的莫顿码,并根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序。在一些实施例中,所述数据解码设备对所述码流数据解码得到所述点云的属性值时,可以对码流数据解码得到所述排序后的点云的属性值。In an embodiment, the data decoding device may also calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud, and compare the Morton code according to the Morton code of the point cloud point in the point cloud. The point cloud points in the point cloud are sorted. In some embodiments, when the data decoding device decodes the code stream data to obtain the attribute value of the point cloud, it may decode the code stream data to obtain the attribute value of the sorted point cloud.
在一个实施例中,当根据所述语法元素的取值确定所述搜索范围为0时,所述数据解码设备还可以跳过“对所述点云的属性值进行符号转换”的步骤。In one embodiment, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may also skip the step of "signature conversion on the attribute value of the point cloud".
在一个实施例中,在当根据所述语法元素的取值确定所述搜索范围不为0时,存在“对所述点云的属性值的残差进行符号转换”的步骤。In an embodiment, when it is determined that the search range is not 0 according to the value of the syntax element, there is a step of "sign conversion of the residual of the attribute value of the point cloud".
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围为0时时,数据解码设备可以解码码流数据得到点云的属性值。通过这种实施方式,可以降低解码过程中的算法复杂度,提高了解码的效率。In the embodiment of the present invention, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may decode the bitstream data to obtain the attribute value of the point cloud. Through this implementation manner, the algorithm complexity in the decoding process can be reduced, and the decoding efficiency can be improved.
请参见图13,图13是本发明实施例提供的一种数据编码设备的结构示意图,具体的,所述数据编码设备包括:存储器1301、处理器1302以及数据接口1303。Please refer to FIG. 13, which is a schematic structural diagram of a data encoding device according to an embodiment of the present invention. Specifically, the data encoding device includes a
所述存储器1301可以包括易失性存储器(volatile memory);存储器1301也可以包括非易失性存储器(non-volatile memory);存储器1301还可以包括上述种类的存储器的组合。所述处理器1302可以是中央处理器(central processing unit,CPU)。所述处理器1302还可以进一步包括硬件数据编码设备。上述硬件数据编码设备可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。具体例如可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA)或其任意组合。The
进一步地,所述存储器1301用于存储程序,当程序被执行时所述处理器1302可以调用存储器1301中存储的程序,用于执行如下步骤:Further, the
确定点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围;Determining a value of a syntax element of the point cloud data, the point cloud data including the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding;
当根据所述语法元素的取值确定所述搜索范围不为0时,对所述点云的属性值进行预测处理,得到所述点云的属性值的残差,对所述点云的属性值的残差进行编码得到第一码流数据,其中,所述第一码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0;When it is determined that the search range is not 0 according to the value of the syntax element, the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud, and the attribute value of the point cloud Encoding the residual of the value to obtain the first bitstream data, wherein the first bitstream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
当根据所述语法元素的取值确定所述搜索范围为0时,跳过所述“对所述点云的属性值进行预测处理”的步骤,对所述点云的属性值进行编码得到第二码流数据,其中,所述第二码流数据中不包括第一标识。When it is determined that the search range is 0 according to the value of the syntax element, skip the step of "predicting the attribute value of the point cloud", and encode the attribute value of the point cloud to obtain the first Two code stream data, wherein the second code stream data does not include the first identifier.
进一步地,所述当根据所述语法元素的取值确定所述搜索范围为0时,所述处理器1302对所述点云的属性值进行编码得到第二码流数据时,具体可以:Further, when it is determined that the search range is 0 according to the value of the syntax element, the
当根据所述语法元素的取值确定所述搜索范围为0时,对所述点云的属性值进行二值化编码得到第二码流数据。When it is determined that the search range is 0 according to the value of the syntax element, binary encoding is performed on the attribute value of the point cloud to obtain the second code stream data.
进一步地,所述点云数据还包括所述点云的位置坐标;Further, the point cloud data further includes position coordinates of the point cloud;
当根据所述语法元素的取值确定所述搜索范围不为0时,所述处理器1302对所述点云的属性值进行预测处理之前,还用于:When it is determined that the search range is not 0 according to the value of the syntax element, the
计算所述点云中的点云点的位置坐标对应的莫顿码;Calculating the Morton code corresponding to the position coordinates of the point cloud points in the point cloud;
根据所述点云中的点云点的莫顿码,对所述点云中的点云点进行排序;Sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud;
所述处理器1302对所述点云的属性值进行预测处理时,具体用于:When the
根据所述点云中的点云点的排序和所述搜索范围,对所述点云的属性值进行预测处理。According to the order of the point cloud points in the point cloud and the search range, the attribute value of the point cloud is predicted.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过所述“根据所述点云的位置确定所述点云中的点云点的莫顿码,根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the "Determine Morton code of the point cloud point in the point cloud according to the position of the point cloud" is also skipped, and according to The step of sorting the point cloud points in the point cloud by the Morton code of the point cloud points in the point cloud.
进一步地,所述处理器1302根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值进行预测处理时,具体用于:Further, when the
确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围;Determining a reference point cloud point of a current point cloud point, where the sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range;
根据所述参考点云点的属性值和所述当前点云点的属性值,计算所述点云点的属性值的残差。According to the attribute value of the reference point cloud point and the attribute value of the current point cloud point, a residual error of the attribute value of the point cloud point is calculated.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时所述处理器1302,对所述点云的属性值进行编码得到第二码流数据之前,还用于:Further, when it is determined that the search range is 0 according to the value of the syntax element, the
计算所述点云中的点云点的位置坐标对应的莫顿码;Calculating the Morton code corresponding to the position coordinates of the point cloud points in the point cloud;
根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序;Sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud;
所述处理器1302对所述点云的属性值进行编码得到第二码流数据时,具体用于:When the
对所述排序后的点云的属性值进行编码得到第二码流数据。The second code stream data is obtained by encoding the attribute values of the sorted point cloud.
进一步地,所述标识信息包括第一标识,所述第一标识用于指示出现属性值的残差连续为0的点云点的数量。Further, the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual of the attribute value is continuously 0.
进一步地,所述标识信息包括第二标识,所述第二标识用于指示当前点云点的属性值的残差是否为n,n为正整数。Further, the identification information includes a second identification, and the second identification is used to indicate whether the residual error of the attribute value of the current point cloud point is n, and n is a positive integer.
进一步地,所述n为1或2。Further, the n is 1 or 2.
进一步地,所述第二标识具体用于指示当前点云点的属性值的残差与n的差值是否为0。Further, the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero.
进一步地,当根据所述语法元素的取值确定所述搜索范围不为0时,所述处理器1302对所述点云的属性值的残差进行编码得到第一码流数据之前,还用于:Further, when it is determined that the search range is not 0 according to the value of the syntax element, the
对所述点云的属性值的残差进行符号转换;Performing sign conversion on the residual of the attribute value of the point cloud;
所述处理器1302对所述点云的属性值的残差进行编码得到第一码流数据时,具体用于:When the
对所述点云进行符合转换后的属性值的残差进行编码得到第一码流数据。The first bitstream data is obtained by encoding the residual of the point cloud in accordance with the converted attribute value.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过“对所述点云的属性值进行符号转换”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the step of "signature conversion on the attribute value of the point cloud" is also skipped.
本发明实施例中,当语法元素的取值确定的搜索范围不为0时,通过对点 云的属性值进行预测处理,得到点云的属性值的残差,以对点云的属性值的残差进行编码;当语法元素的取值确定的搜索范围为0时,跳过“对点云的属性值进行预测处理”的步骤,对点云的属性值进行编码。通过这种实施方式,可以大幅度地简化对属性编码的算法复杂度,减少了时间开销,提高了属性编码的效率。In the embodiment of the present invention, when the search range determined by the value of the syntax element is not 0, the attribute value of the point cloud is predicted to obtain the residual error of the attribute value of the point cloud. The residual is encoded; when the search range determined by the value of the syntax element is 0, the step of "predicting the attribute value of the point cloud" is skipped, and the attribute value of the point cloud is encoded. Through this implementation manner, the algorithm complexity of the attribute encoding can be greatly simplified, the time overhead is reduced, and the efficiency of the attribute encoding is improved.
请参见图14,图14是本发明实施例提供的另一种数据编码设备的结构示意图,具体的,所述数据编码设备包括:存储器1401、处理器1402以及数据接口1403。Please refer to FIG. 14, which is a schematic structural diagram of another data encoding device according to an embodiment of the present invention. Specifically, the data encoding device includes a
所述存储器1401可以包括易失性存储器(volatile memory);存储器1401也可以包括非易失性存储器(non-volatile memory);存储器1401还可以包括上述种类的存储器的组合。所述处理器1402可以是中央处理器(central processing unit,CPU)。所述处理器1402还可以进一步包括硬件数据编码设备。上述硬件数据编码设备可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。具体例如可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA)或其任意组合。The
进一步地,所述存储器1401用于存储程序,当程序被执行时所述处理器1402可以调用存储器1401中存储的程序,用于执行如下步骤:Further, the
确定点云数据的语法元素的取值,所述点云数据包括所述点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测编码时的搜索范围;Determining a value of a syntax element of the point cloud data, the point cloud data including the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud during predictive coding;
当根据所述语法元素的取值确定所述搜索范围为0时,对所述点云的属性值进行编码得到码流数据,其中,所述码流数据中不包括用于指示至少一个点云点的属性值为0的标识。When it is determined that the search range is 0 according to the value of the syntax element, the attribute value of the point cloud is coded to obtain code stream data, wherein the code stream data does not include at least one point cloud indicating The point's attribute value is 0.
进一步地,所述处理器1402对所述点云的属性值进行编码得到码流数据时,具体用于:Further, when the
对所述点云的属性值进行二值化编码得到码流数据。Binary encoding is performed on the attribute value of the point cloud to obtain code stream data.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述点云的属性值进行预测处理”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the step of "predicting the attribute value of the point cloud" is skipped.
进一步地,所述“对所述点云的属性值进行预测处理”的步骤是发生在当根据所述语法元素的取值确定所述搜索范围不为0时。Further, the step of "predicting the attribute value of the point cloud" occurs when it is determined that the search range is not 0 according to the value of the syntax element.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过在所述“对所述点云的属性值进行预测处理”的步骤之前的“计算所述点云中的点云点的位置坐标对应的莫顿码,根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the "calculation of the point cloud" before the step of "predicting the attribute value of the point cloud" is also skipped. According to the Morton code corresponding to the position coordinates of the point cloud points in the point cloud, the point cloud points in the point cloud are sorted according to the Morton code of the point cloud points in the point cloud".
进一步地,所述“对所述点云的属性值进行预测处理”的步骤,包括:Further, the step of "predicting the attribute value of the point cloud" includes:
确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围;Determining a reference point cloud point of a current point cloud point, where the sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range;
根据所述参考点云点的属性值和所述当前点云点的属性值计算所述点云点的属性值的残差。Calculate the residual of the attribute value of the point cloud point according to the attribute value of the reference point cloud point and the attribute value of the current point cloud point.
进一步地,所述处理器1402还用于:Further, the
计算所述点云中的点云点的位置坐标对应的莫顿码;Calculating the Morton code corresponding to the position coordinates of the point cloud points in the point cloud;
根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序;Sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud;
所述处理器1402对所述点云的属性值进行编码得到码流数据时,具体用于:When the
对所述排序后的点云的属性值进行编码得到码流数据。Code stream data is obtained by encoding the attribute values of the sorted point cloud.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过“对所述点云的属性值进行符号转换”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the step of "signature conversion on the attribute value of the point cloud" is also skipped.
进一步地,在当根据所述语法元素的取值确定所述搜索范围不为0时,存在“对所述点云的属性值的残差进行符号转换”的步骤。Further, when it is determined that the search range is not 0 according to the value of the syntax element, there is a step of "signature conversion on the residual of the attribute value of the point cloud".
进一步地,所述码流数据中不包括用于指示出现属性值连续为0的点云点的数量的标识。Further, the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值是否为1的标识。Further, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 1.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值与1的差值是否为0的标识。Further, the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 1 is 0.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值是否为2的标识。Further, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值与2的差 值是否为0的标识。Further, the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 2 is zero.
本发明实施例中,通过当语法元素的取值确定的搜索范围为0时,对点云的属性值进行编码,可以大幅度地简化对属性编码的算法复杂度,减少了时间开销,提高了属性编码的效率。In the embodiment of the present invention, by encoding the attribute value of the point cloud when the search range determined by the value of the syntax element is 0, the algorithm complexity of the attribute encoding can be greatly simplified, the time cost is reduced, and the The efficiency of attribute encoding.
请参见图15,图15是本发明实施例提供的一种数据解码设备的结构示意图,具体的,所述数据解码设备包括:存储器1501、处理器1502以及数据接口1503。Please refer to FIG. 15. FIG. 15 is a schematic structural diagram of a data decoding device according to an embodiment of the present invention. Specifically, the data decoding device includes a
所述存储器1501可以包括易失性存储器(volatile memory);存储器1501也可以包括非易失性存储器(non-volatile memory);存储器1501还可以包括上述种类的存储器的组合。所述处理器1502可以是中央处理器(central processing unit,CPU)。所述处理器1502还可以进一步包括硬件数据编码设备。上述硬件数据编码设备可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。具体例如可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA)或其任意组合。The
进一步地,所述存储器1501用于存储程序,当程序被执行时所述处理器1502可以调用存储器1501中存储的程序,用于执行如下步骤:Further, the
从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围;Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
当根据所述语法元素的取值确定所述搜索范围不为0时,对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,其中,所述码流数据中包括标识信息,所述标识信息用于指示至少一个点云点的属性值的残差为0;When it is determined that the search range is not 0 according to the value of the syntax element, the code stream data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is performed Compensation processing, wherein the code stream data includes identification information, and the identification information is used to indicate that the residual of the attribute value of at least one point cloud point is 0;
当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括所述标识信息。When it is determined that the search range is 0 according to the value of the syntax element, the step of "compensating for the residual error of the attribute value of the point cloud in the code stream data" is skipped, and the code stream is The data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include the identification information.
进一步地,所述处理器1502当根据所述语法元素的取值确定所述搜索范 围为0时,对所述码流数据解码得到所述点云的属性值时,具体用于:Further, when the
当根据所述语法元素的取值确定所述搜索范围为0时,对所述码流数据进行二值化的逆操作得到所述点云的属性值。When it is determined that the search range is 0 according to the value of the syntax element, the inverse operation of binarization is performed on the code stream data to obtain the attribute value of the point cloud.
进一步地,所述点云数据还包括所述点云的位置坐标;Further, the point cloud data further includes position coordinates of the point cloud;
所述处理器1502当根据所述语法元素的取值确定所述搜索范围不为0时,所述对所述点云的属性值的残差进行补偿处理之前,还用于:When the
计算所述点云中的点云点的位置坐标对应的莫顿码;Calculating the Morton code corresponding to the position coordinates of the point cloud points in the point cloud;
根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序;Sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud;
所述处理器1502对所述点云的属性值的残差进行补偿处理时,具体用于:When the
根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值的残差进行补偿处理。Compensating the residual error of the attribute value of the point cloud according to the sorting of the point cloud points in the point cloud and the search range.
进一步地,所述处理器1502根据所述点云中的点云点的排序和所述搜索范围对所述点云的属性值的残差进行补偿处理时,具体用于:Further, when the
根据所述搜索范围确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围;Determining a reference point cloud point of a current point cloud point according to the search range, and a sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range;
根据所述当前点云点的属性值的残差和所述参考点云点的属性值确定所述当前点云点的属性值。The attribute value of the current point cloud point is determined according to the residual of the attribute value of the current point cloud point and the attribute value of the reference point cloud point.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过所述“计算所述点云中的点云点的位置坐标对应的莫顿码,根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the "calculate the Morton code corresponding to the position coordinates of the point cloud point in the point cloud" is skipped, and according to the point cloud The step of sorting the point cloud points in the point cloud by the Morton code of the point cloud points in the cloud.
进一步地,所述处理器1502当根据所述语法元素的取值确定所述搜索范围为0时,所述对所述码流数据解码得到所述点云的属性值之前,还用于:Further, when the
计算所述点云中的点云点的位置坐标对应的莫顿码;Calculating the Morton code corresponding to the position coordinates of the point cloud points in the point cloud;
根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序;Sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud;
所述处理器1502对所述码流数据解码得到所述点云的属性值时,具体用于:When the
对码流数据解码得到所述排序后的点云的属性值。The code stream data is decoded to obtain the attribute value of the sorted point cloud.
进一步地,所述标识信息包括第一标识,所述第一标识用于指示出现属性值的残差连续为0的点云点的数量。Further, the identification information includes a first identification, and the first identification is used to indicate the number of point cloud points where the residual of the attribute value is continuously 0.
进一步地,所述标识信息包括第二标识,所述第二标识用于指示当前点云 点的属性值的残差是否为n,n为正整数。Further, the identification information includes a second identification, and the second identification is used to indicate whether the residual of the attribute value of the current point cloud point is n, and n is a positive integer.
进一步地,所述n为1或2。Further, the n is 1 or 2.
进一步地,所述第二标识具体用于指示当前点云点的属性值的残差与n的差值是否为0。Further, the second identifier is specifically used to indicate whether the difference between the residual of the attribute value of the current point cloud point and n is zero.
进一步地,当根据所述语法元素的取值确定所述搜索范围不为0时,所述处理器1502对所述点云的属性值的残差进行补偿处理之前,还用于:Further, when it is determined that the search range is not 0 according to the value of the syntax element, the
对所述点云的属性值的残差进行符号转换;Performing sign conversion on the residual of the attribute value of the point cloud;
所述处理器1502对所述点云的属性值的残差进行补偿处理时,具体用于:When the
对所述点云进行符合转换后的属性值的残差进行补偿处理。Compensation processing is performed on the residual error conforming to the converted attribute value of the point cloud.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过“对所述点云的属性值进行符号转换”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the step of "signature conversion on the attribute value of the point cloud" is also skipped.
本发明实施例中,数据解码设备可以从码流数据中解码点云数据的语法元素的取值,当根据所述语法元素的取值确定所述搜索范围不为0时,对所述码流数据解码得到所述点云的属性值的残差,对所述点云的属性值的残差进行补偿处理,当根据所述语法元素的取值确定所述搜索范围为0时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,对所述码流数据解码得到所述点云的属性值。通过这种实施方式,可以降低解码过程中的算法复杂度,提高了解码的效率。In the embodiment of the present invention, the data decoding device can decode the value of the syntax element of the point cloud data from the code stream data, and when it is determined according to the value of the syntax element that the search range is not 0, the code stream The data is decoded to obtain the residual error of the attribute value of the point cloud, and the residual error of the attribute value of the point cloud is compensated. When the search range is determined to be 0 according to the value of the syntax element, skip " The step of "compensating the residual error of the attribute value of the point cloud in the code stream data" is to decode the code stream data to obtain the attribute value of the point cloud. Through this implementation manner, the algorithm complexity in the decoding process can be reduced, and the decoding efficiency can be improved.
请参见图16,图16是本发明实施例提供的另一种数据解码设备的结构示意图,具体的,所述数据解码设备包括:存储器1601、处理器1602以及数据接口1603。Please refer to FIG. 16, which is a schematic structural diagram of another data decoding device according to an embodiment of the present invention. Specifically, the data decoding device includes a
所述存储器1601可以包括易失性存储器(volatile memory);存储器1601也可以包括非易失性存储器(non-volatile memory);存储器1601还可以包括上述种类的存储器的组合。所述处理器1602可以是中央处理器(central processing unit,CPU)。所述处理器1602还可以进一步包括硬件数据编码设备。上述硬件数据编码设备可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。具体例如可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA)或其 任意组合。The
进一步地,所述存储器1601用于存储程序,当程序被执行时所述处理器1602可以调用存储器1601中存储的程序,用于执行如下步骤:Further, the
从码流数据中解码点云数据的语法元素的取值,所述点云数据包括点云的属性值,所述语法元素用于指示所述点云的属性值在进行预测解码时的搜索范围;Decode the value of the syntax element of the point cloud data from the code stream data, the point cloud data includes the attribute value of the point cloud, and the syntax element is used to indicate the search range of the attribute value of the point cloud when performing prediction decoding ;
当根据所述语法元素的取值确定所述搜索范围为0时,对所述码流数据解码得到所述点云的属性值,其中,所述码流数据中不包括标识信息。When it is determined that the search range is 0 according to the value of the syntax element, the code stream data is decoded to obtain the attribute value of the point cloud, wherein the code stream data does not include identification information.
进一步地,所述处理器1602对所述码流数据解码得到所述点云的属性值时,具体用于:Further, when the
对所述码流数据进行二值化的逆操作得到所述点云的属性值。The inverse operation of binarization is performed on the code stream data to obtain the attribute value of the point cloud.
进一步地,当所述码流数据中不包括用于指示至少一个点云点的属性值为0的标识时,跳过“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤。Further, when the code stream data does not include an identifier used to indicate that the attribute value of at least one point cloud point is 0, skip "checking the residual of the attribute value of the point cloud in the code stream data Compensation processing" steps.
进一步地,所述“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤是发生在所述点云数据的语法元素的取值的搜索范围不为0时。Further, the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" occurs when the search range of the value of the syntax element of the point cloud data is not 0 .
进一步地,当所述点云数据的语法元素的取值的搜索范围为0时,还跳过在所述“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤之前的“计算所述点云中的点云点的位置坐标对应的莫顿码;根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序”的步骤。Further, when the search range of the value of the syntax element of the point cloud data is 0, the "compensation process for the residual of the attribute value of the point cloud in the code stream data" is also skipped. "Calculate the Morton code corresponding to the position coordinates of the point cloud points in the point cloud; sort the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud "A step of.
进一步地,所述“对所述码流数据中所述点云的属性值的残差进行补偿处理”的步骤,包括:Further, the step of "compensating the residual error of the attribute value of the point cloud in the code stream data" includes:
根据所述搜索范围确定当前点云点的参考点云点,所述参考点云点与所述当前点云点在所述排序后的点云中的排序距离不大于所述搜索范围;Determining a reference point cloud point of a current point cloud point according to the search range, and a sorting distance between the reference point cloud point and the current point cloud point in the sorted point cloud is not greater than the search range;
根据所述当前点云点的属性值的残差和所述参考点云点的属性值确定所述当前点云点的属性值。The attribute value of the current point cloud point is determined according to the residual of the attribute value of the current point cloud point and the attribute value of the reference point cloud point.
进一步地,所述处理器1602还用于:Further, the
计算所述点云中的点云点的位置坐标对应的莫顿码;Calculating the Morton code corresponding to the position coordinates of the point cloud points in the point cloud;
根据所述点云中的点云点的莫顿码对所述点云中的点云点进行排序;Sorting the point cloud points in the point cloud according to the Morton code of the point cloud points in the point cloud;
所述处理器1602对所述码流数据解码得到所述点云的属性值时,具体用 于:When the
对码流数据解码得到所述排序后的点云的属性值。The code stream data is decoded to obtain the attribute value of the sorted point cloud.
进一步地,当根据所述语法元素的取值确定所述搜索范围为0时,还跳过“对所述点云的属性值进行符号转换”的步骤。Further, when it is determined that the search range is 0 according to the value of the syntax element, the step of "signature conversion on the attribute value of the point cloud" is also skipped.
进一步地,在当根据所述语法元素的取值确定所述搜索范围不为0时,存在“对所述点云的属性值的残差进行符号转换”的步骤。Further, when it is determined that the search range is not 0 according to the value of the syntax element, there is a step of "signature conversion on the residual of the attribute value of the point cloud".
进一步地,所述码流数据中不包括用于指示出现属性值连续为0的点云点的数量的标识。Further, the code stream data does not include an identifier for indicating the number of point cloud points whose attribute values are continuously 0.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值是否为1的标识。Further, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 1.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值与1的差值是否为0的标识。Further, the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 1 is 0.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值是否为2的标识。Further, the code stream data does not include an identifier for indicating whether the attribute value of the current point cloud point is 2.
进一步地,所述码流数据中不包括用于指示当前点云点的属性值与2的差值是否为0的标识。Further, the code stream data does not include an identifier for indicating whether the difference between the attribute value of the current point cloud point and 2 is 0.
本发明实施例中,当根据所述语法元素的取值确定所述搜索范围为0时时,数据解码设备可以解码码流数据得到点云的属性值。通过这种实施方式,可以降低解码过程中的算法复杂度,提高了解码的效率。In the embodiment of the present invention, when it is determined that the search range is 0 according to the value of the syntax element, the data decoding device may decode the bitstream data to obtain the attribute value of the point cloud. Through this implementation manner, the algorithm complexity in the decoding process can be reduced, and the decoding efficiency can be improved.
在本发明的实施例中还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例图9或图10中描述的数据编码方法方式,或图11或图12中描述的数据解码方法方式,也可实现图13或图14所述本发明所对应实施例的数据编码设备,或图15或16所述本发明所对应实施例的数据解码设备,在此不再赘述。In the embodiment of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the embodiment of the present invention is implemented in FIG. 9 or FIG. The data encoding method described, or the data decoding method described in Figure 11 or Figure 12, can also implement the data encoding device of the corresponding embodiment of the present invention described in Figure 13 or Figure 14, or the present invention described in Figure 15 or 16. The data decoding device of the corresponding embodiment of the invention will not be repeated here.
所述计算机可读存储介质可以是前述任一项实施例所述的设备的内部存储单元,例如设备的硬盘或内存。所述计算机可读存储介质也可以是所述设备的外部存储设备,例如所述设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述设备的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以 及所述设备所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The computer-readable storage medium may be an internal storage unit of the device described in any of the foregoing embodiments, such as a hard disk or memory of the device. The computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a Smart Media Card (SMC), or a Secure Digital (SD) card , Flash Card, etc. Further, the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
以上所揭露的仅为本发明部分实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above-disclosed are only some embodiments of the present invention, which of course cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.
Claims (105)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201980039810.9A CN112449754B (en) | 2019-07-04 | 2019-07-04 | A data encoding, data decoding method, equipment and storage medium |
| PCT/CN2019/094764 WO2021000334A1 (en) | 2019-07-04 | 2019-07-04 | Data encoding method and device, data decoding method and device, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2019/094764 WO2021000334A1 (en) | 2019-07-04 | 2019-07-04 | Data encoding method and device, data decoding method and device, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021000334A1 true WO2021000334A1 (en) | 2021-01-07 |
Family
ID=74100497
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/094764 Ceased WO2021000334A1 (en) | 2019-07-04 | 2019-07-04 | Data encoding method and device, data decoding method and device, and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112449754B (en) |
| WO (1) | WO2021000334A1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115407315A (en) * | 2021-05-27 | 2022-11-29 | 北京万集科技股份有限公司 | Point cloud denoising method and device, detection radar and storage medium |
| WO2024212113A1 (en) * | 2023-04-11 | 2024-10-17 | Oppo广东移动通信有限公司 | Point cloud encoding and decoding method and apparatus, device and storage medium |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112995662B (en) * | 2021-03-12 | 2022-10-25 | 北京大学深圳研究生院 | Method and device for attribute entropy coding and entropy decoding of point cloud |
| CN113096199B (en) * | 2021-03-12 | 2023-01-03 | 中山大学 | Point cloud attribute prediction method, device and medium based on Morton code |
| CN113014903B (en) * | 2021-03-15 | 2023-05-19 | 北京大学深圳研究生院 | Point cloud neighbor determination, point cloud prediction, point cloud encoding, point cloud decoding method and device |
| CN115412715B (en) * | 2021-05-26 | 2024-03-26 | 荣耀终端有限公司 | A method and device for predictive encoding and decoding of point cloud attribute information |
| CN115474046B (en) * | 2021-06-11 | 2025-04-18 | 维沃移动通信有限公司 | Point cloud attribute information encoding method, decoding method, device and related equipment |
| CN116233386B (en) * | 2021-12-03 | 2025-02-14 | 维沃移动通信有限公司 | Point cloud attribute encoding method, point cloud attribute decoding method and terminal |
| WO2023131136A1 (en) * | 2022-01-04 | 2023-07-13 | Beijing Bytedance Network Technology Co., Ltd. | Method, apparatus, and medium for point cloud coding |
| CN119631402A (en) * | 2022-07-04 | 2025-03-14 | 抖音视界有限公司 | Method, device and medium for point cloud encoding and decoding |
| WO2024082153A1 (en) * | 2022-10-18 | 2024-04-25 | Oppo广东移动通信有限公司 | Encoding method, decoding method, code stream, encoder, decoder and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108632621A (en) * | 2018-05-09 | 2018-10-09 | 北京大学深圳研究生院 | A kind of point cloud genera compression method based on distinguishing hierarchy |
| CN108833927A (en) * | 2018-05-03 | 2018-11-16 | 北京大学深圳研究生院 | A Point Cloud Attribute Compression Method Based on Deleting 0 Elements in Quantization Matrix |
| CN109257604A (en) * | 2018-11-20 | 2019-01-22 | 山东大学 | A Color Attribute Coding Method Based on TMC3 Point Cloud Encoder |
| US20190081638A1 (en) * | 2017-09-14 | 2019-03-14 | Apple Inc. | Hierarchical point cloud compression |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101847262B (en) * | 2010-05-19 | 2012-01-25 | 北京航空航天大学 | Fast three-dimensional point cloud searching and matching method |
-
2019
- 2019-07-04 CN CN201980039810.9A patent/CN112449754B/en not_active Expired - Fee Related
- 2019-07-04 WO PCT/CN2019/094764 patent/WO2021000334A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190081638A1 (en) * | 2017-09-14 | 2019-03-14 | Apple Inc. | Hierarchical point cloud compression |
| CN108833927A (en) * | 2018-05-03 | 2018-11-16 | 北京大学深圳研究生院 | A Point Cloud Attribute Compression Method Based on Deleting 0 Elements in Quantization Matrix |
| CN108632621A (en) * | 2018-05-09 | 2018-10-09 | 北京大学深圳研究生院 | A kind of point cloud genera compression method based on distinguishing hierarchy |
| CN109257604A (en) * | 2018-11-20 | 2019-01-22 | 山东大学 | A Color Attribute Coding Method Based on TMC3 Point Cloud Encoder |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115407315A (en) * | 2021-05-27 | 2022-11-29 | 北京万集科技股份有限公司 | Point cloud denoising method and device, detection radar and storage medium |
| WO2024212113A1 (en) * | 2023-04-11 | 2024-10-17 | Oppo广东移动通信有限公司 | Point cloud encoding and decoding method and apparatus, device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112449754B (en) | 2024-03-08 |
| CN112449754A (en) | 2021-03-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112385238B (en) | Data encoding method, data decoding method, equipment and storage medium | |
| CN112449754B (en) | A data encoding, data decoding method, equipment and storage medium | |
| US11895307B2 (en) | Block-based predictive coding for point cloud compression | |
| CN111699697B (en) | Method, equipment and storage medium for point cloud processing and decoding | |
| CN115211117B (en) | Predictor index signaling for prediction transforms in geometry-based point cloud compression | |
| US12464112B2 (en) | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device | |
| US20230086264A1 (en) | Decoding method, encoding method, decoder, and encoder based on point cloud attribute prediction | |
| US11395005B2 (en) | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device | |
| US20220345732A1 (en) | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device | |
| US12432363B2 (en) | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device | |
| CN115379191B (en) | Point cloud decoding method, point cloud encoding method and related equipment | |
| US20210314612A1 (en) | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device | |
| EP4272166A1 (en) | Hybrid-tree coding for inter and intra prediction for geometry coding | |
| CN113632492B (en) | Method, equipment and storage medium for point cloud processing and decoding | |
| CN112740702A (en) | Method and device for encoding and decoding point cloud | |
| CN115131449A (en) | Point cloud processing method, device, computer equipment, and storage medium | |
| EP4236322B1 (en) | Point cloud encoding/decoding method and device based on two-dimensional regularized plane projection | |
| WO2022131948A1 (en) | Devices and methods for sequential coding for point cloud compression | |
| CN113678460A (en) | Data encoding method, data decoding method, equipment and storage medium | |
| JP2024527337A (en) | Method for encoding and decoding point clouds | |
| WO2020248562A1 (en) | Method for point cloud processing and decoding, device for point cloud processing and decoding, and storage medium | |
| Roriz et al. | FOG-zip: Bitstream Compression for Octree-Encoded LiDAR Data | |
| HK40073969A (en) | Decoding, encoding method, decoder and encoder based on point cloud attribute prediction | |
| CN120457699A (en) | Coding and decoding method, encoder, decoder and storage medium | |
| HK40073907A (en) | Point cloud data processing method, device, storage medium and coding and decoding equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19936022 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19936022 Country of ref document: EP Kind code of ref document: A1 |