Decoding method, encoding method, decoder and encoder
By obtaining the original three-dimensional coordinates in geometric point cloud encoding, transforming and adjusting them to non-negative three-dimensional coordinates, and converting them into one-dimensional arrays, the problem of the coordinate value not being positive in the existing technology is solved, and the encoding efficiency and adaptation are improved , achieving good coding performance.
Patent Information
- Application Number
- CN202380044913.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-10-17
- Filing Date
- 2023-10-16
- Publication Date
- 2025-01-14
AI Technical Summary
The existing geometric point cloud encoding method cannot guarantee that all values are positive when transforming the coordinate values of a one-dimensional array, resulting in low encoding efficiency, especially in wide range of G-PCC input data with any three-dimensional representation.
By obtaining the original three-dimensional coordinates, perform coordinate transformation to adjust to non-negative three-dimensional coordinates, and converting them into a one-dimensional array. The specific steps include determining whether the value of the transform coordinate is negative, clamping to zero to obtain a non-negative value, and passing The scaling operation ensures that all values are positive.
Good coding performance is achieved, ensuring that all values after coordinate transformation during coding are positive, and coding efficiency and adaptability are improved.
Smart Images

Figure CN119318143A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of priority to U.S. Provisional Application No. 63 / 379,872, filed on October 17, 2022. The disclosure of the above patent application is incorporated herein by reference in its entirety and is made a part of this specification. Technical Field
[0003] The present invention proposes several improvements in coordinate transformation for Geometry and Point Cloud Compression (G-PCC). The proposed encoder, decoder, encoding method and decoding method can be used for future GPCC coding standards, in particular Moving Picture Experts Group-Geometry and Point Cloud Compression (MPEG G-PCC) Audio Video Coding Standard Geometry and Point Cloud Compression (AVS G-PCC). With the implementation of the proposed method, modifications to the bitstream structure, syntax, constraints and mappings for the generation of decoded point clouds are considered for standardization. Background Art
[0004] In traditional point cloud coding, the three-dimensional coordinates (x, y, z) in the original point cloud can be represented by using Cartesian coordinates. However, for some G-PCC applications, different coordinate representations may be more efficient for encoding purposes. For example, the planar geometry coding mode and the azimuth geometry coding mode for geometry coding can be used in light detection and ranging (LiDAR) acquisition systems. The LiDAR acquisition system can collect point clouds by sampling the reflectivity of light emitted by a vertically arranged laser in a rotating head. The collected point cloud can be in the shape of a cylinder, but since the sample distance may be uneven, this may result in low attribute encoding efficiency. However, in this regard, the existing G-PCC cannot guarantee that all coordinate values used to transform the one-dimensional array are positive numbers, and thus cannot be well adapted to a wide range of G-PCC input data with arbitrary three-dimensional representations. Summary of the invention
[0005] [Technical issues]
[0006] A novel image processing method is needed for efficiently decoding bitstream and encoding point cloud data.
[0007] [Solution to the problem]
[0008] The encoding method of the present invention comprises the following steps: during attribute encoding, obtaining original three-dimensional coordinates; transforming the original three-dimensional coordinates into transformed three-dimensional coordinates; adjusting the transformed three-dimensional coordinates into non-negative three-dimensional coordinates; and transforming the non-negative three-dimensional coordinates into a one-dimensional array.
[0009] In an embodiment of the present invention, the step of adjusting the transformed three-dimensional coordinates to non-negative three-dimensional coordinates includes: determining whether each value of the transformed three-dimensional coordinates is a negative value; and in response to at least one value of the transformed three-dimensional coordinates being a negative value, clamping at least one value of the transformed three-dimensional coordinates to zero to obtain non-negative three-dimensional coordinates.
[0010] In an embodiment of the present invention, the step of adjusting the transformed three-dimensional coordinates to non-negative three-dimensional coordinates is a scaling operation.
[0011] In an embodiment of the present invention, the transformed three-dimensional coordinates include a first intermediate value, a second intermediate value and a third intermediate value, and the scaling operation includes: multiplying the first intermediate value by the scaling value and adding the scaling value to the first offset value to obtain a first value of the non-negative three-dimensional coordinate; multiplying the second intermediate value by the scaling value and adding the second offset value to obtain a second value of the non-negative three-dimensional coordinate; and multiplying the third intermediate value by the scaling value and adding the third offset value to obtain a third value of the non-negative three-dimensional coordinate.
[0012] In an embodiment of the present invention, the transformed three-dimensional coordinates are spherical coordinates, and the scaling operation is specified as follows:
[0013] scalePoint k’i =(point k’i -min k )*S k +128>>8
[0014] Where k is the axis index (k is in {0, 1, 2}), i is the point index in decoding order, point k’i Represents the spherical coordinates, scalePoint k’i represents the scaled spherical coordinates, S k is an integer representing a fixed-point scaling factor with 8 decimal digits of precision, min k is the scaling offset value.
[0015] In an embodiment of the present invention, in response to spherical coordinates being used for attribute encoding and a scale offset flag in the attribute parameter being true, the scale offset value inherits the corresponding syntax value in the attribute parameter.
[0016] In an embodiment of the present invention, the one-dimensional array is a Morton array.
[0017] In an embodiment of the present invention, the one-dimensional array is a Hilbert array.
[0018] The encoder of the present invention includes a communication interface, a storage device and a processor. The communication interface is configured to receive point cloud data. The storage device is configured to store a bit stream. The processor is electrically connected to the communication interface and the storage device, and is configured to encode the point cloud data to generate a bit stream. During attribute encoding, the processor is configured to obtain original three-dimensional coordinates, and the processor is configured to transform the original three-dimensional coordinates into transformed three-dimensional coordinates. The processor is configured to adjust the transformed three-dimensional coordinates to non-negative three-dimensional coordinates, and the processor is configured to transform the non-negative three-dimensional coordinates into a one-dimensional array.
[0019] The decoding method of the present invention comprises the following steps: obtaining original three-dimensional coordinates; transforming the original three-dimensional coordinates into transformed three-dimensional coordinates; adjusting the transformed three-dimensional coordinates into non-negative three-dimensional coordinates; and transforming the non-negative three-dimensional coordinates into a one-dimensional array.
[0020] The decoder of the present invention includes a communication interface, a storage device and a processor. The communication interface is configured to receive point cloud data. The storage device is configured to store a bit stream. The processor is electrically connected to the communication interface and the storage device, and is configured to encode the point cloud data to generate a bit stream. During attribute encoding, the processor is configured to obtain original three-dimensional coordinates, and the processor is configured to transform the original three-dimensional coordinates into transformed three-dimensional coordinates. The processor is configured to adjust the transformed three-dimensional coordinates to non-negative three-dimensional coordinates, and the processor is configured to transform the non-negative three-dimensional coordinates into a one-dimensional array.
[0021] [Effects of the Invention]
[0022] Based on the above, according to the decoding method, encoding method, decoder and encoder of the present invention, good encoding performance can be achieved through special coordinate transformation.
[0023] In order to make the foregoing content easier to understand, several embodiments are described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flowchart of G-PCC encoding according to an embodiment of the present invention.
[0025] Figure 2A and Figure 2B An octree structure of a G-PCC according to an embodiment of the present invention is shown.
[0026] Figure 2C A corresponding digital representation of an octree structure according to an embodiment of the present invention is shown.
[0027] Figure 3 The structure of a cube according to an embodiment of the present invention is shown.
[0028] Figure 4is a flowchart of G-PCC decoding according to an embodiment of the present invention.
[0029] Figure 5 is a schematic diagram of the hardware structure of an encoder according to an embodiment of the present invention.
[0030] Figure 6 is a schematic diagram of an example of a point cloud sampling method according to an embodiment of the present invention.
[0031] Figure 7 is a schematic diagram of another example of a point cloud sampling method according to an embodiment of the present invention.
[0032] Figure 8 is a flowchart of an encoding method according to an embodiment of the present invention.
[0033] Fig. 9 is a schematic diagram of the hardware structure of an encoder according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to understand the features and technical contents of the embodiments of the present application in more detail, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The accompanying drawings are only for reference and illustration purposes and are not intended to limit the embodiments of the present application.
[0035] Figure 1 is a flowchart of G-PCC encoding according to an embodiment of the present invention. Figure 1 , Figure 1 The process shown is applied to a point cloud encoder. For the point cloud data to be encoded, the point cloud data is divided into multiple slices by slicing. In each slice, the position of the point cloud (ie, geometric information) and the attributes corresponding to each point cloud are encoded respectively.
[0036] In the geometric coding process, the position coordinates are converted into a bounding box in step S102, and then quantized in step S104. Quantization mainly plays a role in scaling. Due to quantization rounding, some positions of the point cloud are the same, so in step S104, it is further determined whether to remove duplicate points based on parameters. The process of quantization and removing duplicate points is also called voxelization.
[0037] Then, in step S106, the bounding box is divided into an octree for octree analysis. In the octree-based geometric information coding process, the bounding box is divided into 8 sub-cubes, and the non-empty (including points in the point cloud) sub-cube is further divided into 8 equal parts until a leaf node is obtained. When the point is a 1×1×1 unit cube, the division is stopped, and the points in the leaf node are arithmetically encoded in step S108 to generate a binary geometric bit stream, i.e., a geometric code stream.
[0038] Figure 2A and Figure 2B shows an octree structure of a G-PCC according to an embodiment of the present invention, Figure 2C 2 shows a corresponding digital representation of an octree structure according to an embodiment of the present invention. Figure 2A , the cubic axis-aligned bounding box B consists of two extreme points (0,0,0) and (2 d ,2 d ,2 d ), where d is the maximum size of a given point cloud along the x, y or z direction. The points of the point cloud will be labeled as "points" below. All points are included in this defined cube B.
[0039] refer to Figure 2B , cube B is divided into eight child cubes B1 to B8, which creates an octree structure that enables one parent cube B to have 8 child cubes B1 to B8. The 7 sibling cubes B2 to B8 of a given cube B1 are cubes of the same size and share at least one common face / edge / point with the given cube. The volume of each of cubes B1 to B8 is 1 / 8 of its parent cube B. Each of cubes B1 to B8 can contain more than one point, and the number of points in a cube depends on the size and position of the cube. For a given point cloud, the size of the minimum cube is predefined. For a given point, the parent cube of the given point is defined as the cube of the minimum size that contains the given point. The sibling points of a given point are defined as those points that have the same parent cube as the given point.
[0040] refer to Figure 2C , an octree is a recursive data structure commonly used to describe three-dimensional spaces, where each internal cube has exactly eight sub-cubes. The space is recursively subdivided into eight octants until a point, where the resolution of the sub-cube is equal to the size of the point - the smallest element without further subdivision. To represent the cube, an 8-bit binary code following a space-filling curve pattern (Hilbert, Morton) is used, assigning a "1" or "0" value to each sub-cube to indicate that the space in the sub-cube has any points associated with the sub-cube, or that the sub-cube is empty. Only occupied sub-cubes are further subdivided. The process of subdividing the parent cube is terminated when the size of the sub-cube becomes equal to the size of the indivisible element, that is, equal to the spatial resolution of the point cloud or simply equal to the size of the point.
[0041] Figure 3 1 shows the structure of a cube according to an embodiment of the present invention. Figure 3,Depending on the position of the current cube, a cube can have up to six cubes of the same size sharing a face.,In addition, the current cube can also have some neighboring cubes that share lines or points with the current cube.
[0042] Similarly, the parent cube of the current cube also has up to six neighboring cubes of the same size as the parent cube, which share a face with the parent cube. The parent cube of the current cube also has up to twelve neighboring cubes of the same size as the parent cube, which share an edge. The parent cube of the current cube also has up to eight neighboring cubes of the same size as the parent cube, which share points with the parent cube.
[0043] Return to reference Figure 1 , based on the surface formed by the distribution of the point cloud in each block, 12 surfaces and blocks are analyzed in step S110. Up to 12 vertices (intersections) are generated from the edges, and arithmetic coding (surface fitting based on intersections) is performed on the vertices in step S108 to generate a binary geometry bit stream, i.e., a geometry code stream. The vertices are also used in the implementation of the geometry reconstruction process in step S112, and the reconstruction set information is used when encoding the attributes of the point cloud.
[0044] In the attribute encoding process, after the geometric encoding is completed and the geometric information is reconstructed in step S112, a color transformation is performed in step S114, in which the color information (i.e., the attribute information) is transformed from the RGB color space to the YUV color space. Then, in step S116, the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information. Attribute encoding is mainly for color information.
[0045] In the color information encoding process, there are mainly two transformation methods. One is a distance-based dimensionality increase transformation that relies on the level of detail (LOD) division in step S118 and the dimensionality increase in step S120, and the other is direct region adaptation. In step S122, a hierarchical transformation (RAHT) transformation is performed. These two methods transform the color information from the spatial domain to the frequency domain, thereby obtaining high-frequency coefficients and low-frequency coefficients through the transformation, and finally quantize the coefficients (i.e., quantization coefficients) in step S124.
[0046] Finally, after octree partitioning and surface fitting, the geometric coding data and quantization coefficient processing attribute coding data are sliced and synthesized, and then the vertex coordinates of each block are sequentially encoded (i.e., arithmetic coding) in step S126 to generate a binary attribute bit stream, i.e., attribute code stream.
[0047] Figure 4 is a flowchart of G-PCC decoding according to an embodiment of the present invention. Figure 4 The process in is applied to the point cloud decoder. For the binary code stream obtained, the geometry bit stream and attribute bit stream in the binary code stream are first decoded in steps S402 and S404 respectively. When decoding the geometry bit stream, the position of the point cloud (i.e., geometry information) is obtained through arithmetic decoding in step S402, octree synthesis in step S406, surface fitting in step S408, geometry reconstruction in step S410, and inverse coordinate transformation in step S412.
[0048] When decoding the attribute bit stream, the attributes of the point cloud are obtained through arithmetic decoding in step S404, inverse quantization in step S414, LOD-based dimensionality increase inverse transformation in steps S416 and S418 or RAHT-based inverse transformation in step S420, and inverse color transformation in step S422, and the three-dimensional image model of the point cloud data to be encoded is restored according to the position and attributes.
[0049] The octree-based geometric information can be encoded using context-based arithmetic coding. There may also be some corresponding attribute information of the point cloud that needs to be compressed, including color, reflectivity, etc. Because neighboring points in a point cloud may have strong correlations, prediction-based coding methods have been developed and used to synthesize and encode point cloud attributes. More specifically, a prediction is formed from neighboring encoded attributes. Then, the difference between the current attribute and the prediction is encoded.
[0050] In the present invention, it is assumed that coding refers to encoding and decoding methods and systems.
[0051] [Attribute Coding in AVS G-PCC]
[0052] Based on the G-PCC standard (such as AVS G-PCC or MPEG G-PCC), after encoding the geometric information, the point cloud cube can be converted into a one-dimensional array using Morton or Hilbert code / order. Each position in the cube will have a corresponding Morton or Hilbert code, but some positions may not have any corresponding point cloud attributes. In other words, some positions may be empty. The attribute encoding will follow the predefined Morton or Hilbert order. A predictor can be generated from the previously encoded point in Morton or Hilbert order. The attribute difference between the current point and its predictor is encoded into the bitstream.
[0053] To reduce memory usage, some predefined numbers have been specified to limit the number of neighboring points that can be used to generate a prediction value. For example, only M data points out of the previous N consecutive coded points can be used to encode the current attribute. In previous G-PCC software, M and N were set to fixed numbers of 3 and 128, respectively.
[0054] If more than 128 points have been encoded before the current point, only 3 of the 128 previously encoded neighboring points can be used to form an attribute predictor according to a predefined order. If there are less than 128 encoded points before the current point, all such encoded points will be used as candidates for establishing an attribute predictor. More specifically, the previous K points before the current point are selected according to a predefined Morton or Hilbert order, for example K=6. Then, the new Morton or Hilbert codes of these N points are recalculated by adding a fixed shift (for example 1) to the coordinates (x, y, z) of these N data points. Assuming that the new Morton or Hilbert code of the current position is X, a set of P points before the current position and a set of Q points after the current position are selected according to the new Morton or Hilbert code order. Among these predefined K, P and Q point sets, M points are selected using the M closest "distances" between these encoded points and the current point. As an example, the distance d1 is defined as follows, and other distance metrics can also be used.
[0055] d1=|x1-x2|+|y1-y2|+|z1-z2| (1)
[0056] Among them, (x1, y1, z1) and (x2, y2, z2) are the coordinates of the current point and the pre-selected point respectively.
[0057] Recently, a full search method based on Hilbert codes has been applied to G-PCC attribute coding. In the current software, the search range is set to 128 and the number of previous points used to form the predictor is set to M. If more than 128 points have been encoded before the current point, only M points out of the 128 previously encoded neighboring points can be used to form the attribute predictor according to the Hilbert order.
[0058] If there are less than 128 code points before the current code point, all such code points will be used as candidates to form the attribute predictor. Among up to 128 previously coded points, M points are selected using the M closest "distances" between these code points and the current point. As an example, the distance d2 is defined as follows, other distance metrics can also be used.
[0059] d2=|x1-x3|+|y1-y3|+|z1-z3| (2)
[0060] Where (x1, y1, z1) and (x3, y3, z3) are the coordinates of the current point and the pre-selected point along the Hilbert order, respectively. Once the M nearest points are selected, a weighted average of the attributes from these M points is formed as a predictor to encode the attributes of the current point.
[0061] Points that are known to share the same face / line / point with the current point are close to the current point. Another technique is to consider these points as predictors.
[0062] The residual is defined as the difference in property value between the current point and its predictor. Depending on the application, PCC can be lossless or lossy. Therefore, the residual may or may not be quantized by using a predefined quantization process. In the present invention, the quantized or unquantized residual is referred to as a level. The level can be a signed integer and will be encoded into the bitstream.
[0063] [Color level coding]
[0064] Each point has three color attributes, which come from the three color components. If the levels of all three color components are zero, the point is called a zero-level point. Otherwise, if there is at least one non-zero level for the color component of the point, the point is called a non-zero-level point. In the current GPCC, the number of consecutive zero-level points is called the zero-run length. The zero-run length value and the level of the non-zero-level points are encoded into the bitstream.
[0065] More specifically, on the encoding side, before encoding the first point, the zero run length value is set to zero. Starting from the first point along the predefined encoding order, the residuals between the three color predictors and their corresponding color attributes for the current point can be obtained. Then, the corresponding levels of the three components of the current point can also be obtained. If the current point is a zero-level point, the zero run length value will be increased by 1, and the process continues to the next point. If the current point is a non-zero-level point, the zero run length value will be encoded first, followed by the three color levels of the non-zero-level point. After the level encoding of the non-zero-level point, the zero run length value will be reset to zero, and the process continues to the next point until all points are completed.
[0066] On the decoding side, the zero run length value is first decoded and the three color levels corresponding to the number of zero run length points are set to zero. Then, the levels of non-zero level points are decoded, followed by the next zero run length value. This process continues until all points are decoded.
[0067] For non-zero level points, at least one of the three components has a non-zero level. Several one-bit flags plus the remainder of the absolute level can be encoded to indicate the residual level of the color component. The absolute level or the absolute level of the color residual minus 1 can be encoded and is named as the encoded level in the rest of the invention.
[0068] [Encoder]
[0069] Figure 5 Schematic diagram of the hardware structure of an encoder according to an embodiment of the present invention. Figure 5 , the encoder 500 includes a processor 510, a storage device 520, a communication interface 530 and a data bus 540. The processor 510 is electrically connected to the storage device 520 and the communication interface 530 through the data bus 540. In an embodiment of the present invention, the storage device 520 can store relevant instructions and can also store the relevant image encoder of the algorithm. The processor 510 can receive a bit stream from the communication interface 530. The processor 510 can execute the relevant image encoder and / or relevant instructions to implement the encoding method of the present invention. In an embodiment of the present invention, the encoder 500 can be implemented by one or more personal computers (PC), one or more service computers and one or more workstation computers, or composed of multiple computing devices, but the present invention is not limited thereto. In one embodiment of the present invention, the encoder 500 may include more processors for executing relevant image encoders and / or relevant instructions to implement the image data processing method of the present invention. In an embodiment of the present invention, the decoder 500 can implement Figure 1 G-PCC coding method.
[0070] In an embodiment of the present invention, the processor 510 may include, for example, a central processing unit (CPU), a graphics processing unit (GPU) or other programmable general or special microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), programmable logic devices (PLD), other similar processing circuits or combinations of these devices. In an embodiment of the present invention, the storage device 520 may be a non-transitory computer-readable recording medium, such as a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a non-volatile memory (NVM), but the present invention is not limited thereto. In one embodiment of the present invention, the relevant image encoder and / or relevant instructions may also be stored in a non-transitory computer-readable recording medium of one device and executed by a processor of another device. The communication interface 530 is, for example, a network card supporting a wired network connection such as Ethernet, a wireless network card supporting wireless communication standards such as Institute of Electrical and Electronics Engineers (IEEE) 802.11n / b / g / ac / ax / be, or any other network connection device, but the embodiment is not limited thereto. The communication interface 530 is configured to retrieve point cloud data. In an embodiment of the present invention, the processor 510 may encode the point cloud data to generate a corresponding bit stream.
[0071] Figure 6 is a schematic diagram of an example of a point cloud sampling method according to an embodiment of the present invention. Figure 7 is a schematic diagram of another example of a point cloud sampling method according to an embodiment of the present invention. Figure 6 , Figure 5 The encoder 500 may be applied to encode point cloud data sampled by, for example, a light detection and ranging (LiDAR) acquisition system 600 (but the present invention is not limited thereto). The LiDAR acquisition system 600 may include a rotating head 610, which may include a plurality of vertically arranged lasers. Figure 6 As shown, the LiDAR acquisition system 600 can sample the reflectivity of the light emitted by the vertically arranged laser in the rotating head 610 to obtain point cloud data. The captured point cloud is as follows Figure 6 The cylindrical shape shown, where the points can be represented in a cylindrical coordinate system with radial, azimuth, and elevation direction sampling with a limited range of elevation angles. Figure 7 In addition to the above cylindrical sampling, the points sampled in azimuth and elevation directions are also distributed in the direction of the light. Figure 7 As shown, the laser (at point 701) can sample multiple points 702. Because the points 702 are in the same azimuth and elevation directions, the Euclidean distance between adjacent points in each direction increases as the radial distance increases. That is, the sampling distance may be uneven, but the present invention is not limited thereto.
[0072] Figure 8 is a flowchart of an encoding method according to an embodiment of the present invention. Figure 5 and Figure 8 , the encoder 500 can be used for Figure 6 and Figure 7 The geometric information and attribute information in the point cloud data of the above example are encoded. After the geometric information is encoded, the three-dimensional point cloud cube can be transformed into a one-dimensional array using Morton or Hilbert or any other code / order. In other words, the three-dimensional coordinates (x, y, z) of the point will be transformed into a one-dimensional array. Each position in the cube will have a corresponding Morton or Hilbert code, but some positions may not have any corresponding point cloud attributes. Some points may be empty. The attribute encoding will follow the predefined Morton or Hilbert order. A predictor can be generated from the previously encoded point in Morton or Hilbert order. The attribute difference between the current point and its predictor is encoded into the bit stream. At this point, since all values of the coordinates transformed to the one-dimensional array must be positive numbers to complete the coordinate transformation, the encoder 500 can perform the following steps S810 to S840.
[0073] During attribute encoding, the encoder 500 may perform the following steps S810 to S840. In step S810, the processor 510 may obtain original three-dimensional coordinates (e.g., (x_con, y_con, z_con)). In an embodiment of the present invention, the original three-dimensional coordinates may be Cartesian coordinates and may be used to describe a point in a point cloud. The original three-dimensional coordinates may include three non-negative integers in Cartesian to represent the current point. In step S820, the processor 510 may transform the original three-dimensional coordinates into transformed three-dimensional coordinates. In an embodiment of the present invention, the coordinate transformation may be performed by a predefined function (e.g., func (x_org, y_org, z_org, paras)), wherein the input variables of the coordinate transformation are Cartesian coordinates (x_org, y_org and z_org) and given parameters (paras), so that the output of the coordinate transformation may be transformed three-dimensional coordinates (e.g., (x_con, y_con, z_con)). It should be noted that the transformed three-dimensional coordinates (e.g., (x_con, y_con, z_con)) may include one or more negative values, but the present invention is not limited thereto. In one embodiment of the present invention, a predefined function (e.g., func(x_org, y_org, z_org, paras)) may be used to perform the coordinate system transformation of the following formula (1). In the following formula (1), the original three-dimensional coordinates may be (x, y, z) (i.e., (x_org, y_org, z_org)), and the transformed three-dimensional coordinates may be (u, v, w) (i.e., (x_con, y_con, z_con)), wherein arctan(y / x) is the inverse function of the tangent function with input (y / x), and arctan(z / u) is the inverse function of the tangent function with input (z / u).
[0074]
[0075] In step S830, the processor 510 may adjust the transformed three-dimensional coordinates (e.g., (x_con, y_con, z_con)) to non-negative three-dimensional coordinates (e.g., (x_con', y_con', z_con')). In step S840, the processor 510 may transform the non-negative three-dimensional coordinates (e.g., (x_con', y_con', z_con')) into a one-dimensional array. In an embodiment of the present invention, the one-dimensional array is a Morton array or a Hilbert array, but the present invention is not limited thereto. Therefore, the encoder 500 can effectively transform the non-negative three-dimensional coordinates (e.g., (x_con', y_con', z_con')) into a one-dimensional array for subsequent encoding.
[0076] In one embodiment of the present invention, the processor 510 may determine the transformed three-dimensional coordinates (eg, (x_con, y_con, z_con)) according to the following formula (2).
[0077]
[0078] Specifically, according to the above formula (2), the processor 510 can determine whether each value of the transformed three-dimensional coordinates (e.g., (x_con, y_con, z_con)) is a negative value. In response to at least one value of the transformed three-dimensional coordinates (e.g., (x_con, y_con, z_con)) being a negative value, the processor 510 can clamp at least one value of the transformed three-dimensional coordinates (e.g., (x_con, y_con, z_con)) to zero to obtain a non-negative three-dimensional coordinate (e.g., (x_con', y_con', z_con')).
[0079] In another embodiment of the present invention, the processor 510 may transform the original three-dimensional coordinates (x_org, y_org, and z_org) into transformed three-dimensional coordinates by a predefined function (e.g., func(x_org, y_org, z_org, paras)). The transformed three-dimensional coordinates may include a first intermediate value (e.g., x_intermediate), a second intermediate value (e.g., y_intermediate), and a third intermediate value (e.g., z_intermediate). The first intermediate value (e.g., x_intermediate), the second intermediate value (e.g., y_intermediate), and the third intermediate value (e.g., z_intermediate) may be intermediate results given by the predefined function (e.g., func(x_org, y_org, z_org, paras)) as described above. The processor 510 may perform a scaling operation to adjust the transformed three-dimensional coordinates (e.g., (x_intermediate, y_intermediate, z_intermediate)) to non-negative three-dimensional coordinates (e.g., (x_con', y_con', z_con')) according to the following formula (3).
[0080]
[0081] Specifically, according to the above formula (3), the processor 510 may multiply the first intermediate value (e.g., x_intermediate) by the scaling value (e.g., SC) and add the first offset value (e.g., offset_x) to obtain the first value of the non-negative three-dimensional coordinate (e.g., x_con'). The processor 510 may multiply the second intermediate value (e.g., y_intermediate) by the scaling value (e.g., SC) and add the second offset value (e.g., offset_y) to obtain the second value of the non-negative three-dimensional coordinate (e.g., y_con'). The processor 510 may multiply the third intermediate value (e.g., z_intermediate) by the scaling value (e.g., SC) and add the third offset value (e.g., offset_z) to obtain the third value of the non-negative three-dimensional coordinate (e.g., z_con'). It should be noted that the scaling value (e.g., SC), the first offset value (e.g., offset_x), the second offset value (e.g., offset_y), and the third offset value (e.g., offset_z) are given parameters according to the original three-dimensional coordinates (x_org, y_org, and z_org). The scaling value (eg, SC), the first offset value (eg, offset_x), the second offset value (eg, offset_y), and the third offset value (eg, offset_z) are selected to ensure that non-negative three-dimensional coordinates (x_con', y_con', z_con') do not have negative values.
[0082] In another embodiment of the present invention, spherical coordinates may be used to encode the attributes of a point cloud collected by, for example, a LiDAR collection system for use in a predictive transform or up-dimensional transform in MPEG G-PCC (e.g., indicated by pherical_coord_flag in the bitstream). The decoded spherical coordinates are first scaled according to a scaling factor specified in an attribute parameter (e.g., indicated by attr_coord_scale in the bitstream). Thus, the included three-dimensional coordinates may be spherical coordinates (e.g., indicated by point k’i The scaling operation can be specified as the following formula (4).
[0083] scalePoint k’i =(point k’i - min k )* S k + 128 >> 8 formula (4)
[0084] According to formula (4), k is the axis index (k is in {0, 1, 2}), i is the point index in the decoding order, point k’i Represents spherical coordinates, scalePoint k’i represents the scaled spherical coordinates, Sk is an integer representing a fixed-point scaling factor with 8 decimal digits of precision, min k is a scaling offset value. In response to spherical coordinates being used for attribute encoding and the scaling offset flag in the attribute parameter being true, the scaling offset value inherits the corresponding syntax value in the attribute parameter. The processor 510 may k’i ) minus the scaling offset to get the difference (point k’i -min k ), the difference (point k’i -min k ) and the fixed-point scaling factor (S k ) and add it to 128 to get the result ((point k’i -min k )*S k +128). Then, the processor 510 may process the result (point k’i -min k )*S k +128) performs an 8-bit right shift, which is equivalent to dividing by 256 to obtain the spherical coordinates (scalePoint k’i ). Therefore, the processor 510 can convert the scaled spherical coordinates (scalePoint k’i ) is transformed into a one-dimensional array for attribute encoding, where all values of the scaled spherical coordinates (scalePoint k’i ) is a positive number.
[0085] In addition, the processor 510 can further ensure that all values of the scaled spherical coordinates (e.g., (r_sca, θ_sca, ψ_sca)) are positive. The processor 510 can also adjust the scaled spherical coordinates (e.g., (r_sca, θ_sca, ψ_sca)) to non-negative three-dimensional coordinates (e.g., (r_sca', θ_sca', ψ_sca')). The processor 510 can determine the scaled spherical coordinates (e.g., (r_sca, θ_sca, ψ_sca)) according to the following formula (5).
[0086]
[0087] Specifically, according to the following formula (5), the processor 510 can determine whether each value of the scaled spherical coordinates (e.g., (r_sca, θ_sca, ψ_sca)) is a negative value. In response to at least one value of the scaled spherical coordinates (e.g., (r_sca, θ_sca, ψ_sca)) being a negative value, the processor 510 can clamp at least one value of the scaled spherical coordinates (e.g., (x_con, y_con, z_con)) to zero to obtain non-negative three-dimensional coordinates (e.g., (r_sca', θ_sca', ψ_sca')).
[0088] [Decoder]
[0089] Fig. 9 Schematic diagram of the hardware structure of a decoder according to an embodiment of the present invention. Fig. 9 , the decoder 900 includes a processor 910, a storage device 920, a communication interface 930 and a data bus 940. The processor 910 is electrically connected to the storage device 920 and the communication interface 930 through the data bus 940. In an embodiment of the present invention, the storage device 920 can store relevant instructions and can also store algorithms of relevant image decoders. The processor 910 can receive a bit stream from the communication interface 930. The processor 910 can execute relevant image decoders and / or relevant instructions to implement the decoding method of the present invention. In an embodiment of the present invention, the decoder 900 can be implemented by one or more personal computers (PCs), one or more service computers and one or more workstation computers, or composed of multiple computing devices, but the present invention is not limited thereto. In one embodiment of the present invention, the decoder 900 may include more processors for executing relevant image decoders and / or relevant instructions to implement the image data processing method of the present invention. In an embodiment of the present invention, the decoder 900 can implement Figure 4 G-PCC decoding method.
[0090] In an embodiment of the present invention, the processor 910 may include, for example, a central processing unit (CPU), a graphics processing unit (GPU) or other programmable general or special microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), programmable logic devices (PLD), other similar processing circuits or combinations of these devices. In an embodiment of the present invention, the storage device 920 may be a non-transitory computer-readable recording medium, such as a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a non-volatile memory (NVM), but the present invention is not limited thereto. In one embodiment of the present invention, the relevant image decoder and / or relevant instructions may also be stored in a non-transitory computer-readable recording medium of one device and executed by a processor of another device. The communication interface 930 is, for example, a network card supporting a wired network connection such as Ethernet, a wireless network card supporting wireless communication standards such as the Institute of Electrical and Electronics Engineers (IEEE) 802.11n / b / g / ac / ax / be, or any other network connection device, but the embodiment is not limited thereto. The communication interface 530 is configured to retrieve a bitstream. In an embodiment of the present invention, the bitstream may include encoded values of a geometry bitstream and an attribute bitstream. The attribute bitstream may also include encoded values of a color level, a reflectivity level, and / or a zero run length. The processor 910 may be configured to decode the bitstream to obtain corresponding point cloud data.
[0091] refer to Figure 8 and Fig. 9During bitstream decoding, the decoder 900 may also perform the following steps S810 to S840 to perform coordinate transformation. In step S810, the processor 910 may obtain the original three-dimensional coordinates. In step S820, the processor 910 may transform the original three-dimensional coordinates into transformed three-dimensional coordinates. In step S830, the processor 910 may adjust the transformed three-dimensional coordinates to non-negative three-dimensional coordinates. In step S840, the processor 910 may transform the non-negative three-dimensional coordinates into a one-dimensional array. In an embodiment of the present invention, the one-dimensional array may be a Morton array or a Hilbert array, but the present invention is not limited thereto. Therefore, the decoder 900 may effectively transform the non-negative three-dimensional coordinates into a one-dimensional array for subsequent encoding. In addition, in an embodiment of the present invention, the relevant calculation details and judgment methods may refer to the above Figures 5 to 8 The description of the embodiments will not be repeated here.
[0092] In summary, the G-PCC system applying the above improved encoding method and the above improved decoding method can achieve good encoding and decoding performance for cylindrical sampling, for example, it can ensure that all values used for transformation to a one-dimensional array are positive numbers.
[0093] It will be apparent to those skilled in the art that various modifications and variations may be made to the disclosed embodiments without departing from the scope or spirit of the present disclosure. In view of the foregoing, the present disclosure is intended to cover these modifications and variations as long as they fall within the scope of the appended claims and their equivalents.
[0094] Reference Symbols List
[0095] 500: Encoder
[0096] 510, 910: Processor
[0097] 520, 920: Storage devices
[0098] 530, 930: Communication interface
[0099] 540, 940: Data bus
[0100] 600: LiDAR acquisition system
[0101] 610: Rotating head
[0102] 701, 702: Point
[0103] 900: Decoder
[0104] B1~B8: Cube
[0105] S102, S104, S106, S108, S110, S112, S114, S116, S118, S120, S122, S124, S126, S402,
[0106] S404, S406, S408, S410, S412, S414, S416, S418, S420, S422, S810, S820, S830,
[0107] S840: Steps
Claims
1. A coding method, comprising: During attribute encoding, the original three-dimensional coordinates are obtained; transforming the original three-dimensional coordinates into transformed three-dimensional coordinates; adjusting the transformed three-dimensional coordinates to non-negative three-dimensional coordinates; and Transform the non-negative three-dimensional coordinates into a one-dimensional array.
2. The encoding method according to claim 1, wherein: The step of adjusting the transformed three-dimensional coordinates to the non-negative three-dimensional coordinates comprises: determining whether each value of the transformed three-dimensional coordinate is negative; and In response to at least one value of the transformed three-dimensional coordinate being a negative value, the at least one value of the transformed three-dimensional coordinate is clamped to zero to obtain the non-negative three-dimensional coordinate.
3. The encoding method according to claim 1, wherein: The step of adjusting the transformed three-dimensional coordinates to the non-negative three-dimensional coordinates is a scaling operation.
4. The encoding method according to claim 3, wherein: The transformed three-dimensional coordinates include a first intermediate value, a second intermediate value, and a third intermediate value, and the scaling operation includes: The first intermediate value is multiplied by a scaling value and added to a first offset value to obtain a first value of the non-negative three-dimensional coordinate; The second intermediate value is multiplied by the scaling value and added to the second offset value to obtain a second value of the non-negative three-dimensional coordinate; and The third intermediate value is multiplied by the scaling value and added to the third offset value to obtain a third value of the non-negative three-dimensional coordinate.
5. The encoding method according to claim 3, wherein: The transformed three-dimensional coordinates are spherical coordinates, and the scaling operation is specified as follows: scalePoint k’i =(point k’i -min k )*S k +128>>8 Where k is the axis index (k is in {0, 1, 2}), i is the point index in decoding order, Point k’i Represents the spherical coordinates, scalePoint k’i represents the scaled spherical coordinates, S k is an integer representing a fixed-point scaling factor with 8 decimal digits of precision, and the min k is the scaling offset value.
6. The encoding method according to claim 5, wherein: In response to the spherical coordinates being used for attribute encoding and a scale offset flag in an attribute parameter being true, the scale offset value inherits a corresponding syntax value in the attribute parameter.
7. The encoding method according to claim 1, wherein: The one-dimensional array is a Morton array.
8. The encoding method according to claim 1, wherein: The one-dimensional array is a Hilbert array.
9. An encoder comprising: a communication interface configured to receive point cloud data; a storage device configured to store the bitstream; as well as A processor electrically connected to the communication interface and the storage device and configured to encode the point cloud data to generate the bitstream, wherein: During attribute encoding, the processor is configured to obtain original three-dimensional coordinates, and the processor is configured to transform the original three-dimensional coordinates into transformed three-dimensional coordinates, The processor is configured to adjust the transformed three-dimensional coordinates to non-negative three-dimensional coordinates, and the processor is configured to transform the non-negative three-dimensional coordinates to a one-dimensional array.
10. The encoder according to claim 9, wherein: The processor is configured to determine whether each value of the transformed three-dimensional coordinate is a negative value, and In response to at least one value of the transformed three-dimensional coordinate being a negative value, the processor is configured to clamp the at least one value of the transformed three-dimensional coordinate to zero to obtain the non-negative three-dimensional coordinate.
11. The encoding method according to claim 9, wherein: The processor is configured to perform a scaling operation to adjust the transformed three-dimensional coordinates to the non-negative three-dimensional coordinates.
12. The encoding method according to claim 11, wherein: The transformed three-dimensional coordinates include a first intermediate value, a second intermediate value, and a third intermediate value, The processor is configured to multiply the first intermediate value by the scaling value and add the value to the first offset value to obtain the first value of the non-negative three-dimensional coordinate, the processor is configured to multiply the second intermediate value by the scaling value and add the value to the second offset value to obtain the second value of the non-negative three-dimensional coordinate, and the processor is configured to multiply the third intermediate value by the scaling value and add the value to the third offset value to obtain the third value of the non-negative three-dimensional coordinate.
13. The encoding method according to claim 11, wherein: The transformed three-dimensional coordinates are spherical coordinates, and the scaling operation is specified as follows: scalePoint k’i =(point k’i -min k )*S k +128>>8 Where k is the axis index (k is in {0, 1, 2}), i is the point index in decoding order, Point k’i Represents the spherical coordinates, scalePoint k’i represents the scaled spherical coordinates, S k is an integer representing a fixed-point scaling factor with 8 decimal digits of precision, and the min k is the scaling offset value.
14. The encoding method according to claim 13, wherein: In response to the spherical coordinates being used for attribute encoding and a scale offset flag in an attribute parameter being true, the scale offset value inherits a corresponding syntax value in the attribute parameter.
15. The encoding method according to claim 9, wherein: The one-dimensional array is a Morton array.
16. The encoding method according to claim 9, wherein: The one-dimensional array is a Hilbert array.
17. A decoding method, comprising: Get the original 3D coordinates; transforming the original three-dimensional coordinates into transformed three-dimensional coordinates; Adjusting the transformed three-dimensional coordinates to non-negative three-dimensional coordinates; as well as Transform the non-negative three-dimensional coordinates into a one-dimensional array.
18. The decoding method according to claim 17, wherein: The step of adjusting the transformed three-dimensional coordinates to the non-negative three-dimensional coordinates comprises: determining whether each value of the transformed three-dimensional coordinate is negative; and In response to at least one value of the transformed three-dimensional coordinate being a negative value, the at least one value of the transformed three-dimensional coordinate is clamped to zero to obtain the non-negative three-dimensional coordinate.
19. The decoding method according to claim 17, wherein: The step of adjusting the transformed three-dimensional coordinates to the non-negative three-dimensional coordinates is a scaling operation.
20. The decoding method according to claim 19, wherein: The transformed three-dimensional coordinates include a first intermediate value, a second intermediate value, and a third intermediate value, and the scaling operation includes: The first intermediate value is multiplied by a scaling value and added to a first offset value to obtain a first value of the non-negative three-dimensional coordinate; The second intermediate value is multiplied by the scaling value and added to the second offset value to obtain a second value of the non-negative three-dimensional coordinate; and The third intermediate value is multiplied by the scaling value and added to the third offset value to obtain a third value of the non-negative three-dimensional coordinate.
21. The decoding method according to claim 20, wherein: The transformed three-dimensional coordinates are spherical coordinates, and the scaling operation is specified as follows: scalePoint k’i =(point k’i -min k )*S k +128>>8 Where k is the axis index (k is in {0, 1, 2}), i is the point index in decoding order, Point k’i Represents the spherical coordinates, scalePoint k’i represents the scaled spherical coordinates, S k is an integer representing a fixed-point scaling factor with 8 decimal digits of precision, and the min k is the scaling offset value.
22. The decoding method according to claim 21, wherein: In response to the spherical coordinates being used for attribute encoding and a scale offset flag in an attribute parameter being true, the scale offset value inherits a corresponding syntax value in the attribute parameter.
23. The decoding method according to claim 17, wherein: The one-dimensional array is a Morton array.
24. The decoding method according to claim 17, wherein: The one-dimensional array is a Hilbert array.
25. A decoder comprising: a communication interface configured to receive point cloud data; a storage device configured to store the bitstream; as well as A processor electrically connected to the communication interface and the storage device and configured to encode the point cloud data to generate the bitstream, wherein: During attribute encoding, the processor is configured to obtain original three-dimensional coordinates, and the processor is configured to transform the original three-dimensional coordinates into transformed three-dimensional coordinates, The processor is configured to adjust the transformed three-dimensional coordinates to non-negative three-dimensional coordinates, and the processor is configured to transform the non-negative three-dimensional coordinates to a one-dimensional array.
26. The decoder of claim 25, wherein: The processor is configured to determine whether each value of the transformed three-dimensional coordinate is a negative value, and In response to at least one value of the transformed three-dimensional coordinate being a negative value, the processor is configured to clamp the at least one value of the transformed three-dimensional coordinate to zero to obtain the non-negative three-dimensional coordinate.
27. The decoder of claim 25, wherein: The processor is configured to perform a scaling operation to adjust the transformed three-dimensional coordinates to the non-negative three-dimensional coordinates.
28. The decoder of claim 27, wherein: The transformed three-dimensional coordinates include a first intermediate value, a second intermediate value, and a third intermediate value, The processor is configured to multiply the first intermediate value by a scaling value and add the value to a first offset value to obtain a first value of the non-negative three-dimensional coordinate, the processor is configured to multiply the second intermediate value by the scaling value and add the value to a second offset value to obtain a second value of the non-negative three-dimensional coordinate, and the processor is configured to multiply the third intermediate value by the scaling value and add the value to a third offset value to obtain a third value of the non-negative three-dimensional coordinate.
29. The decoder of claim 27, wherein: The transformed three-dimensional coordinates are spherical coordinates, and the scaling operation is specified as follows: scalePoint k’i =(point k’i -min k )*S k +128>>8 Where k is the axis index (k is in {0, 1, 2}), i is the point index in decoding order, Point k’i Represents the spherical coordinates, scalePoint k’i represents the scaled spherical coordinates, S k is an integer representing a fixed-point scaling factor with 8 decimal digits of precision, and the min k is the scaling offset value.
30. The decoder of claim 29, wherein: In response to the spherical coordinates being used for attribute encoding and a scale offset flag in an attribute parameter being true, the scale offset value inherits a corresponding syntax value in the attribute parameter.
31. The decoder of claim 25, wherein: The one-dimensional array is a Morton array.
32. The decoder of claim 25, wherein: The one-dimensional array is a Hilbert array.