WO2019140973A1 - 编码方法、解码方法和装置 - Google Patents

编码方法、解码方法和装置 Download PDF

Info

Publication number
WO2019140973A1
WO2019140973A1 PCT/CN2018/112215 CN2018112215W WO2019140973A1 WO 2019140973 A1 WO2019140973 A1 WO 2019140973A1 CN 2018112215 W CN2018112215 W CN 2018112215W WO 2019140973 A1 WO2019140973 A1 WO 2019140973A1
Authority
WO
WIPO (PCT)
Prior art keywords
point cloud
cloud blocks
side information
blocks
information
Prior art date
Application number
PCT/CN2018/112215
Other languages
English (en)
French (fr)
Inventor
张德军
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to KR1020207023576A priority Critical patent/KR102376114B1/ko
Priority to JP2020539840A priority patent/JP7127137B2/ja
Priority to BR112020014511-4A priority patent/BR112020014511A2/pt
Priority to CN201880002217.2A priority patent/CN110278719B/zh
Priority to EP18901744.5A priority patent/EP3737100A4/en
Publication of WO2019140973A1 publication Critical patent/WO2019140973A1/zh
Priority to US16/930,655 priority patent/US11388446B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/001Model-based coding, e.g. wire frame
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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
    • H04N19/17Methods 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 the unit being an image region, e.g. an object
    • H04N19/176Methods 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 the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Definitions

  • the embodiments of the present invention relate to the field of image processing technologies, and in particular, to an encoding method, a decoding method, and an apparatus.
  • point cloud or point cloud data refers to a point data set of the appearance surface of the product obtained by the measuring instrument.
  • point cloud data In the face of massive point cloud data, how to effectively compress, encode, store and transmit point cloud data is very important.
  • a common processing method is: first, segmenting the point cloud data of the current frame to obtain a plurality of point cloud blocks (also called patches). Projecting a plurality of point cloud blocks to form a plurality of two-dimensional image blocks. Packing operations (also known as packing) on all 2D image blocks to form depth maps and texture maps (if point cloud data has color information). Then, the depth map and the texture map are encoded based on image or video encoding, and the side information of the point cloud block is encoded.
  • This method makes full use of the mature coding advantages and can achieve high coding efficiency.
  • the embodiment of the present application provides an encoding method, a decoding method, and a device, which improve encoding compression performance.
  • an embodiment of the present application provides an encoding method, where the method includes: determining X first point cloud blocks in M first point cloud blocks of a current frame, and acquiring side information of the X first point cloud blocks. And the side information of the X second point cloud blocks, according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks, the X group side information difference values are obtained, and the X group side information difference values are performed. coding.
  • the X-group side information obtained from the side information of the X first point cloud blocks and the side information of the X second point cloud blocks is obtained by using the correlation between the two frames of point cloud data before and after.
  • the difference is encoded to reduce the coding loss and improve the coding compression performance.
  • the first coded bit number corresponding to the side information of the Y first point cloud blocks is determined according to the maximum value A.
  • the first coded bit number is encoded.
  • the side information of the Y first point cloud blocks is encoded using the first number of coded bits.
  • the coding method provided by the possible implementation determines the number of bits required for coding according to the side information of the remaining Y first point cloud blocks, and avoids determining the required bits of coding according to the side information of all the M first point cloud blocks.
  • the number reduces the amount of data processing data, improves the efficiency and rationality of the encoding, and improves the encoding performance.
  • the method further includes: acquiring the remaining Y of the M first point cloud blocks.
  • the maximum value Bk is greater than or equal to the maximum value Ak, it is determined that the bit corresponding to the kth side information in the first identification information is the first symbol; if the maximum value Bk is less than the maximum value Ak And determining, in the first identification information, the bit corresponding to the kth side information is the second symbol; if each bit in the first identification information is the first symbol, determining that the second identification information is the first symbol, And encoding the second identification information; determining, according to the maximum value Bk, the number of second coding bits corresponding to the kth side information of the Y first point cloud blocks, and using the second coding bit number to the Y first point cloud blocks
  • the bit corresponding to the kth side information in the identification information is the second symbol, and the third coded bit corresponding to the kth side information of the Y first point cloud blocks is determined according to the maximum value Ak, and the third coded bit is determined.
  • the coding method by comparing the maximum value of the side information of the X first point cloud blocks with the maximum value of the side information of the Y first point cloud blocks, the Y firsts can be determined.
  • the number of coded bits corresponding to the side information of the point cloud block When the side information of the Y first point cloud blocks is encoded by the number of coded bits determined according to the maximum value of the side information of the X first point cloud blocks, the code stream is further compressed, and the coding efficiency and the compression performance are improved.
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to Qik matches the i-th second point cloud block, wherein the kth first point cloud block is j first points that have not yet matched One of the clouds.
  • determining the first X points in the M first point cloud blocks of the current frame includes: determining X first point cloud blocks in the O first point cloud blocks, and the O first first point cloud blocks are the first point cloud blocks matching the N second point cloud blocks, O ⁇ X .
  • the associated value Qij is a quotient of the first reference value and the second reference value.
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix.
  • the first reference value is a number of pixels included in an intersection area of the effective area of the first occupation matrix and the effective area of the second occupation matrix
  • the second reference value is an effective area of the first occupation matrix and a second occupation matrix. The number of pixels contained in the union area of the effective area.
  • the effective area of the first occupied matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupied matrix is the i-th second point cloud block according to the projection.
  • the area occupied by the direction after the two-dimensional plane is projected.
  • the first occupied matrix is the matrix area corresponding to the effective area of the first occupied matrix
  • the second occupied matrix is the matrix area corresponding to the effective area of the second occupied matrix.
  • the method before determining the preset matching relationship, the method further includes: sorting the M first point cloud blocks.
  • the matching speed of the first point cloud block and the second point cloud block can be improved, thereby improving the encoding processing speed.
  • the first point cloud block and the second point cloud block matching with the same order are set, the matching relationship is simplified, and the coding speed is improved.
  • the X group side information difference value is obtained according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks, including: The difference between the side information of the X first point cloud blocks and the side information of the X second point cloud blocks matching the X first point cloud blocks is determined as the X group side information difference value.
  • the method further includes: obtaining matching information, where the matching information indicates a matching relationship between the X first point cloud blocks and the X second point cloud blocks.
  • the matching information is encoded.
  • the edge information of the first point cloud block and the second point cloud block of the same order are correspondingly subtracted to obtain the X group side information difference, which simplifies the complexity of the difference calculation and improves The encoding speed.
  • the encoding method provided by the possible embodiment determines the difference between the side information of the X first point cloud blocks and the side information of the X second point cloud blocks matching the X first point cloud blocks. For the X group side information difference, the accuracy of the coding is improved, and the coding performance is improved.
  • the method further includes: determining, according to M, a fourth number of coded bits. X is encoded using the fourth number of coded bits.
  • the embodiment of the present application provides a decoding method, which includes: obtaining, according to a code stream, an X group side information difference value of X first point cloud blocks of a current frame. Get the side information of the X second point cloud blocks. The side information of the X first point cloud blocks is obtained according to the X group side information difference value and the X second point cloud block side information.
  • the method further includes: obtaining, according to the code stream, a first coded bit number, where the first coded bit number is an encoding device according to the M first points
  • the side information of the Y first point cloud blocks is obtained according to the code stream by using the first coded bit number.
  • the method further includes: obtaining second identification information according to the code stream;
  • the information is the first symbol, and the second coded bit number is determined according to the maximum value Bk of the kth side edge information of the X first point cloud blocks, and the M first first cloud blocks are obtained according to the code stream by using the second coded bit number.
  • the kth side information of the remaining Y first point cloud blocks, k 1, . . .
  • the second identification information is the second symbol, the first identification information is obtained; if the first identification information is the same as the kth
  • the bit corresponding to the side information is the first symbol, and the second coded bit number is determined according to the maximum value Bk of the kth side edge information of the X first point cloud blocks, and the M number is obtained according to the code stream by using the second coded bit number.
  • the kth side information of the remaining Y first cloud blocks in the first cloud block, k 1, . . .
  • the method further includes: determining, according to M, a fourth number of coded bits. X is obtained from the code stream using the fourth number of coded bits.
  • an embodiment of the present application provides an encoding apparatus, including: a determining module, an obtaining module, and an encoding module.
  • the determining module is configured to determine X first point cloud blocks in the M first point cloud blocks of the current frame.
  • the obtaining module is configured to obtain side information of the X first point cloud blocks and side information of the X second point cloud blocks.
  • the encoding module is configured to obtain the X group side information difference value according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks, and encode the X group side information difference values.
  • the encoding module is further configured to: determine, according to the maximum value A, the first number of coded bits corresponding to the side information of the Y first point cloud blocks. The first coded bit number is encoded. The side information of the Y first point cloud blocks is encoded using the first number of coded bits.
  • the acquiring module is further configured to: acquire the remaining one of the M first point cloud blocks.
  • Z kinds of side information of Y first point cloud blocks, Y MX.
  • Obtaining a maximum value Bk of the kth side information of the X first point cloud blocks and a maximum value Ak, k 1, . . . , Z of the kth side information of the Y first point cloud blocks.
  • the Y first point cloud blocks are determined according to the maximum value Ak
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to Qik matches the i-th second point cloud block, wherein the kth first point cloud block is j first points that have not yet matched One of the clouds.
  • the determining module is specifically configured to: determine the X numbers in the first one point cloud blocks.
  • O first point cloud blocks are first point cloud blocks matching N second point cloud blocks, O ⁇ X.
  • the associated value Qij is a quotient of the first reference value and the second reference value.
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix.
  • the first reference value is a number of pixels included in an intersection area of the effective area of the first occupation matrix and the effective area of the second occupation matrix
  • the second reference value is an effective area of the first occupation matrix and a second occupation matrix. The number of pixels contained in the union area of the effective area.
  • the effective area of the first occupied matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupied matrix is the i-th second point cloud block according to the projection.
  • the area occupied by the direction after the two-dimensional plane is projected.
  • the first occupied matrix is the matrix area corresponding to the effective area of the first occupied matrix
  • the second occupied matrix is the matrix area corresponding to the effective area of the second occupied matrix.
  • the preset matching relationship includes: according to an arrangement order of the X first point cloud blocks and an arrangement order of the X second point cloud blocks, X pieces
  • the encoding module is specifically configured to: select side information of the X first point cloud blocks and X pieces of the second first point cloud blocks respectively.
  • the difference between the side information of the point cloud block is determined as the X group side information difference value.
  • the obtaining module is further configured to obtain matching information, where the matching information indicates a matching relationship between the X first point cloud blocks and the X second point cloud blocks.
  • the encoding module is also used to encode the matching information.
  • the coding module is specifically configured to: according to the order of the X first point cloud blocks and the order of the X second point cloud blocks, The difference between the side information of the kth first point cloud block in a point cloud block and the side information of the kth second point cloud block in the X second point cloud blocks is determined as the X group side information.
  • the kth group side information difference in the difference, k 1,...,X.
  • the encoding module is further configured to: determine, according to M, a fourth number of coded bits. X is encoded using the fourth number of coded bits.
  • an embodiment of the present application provides a decoding apparatus, including: a decoding module and an obtaining module.
  • the decoding module is configured to obtain, according to the code stream, an X group side information difference value of the X first point cloud blocks of the current frame.
  • the obtaining module is configured to obtain side information of the X second point cloud blocks.
  • the decoding module is further configured to obtain side information of the X first point cloud blocks according to the X group side information difference value and the X second point cloud block side information.
  • the decoding module is further configured to: obtain a first coded bit number according to the code stream, where the first coded bit number is an encoding device according to the M
  • the side information of the Y first point cloud blocks is obtained according to the code stream by using the first coded bit number.
  • the decoding module is further configured to: obtain second identification information according to the code stream;
  • the second identifier information is the first symbol, and the second coded bit number is determined according to the maximum value Bk of the kth side edge information of the X first point cloud blocks, and the M first point clouds are obtained according to the code stream by using the second coded bit number.
  • the kth side information of the remaining Y first cloud blocks in the block, k 1, . . .
  • the second identification information is the second symbol, the first identification information is obtained; if the first identification information is The bit corresponding to the kth side information is the first symbol, and the second coded bit number is determined according to the maximum value Bk of the kth side edge information of the X first point cloud blocks, and the second coded bit number is used according to the code stream.
  • the kth side information of the Y first point cloud blocks remaining in the M first point cloud blocks, k 1, . . .
  • the third coded bit number is obtained according to the code stream, and the kth side edge letter of the Y first point cloud blocks is obtained according to the code stream by using the third coded bit number
  • the decoding module is further configured to: determine, according to the M, a fourth number of coded bits. X is obtained from the code stream using the fourth number of coded bits.
  • the X first point cloud blocks and the X second point cloud blocks have a preset matching relationship, and the X second point cloud blocks are included in a previous frame of the current frame.
  • X is less than or equal to M, and X and M are both positive integers.
  • the side information includes at least one of the following: a minimum value of the X coordinate of the point cloud block in the three-dimensional coordinate system, a minimum value of the Y coordinate of the point cloud block in the three-dimensional coordinate system, and a minimum Z coordinate of the point cloud block in the three-dimensional coordinate system.
  • an embodiment of the present application provides an encoder, where the encoder includes a processor and a memory, where the memory is used to store an instruction, and the processor is configured to execute an instruction stored in the memory, so that the encoder performs the method of the foregoing first aspect. .
  • the encoder of the above fifth aspect may also include a transceiver for communicating with other devices.
  • an embodiment of the present application provides a decoder, where the decoder includes a processor and a memory, where the memory is used to store an instruction, and the processor is configured to execute an instruction stored in the memory, so that the decoder performs the method of the second aspect. .
  • the decoder of the above sixth aspect may also include a transceiver for communicating with other devices.
  • the embodiment of the present application provides a storage medium, comprising: a readable storage medium and a computer program, the computer program being used to implement the method of any of the first aspect or the second aspect.
  • an embodiment of the present application provides a program product, where the program product includes a computer program (ie, an execution instruction), and the computer program is stored in a readable storage medium.
  • At least one processor of the encoder or decoder may read the computer program from a readable storage medium, the at least one processor executing the computer program such that the encoder or decoder implements the first aspect or various embodiments of the second aspect provide Methods.
  • a ninth aspect of the present application provides a chip, the chip being applicable to an encoder, the chip comprising: at least one communication interface, at least one processor, at least one memory, the communication interface, the memory, and the processor are interconnected by a bus
  • the processor invokes a computer program stored in the memory to perform the encoding method provided by the first aspect of the present application.
  • a tenth aspect of the present application provides a chip, the chip being applicable to a decoder, the chip comprising: at least one communication interface, at least one processor, at least one memory, the communication interface, the memory, and the processor are interconnected by a bus
  • the processor invokes a computer program stored in the memory to perform the decoding method provided by the second aspect of the present application.
  • the method further includes:
  • the identification information is the first symbol
  • the identification information corresponding to the kth side information is The second symbol.
  • the method further includes:
  • the Z pieces of identification information corresponding to the Z type information are all the first symbols, determining that the second identification information is a third symbol, and encoding the second identification information into the code stream;
  • the method further includes:
  • the encoding the third coded bit number into the code stream includes:
  • a difference between the number of the third coded bits and the number of bits required for the maximum value Bk is encoded into the code stream.
  • the matching information includes any one of the following:
  • the X index difference values are the index values of the X first point cloud blocks and the index values of the X reference point cloud blocks corresponding to the X first point cloud blocks. The difference between the two.
  • the matching information includes any one of the following:
  • the side information difference value includes at least one of the following:
  • the side information includes at least one of the following:
  • the reference frame of the current frame includes a previous frame of the current frame, or a subsequent frame of the current frame.
  • the method further includes:
  • the second identifier information is the fourth symbol, obtaining Z pieces of identification information corresponding to the Z kinds of side information from the code stream;
  • the method further includes:
  • the method further includes:
  • the difference is a maximum value of the kth side information of the Y first point cloud blocks
  • Bk, k 1, ..., Z;
  • the method further includes:
  • the difference is the first of the Y first point cloud blocks
  • the method further includes:
  • Parsing the code stream to obtain matching information is used to indicate a matching relationship between the X first point cloud blocks and the X reference point cloud blocks;
  • the obtaining side information of the X reference point cloud blocks includes:
  • the matching information includes any one of the following:
  • the X index difference values are the index values of the X first point cloud blocks and the index values of the X reference point cloud blocks corresponding to the X first point cloud blocks. The difference between the two.
  • the matching information includes any one of the following:
  • the side information difference value includes at least one of the following:
  • the side information includes at least one of the following:
  • the acquiring module is further configured to:
  • the identification information is the first symbol
  • the identification information corresponding to the kth side information is The second symbol.
  • the coding module is further configured to:
  • the Z pieces of identification information corresponding to the Z type information are all the first symbols, determining that the second identification information is a third symbol, and encoding the second identification information into the code stream;
  • the coding module is further configured to:
  • the coding module is specifically configured to:
  • a difference between the number of the third coded bits and the number of bits required for the maximum value Bk is encoded into the code stream.
  • the matching information includes any one of the following:
  • the X index difference values are the index values of the X first point cloud blocks and the index values of the X reference point cloud blocks corresponding to the X first point cloud blocks. The difference between the two.
  • the matching information includes any one of the following:
  • the side information difference value includes at least one of the following:
  • the side information includes at least one of the following:
  • the reference frame of the current frame includes a previous frame of the current frame, or a subsequent frame of the current frame.
  • the decoding module is further configured to:
  • the second identifier information is the fourth symbol, obtaining Z pieces of identification information corresponding to the Z kinds of side information from the code stream;
  • the decoding module is further configured to:
  • the decoding module is further configured to:
  • the difference is a maximum value of the kth side information of the Y first point cloud blocks
  • Bk, k 1, ..., Z;
  • the decoding module is further configured to:
  • the difference is the first of the Y first point cloud blocks
  • the decoding module is further configured to:
  • Parsing the code stream to obtain matching information is used to indicate a matching relationship between the X first point cloud blocks and the X reference point cloud blocks;
  • the obtaining module is specifically configured to:
  • the matching information includes any one of the following:
  • the X index difference values are the index values of the X first point cloud blocks and the index values of the X reference point cloud blocks corresponding to the X first point cloud blocks. The difference between the two.
  • the matching information includes any one of the following:
  • the side information difference value includes at least one of the following:
  • the side information includes at least one of the following:
  • the embodiment of the present application provides a method for determining a matching relationship between a point cloud block, including:
  • the determining the X first first cloud blocks according to the M first point cloud blocks and the N reference point cloud blocks includes:
  • the determining the X according to the correlation value between the M first point cloud blocks and the N reference point cloud blocks includes:
  • the j unmatched first point cloud blocks include: in the M first point cloud blocks in the current frame The first point cloud block that does not match the i-1 reference point cloud blocks before the i-th reference point cloud block, and the projection direction is the same as the projection direction of the i-th reference point cloud block; j is smaller than Or equal to M, k is less than or equal to j, and j, k, and M are positive integers;
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to the Qik matches the i-th reference point cloud block, where the kth first point cloud block is One of the j first cloud blocks that have not yet been matched.
  • the associated value is a quotient of the first reference value and the second reference value
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix
  • the first reference value is a number of pixel points included in an intersection area of an effective area of the first occupation matrix and an effective area of the second occupation matrix
  • the second reference value is the first occupation matrix. The number of pixels included in the union area of the effective area and the effective area of the second occupancy matrix
  • the effective area of the first occupation matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupation matrix is the ith second point.
  • the second occupancy matrix is a matrix region corresponding to an area actually occupied by the i-th second point cloud block after being projected on the two-dimensional plane according to a projection direction.
  • the determining the X first first cloud blocks according to the M first point cloud blocks and the N reference point cloud blocks includes:
  • the method further includes:
  • an embodiment of the present application provides an encoding method, including:
  • the matching information is used to indicate a matching relationship between the X first point cloud blocks and the X reference point cloud blocks, where the X reference point cloud blocks are included in a reference frame of the current frame, where X is smaller than Or equal to M, and X and M are both positive integers, and M is the number of first point cloud blocks in the current frame;
  • the matching information is programmed into the code stream.
  • the matching information includes any one of the following:
  • the X index difference values are the index values of the X first point cloud blocks and the index values of the X reference point cloud blocks corresponding to the X first point cloud blocks. The difference between the two.
  • the matching information includes any one of the following:
  • the method further includes:
  • the method further includes: encoding the X into the code stream; or the method further includes: determining, according to the M a number of four coded bits; the X is encoded into the code stream using the fourth number of coded bits.
  • the embodiment of the present application provides a decoding method, including:
  • the matching information is used to indicate a matching relationship between the X first point cloud blocks and the X reference point cloud blocks, where the X indicates that the current frame matches the reference point cloud block a number of first point cloud blocks, the reference point cloud block is included in a reference frame of the current frame, X is less than or equal to M, and X and M are both positive integers, and M represents a number in the current frame The number of clouds;
  • the obtaining the side information of the X first point cloud blocks according to the matching information including:
  • the matching information includes any one of the following:
  • the X index difference values are index values of the X first point cloud blocks and index values of X reference point cloud blocks corresponding to the X first point cloud blocks The difference between the two.
  • the matching information includes any one of the following:
  • the method further includes:
  • Parsing the code stream to obtain an X group side information difference value where the X group side information difference values respectively represent side information of the X first point cloud blocks and side information of the X reference point cloud blocks Difference between
  • the method further includes: parsing the code stream to obtain the X; or, the method further includes: determining, according to the M a number of four coded bits; the code stream is parsed using the fourth number of coded bits to obtain the X.
  • the embodiment of the present application provides a decoding method, including:
  • the second identifier information is the fourth symbol, obtaining Z pieces of identification information corresponding to the Z kinds of side information from the code stream;
  • the identification information corresponding to the k-th side information is the second symbol, obtaining a third number of coding bits from the code stream, and obtaining the first Y points from the code stream by using the third coded bit number
  • the method further includes:
  • the method further includes:
  • the identifier information corresponding to the k-th side information is the first symbol, determining a second number of coded bits according to the maximum value Bk of the k-th side information of the X first point cloud blocks, and using the second code The number of bits obtains the kth side information of the Y first point cloud blocks from the code stream.
  • the embodiment of the present application provides a decoding method, including:
  • the second identifier information is the fourth symbol, obtaining the first identifier information from the code stream;
  • the bit corresponding to the kth side information in the first identifier information is the second symbol, obtaining a third number of coded bits from the code stream, and using the third coded bit number from the code stream Obtaining kth side information of the Y first point cloud blocks, where the third coded bit number is a bit required for encoding the maximum value Ak of the kth side edge information of the Y first point cloud blocks
  • the method further includes:
  • the method further includes:
  • bit corresponding to the kth side information in the first identifier information is the first symbol, determining the second number of coded bits according to the maximum value Bk of the kth side information of the X first point cloud blocks And obtaining, by using the second coded bit number, the kth side information of the Y first point cloud blocks from the code stream.
  • the embodiment of the present application provides a decoding method, including:
  • the second identifier information is the fourth symbol, obtaining Z pieces of identification information corresponding to the Z kinds of side information from the code stream;
  • the difference is Y first in the current frame except the X first point cloud blocks
  • the difference between the maximum number of required bits of the kth side information of the point cloud block and the number of bits required for the maximum value Bk of the kth side information of the X first point cloud blocks in the current frame value;
  • the third coded bit number is a maximum of the kth side information used to encode the Y first point cloud blocks The number of bits required for the value Ak;
  • the method further includes:
  • the method further includes:
  • the embodiment of the present application provides a decoding method, including:
  • the second identifier information is the fourth symbol, obtaining the first identifier information from the code stream;
  • the bit corresponding to the k-th side information in the first identification information is the second symbol, obtain a difference from the code stream; the difference is the first one point cloud block in the current frame.
  • the maximum number of required bits of the kth side information of the Y first point cloud blocks other than the maximum value Bk of the kth side information of the X first point cloud blocks in the current frame The difference between the number of bits required;
  • the third coded bit number is a maximum of the kth side information used to encode the Y first point cloud blocks The number of bits required for the value Ak;
  • the method further includes:
  • the method further includes:
  • bit corresponding to the kth side information in the first identifier information is the first symbol, determining the second number of coded bits according to the maximum value Bk of the kth side information of the X first point cloud blocks And obtaining, by using the second coded bit number, the kth side information of the Y first point cloud blocks from the code stream.
  • the embodiment of the present application provides an apparatus for determining a matching relationship between a point cloud block, including: a memory and a processor;
  • the memory is configured to store program instructions
  • the processor is configured to:
  • the processor is specifically configured to:
  • the processor is specifically configured to:
  • the j unmatched first point cloud blocks include: in the M first point cloud blocks in the current frame The first point cloud block that does not match the i-1 reference point cloud blocks before the i-th reference point cloud block, and the projection direction is the same as the projection direction of the i-th reference point cloud block; j is smaller than Or equal to M, k is less than or equal to j, and j, k, and M are positive integers;
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to the Qik matches the i-th reference point cloud block, where the kth first point cloud block is One of the j first cloud blocks that have not yet been matched.
  • the associated value is a quotient of the first reference value and the second reference value
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix
  • the first reference value is a number of pixel points included in an intersection area of an effective area of the first occupation matrix and an effective area of the second occupation matrix
  • the second reference value is the first occupation matrix. The number of pixels included in the union area of the effective area and the effective area of the second occupancy matrix
  • the effective area of the first occupation matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupation matrix is the ith second point.
  • the second occupancy matrix is a matrix region corresponding to an area actually occupied by the i-th second point cloud block after being projected on the two-dimensional plane according to a projection direction.
  • the processor is specifically configured to:
  • the processor is further configured to:
  • an embodiment of the present application provides an encoding apparatus, including:
  • An obtaining module configured to obtain matching information, where the matching information is used to indicate a matching relationship between the X first point cloud blocks and the X reference point cloud blocks, where the X reference point cloud blocks include a reference in the current frame
  • X is less than or equal to M
  • X and M are both positive integers
  • M is the number of first point cloud blocks in the current frame
  • An encoding module configured to encode the matching information into a code stream.
  • the matching information includes any one of the following:
  • the X index difference values are the index values of the X first point cloud blocks and the index values of the X reference point cloud blocks corresponding to the X first point cloud blocks. The difference between the two.
  • the matching information includes any one of the following:
  • the encoding module is further configured to:
  • the encoding module is further configured to: encode the X into the code stream;
  • the encoding module is further configured to: determine a fourth number of encoded bits according to the M; and encode the X into the code stream by using the fourth number of encoded bits.
  • the embodiment of the present application provides a decoding apparatus, including: a memory and a processor;
  • the memory is configured to store program instructions
  • the processor is configured to:
  • the matching information is used to indicate a matching relationship between the X first point cloud blocks and the X reference point cloud blocks, where the X indicates that the current frame matches the reference point cloud block a number of first point cloud blocks, the reference point cloud block is included in a reference frame of the current frame, X is less than or equal to M, and X and M are both positive integers, and M represents a number in the current frame The number of clouds;
  • the processor is specifically configured to:
  • the matching information includes any one of the following:
  • the X index difference values are index values of the X first point cloud blocks and index values of X reference point cloud blocks corresponding to the X first point cloud blocks The difference between the two.
  • the matching information includes any one of the following:
  • the processor is further configured to:
  • Parsing the code stream to obtain an X group side information difference value where the X group side information difference values respectively represent side information of the X first point cloud blocks and side information of the X reference point cloud blocks Difference between
  • the processor is specifically configured to:
  • the processor is further configured to: parse the code stream to obtain the X;
  • the processor is further configured to: determine a fourth encoded bit number according to the M; parse the code stream by using the fourth encoded bit number to obtain the X.
  • the embodiment of the present application provides a decoding apparatus, including: a memory and a processor;
  • the memory is configured to store program instructions
  • the processor is configured to:
  • the second identifier information is the fourth symbol, obtaining Z pieces of identification information corresponding to the Z kinds of side information from the code stream;
  • the identification information corresponding to the k-th side information is the second symbol, obtaining a third number of coding bits from the code stream, and obtaining the first Y points from the code stream by using the third coded bit number
  • the processor is further configured to:
  • the processor is further configured to:
  • the embodiment of the present application provides a decoding apparatus, including: a memory and a processor;
  • the memory is configured to store program instructions
  • the processor is configured to:
  • the second identifier information is the fourth symbol, obtaining the first identifier information from the code stream;
  • the bit corresponding to the kth side information in the first identifier information is the second symbol, obtaining a third number of coded bits from the code stream, and using the third coded bit number from the code stream Obtaining kth side information of the Y first point cloud blocks, where the third coded bit number is a bit required for encoding the maximum value Ak of the kth side edge information of the Y first point cloud blocks
  • the processor is further configured to:
  • the processor is further configured to:
  • the embodiment of the present application provides a decoding apparatus, including: a memory and a processor;
  • the memory is configured to store program instructions
  • the processor is configured to:
  • the second identifier information is the fourth symbol, obtaining Z pieces of identification information corresponding to the Z kinds of side information from the code stream;
  • the difference is Y first in the current frame except the X first point cloud blocks
  • the difference between the maximum number of required bits of the kth side information of the point cloud block and the number of bits required for the maximum value Bk of the kth side information of the X first point cloud blocks in the current frame value;
  • the third coded bit number is a maximum of the kth side information used to encode the Y first point cloud blocks The number of bits required for the value Ak;
  • the processor is further configured to:
  • the processor is further configured to:
  • the identifier information corresponding to the k-th side information is the first symbol, determining a second number of coded bits according to the maximum value Bk of the k-th side information of the X first point cloud blocks, and using the second code The number of bits obtains the kth side information of the Y first point cloud blocks from the code stream.
  • the embodiment of the present application provides a decoding apparatus, including: a memory and a processor;
  • the memory is configured to store program instructions
  • the processor is configured to:
  • the second identifier information is the fourth symbol, obtaining the first identifier information from the code stream;
  • the bit corresponding to the k-th side information in the first identification information is the second symbol, obtain a difference from the code stream; the difference is the first one point cloud block in the current frame.
  • the maximum number of required bits of the kth side information of the Y first point cloud blocks other than the maximum value Bk of the kth side information of the X first point cloud blocks in the current frame The difference between the number of bits required;
  • the third coded bit number is a maximum of the kth side information used to encode the Y first point cloud blocks The number of bits required for the value Ak;
  • the processor is further configured to:
  • the processor is further configured to:
  • bit corresponding to the kth side information in the first identifier information is the first symbol, determining the second number of coded bits according to the maximum value Bk of the kth side information of the X first point cloud blocks And obtaining, by using the second coded bit number, the kth side information of the Y first point cloud blocks from the code stream.
  • the embodiment of the present application provides an encoding method, a decoding method, and an apparatus.
  • the second point cloud has a preset matching relationship.
  • the X sets of side information difference values are obtained according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks.
  • 1 is a schematic diagram of existing split point cloud data
  • FIG. 2 is a schematic diagram of a prior occupancy diagram
  • FIG. 3 is a flow chart of a conventional point cloud data packing method
  • FIG. 5 is a flowchart of an encoding method according to Embodiment 1 of the present application.
  • FIG. 6 is a flowchart of an encoding method according to Embodiment 2 of the present application.
  • FIG. 7 is a flowchart of an encoding method according to Embodiment 3 of the present application.
  • FIG. 8 is a flowchart of a decoding method according to Embodiment 1 of the present application.
  • FIG. 9 is a schematic diagram of an occupation diagram according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an encoding apparatus according to Embodiment 1 of the present application.
  • FIG. 11 is a schematic structural diagram of a decoding apparatus according to Embodiment 1 of the present application.
  • FIG. 12 is a schematic structural diagram of an encoder according to Embodiment 1 of the present application.
  • FIG. 13 is a schematic structural diagram of a decoder according to Embodiment 1 of the present application.
  • the coding method, the decoding method and the apparatus provided by the embodiments of the present application are directed to solving the technical problem of the coding compression performance loss caused by the separate processing of the point cloud data for each frame.
  • point cloud data segmentation stage point cloud data packing (also called packing) stage
  • side information coding stage side information decoding stage.
  • the point cloud data is segmented according to a preset rule to obtain a plurality of point cloud blocks (also called patches).
  • Each point cloud block is a connected area, and any two point cloud blocks have no overlapping area.
  • FIG. 1 is a schematic diagram of existing split point cloud data.
  • the left side of Fig. 1 shows point cloud data in a three-dimensional coordinate system including a point data set of the appearance surface of the portrait 11 obtained by the measuring instrument.
  • the three-dimensional coordinate system includes an x-axis, a y-axis, and a z-axis.
  • the z-axis negative direction is taken as the projection direction
  • the right side of FIG. 1 shows the segmentation result of the point cloud data.
  • the point cloud block is described on a two-dimensional plane defined by the x-axis and the y-axis.
  • the point cloud data can be divided into six point cloud blocks, which are point cloud block 12 to point cloud block 17.
  • the point cloud data can be segmented in at least one projection direction to form a plurality of point cloud blocks.
  • the packing problem is mathematically an optimization problem. It refers to how to put boxes of different sizes into one container. The goal is to make the container denser or the number of containers used is as small as possible.
  • the packing problem of point cloud data means that for a plurality of point cloud blocks of different shapes, three-dimensional to two-dimensional projection according to the projection direction, all the point cloud blocks can be closely arranged on a two-dimensional image according to a certain rule. The goal is to make the gaps contained in the two-dimensional image as small as possible or the target image is as small as possible.
  • This process of arranging all point cloud blocks is called point cloud data packing. This stage can realize the projection of the point cloud block from 3D to 2D and obtain the edge information corresponding to the point cloud block.
  • the projected image may include a depth projection map and a texture projection map.
  • the depth projection map is a depth map obtained by projecting each point cloud block, and a two-dimensional image generated in a packing order.
  • the texture projection map is a texture map obtained by projecting each point cloud block, and a two-dimensional image generated in a packing order.
  • the depth projection map and the texture projection map can have the same length and width.
  • the occupation map is a 2-value two-dimensional image for indicating whether a pixel position in the above projection image is occupied by a certain point in the point cloud data.
  • the resolution of the occupied picture is lower than the resolution of the projected picture.
  • FIG. 2 is a schematic diagram of an existing occupancy map.
  • the left side and the right side of FIG. 2 respectively show occupation diagrams corresponding to adjacent two-frame point cloud blocks.
  • different letters indicate that the projection direction of the point cloud block or the normal axis is different.
  • the letters A to F may sequentially indicate the projection direction or the normal axis: the x-axis positive direction, the y-axis positive direction, the z-axis positive direction, the x-axis negative direction, the y-axis negative direction, and the z-axis negative direction.
  • the left side of FIG. 2 includes point cloud blocks 21-25
  • the right side of FIG. 2 includes point cloud blocks 31-35.
  • the points (pixel points) displayed by the consecutively distributed identical letters indicate that they are occupied by one point cloud block, and the area actually occupied by the point cloud block may be referred to as an effective area.
  • Points without letters indicate that they are not occupied by point cloud data, and the areas formed by these points may be referred to as invalid areas.
  • the side information can indicate the location information of the point cloud block. The following is explained by Table 1.
  • u1, v1, and d1 indicate the position of the point cloud block in the three-dimensional coordinate system, and after the point cloud data segmentation ends, u1, v1, and d1 of the point cloud block can be obtained.
  • sizeU and sizeV indicate the width and height of the point cloud block in the projected image. After the point cloud block is projected from 3D to 2D according to the projection direction, sizeU and sizeV can be obtained. Between sizeU and sizeU0, sizeV and sizeV0 can have a certain correspondence. Specifically, it can be related to the resolution of the occupied graph. U0, v0, sizeU0, and sizeV0 indicate the location of the point cloud block in the occupied graph. SizeU0 and sizeV0 can be obtained according to sizeU and sizeV. All point cloud blocks are closely arranged on the occupation map according to certain rules, and u0 and v0 can be obtained.
  • FIG. 3 is a flow chart of a conventional point cloud data packing method. As shown in FIG. 3, the existing point cloud data packing method is separately processed for each frame point cloud data, and may include:
  • the point cloud blocks may be sorted in descending order of the height of the point cloud blocks projected on the two-dimensional plane.
  • a plurality of point cloud blocks can be sorted in descending order of the width of the point cloud blocks projected on the two-dimensional plane, so that the ordering of all the point cloud blocks can be completed.
  • the order of the current frame point cloud block can be obtained as patch[1],...,patch[i],...,patch[M], 0 ⁇ i ⁇ M, and M is the number of current frame point cloud blocks.
  • the minimum value of the width of the occupied graph the minimum value of the width of the projected image / the resolution of the occupied graph.
  • the initial value of the width of the occupied graph max (the minimum value of the width of the occupied graph, the width of the i-th point cloud block in the occupied graph + 1), 0 ⁇ i ⁇ M.
  • the minimum value of the height of the occupied graph the minimum value of the height of the projected image / the resolution of the occupied graph.
  • the initial value of the height of the occupied graph max (the minimum value of the height of the occupied graph, the height of the i-th point cloud block in the occupied graph), 0 ⁇ i ⁇ M.
  • the initial size of the occupation map the initial value of the height of the occupation map ⁇ the initial value of the width of the occupation map.
  • S104 Determine, in the occupation graph, whether the i-th point cloud block patch[i] can be inserted according to a direction from left to right and from top to bottom.
  • the process returns to S103 until the Mth point cloud block patch[M] is acquired.
  • the point cloud data packaging method is as follows. According to the arrangement order of the point cloud blocks, the point cloud block 21 is first obtained. The point cloud block 21 is inserted in the occupation map in a direction from left to right and from top to bottom. Then, the point cloud block 22 is obtained. The point cloud block 22 is inserted in the occupation map in a direction from left to right and from top to bottom. Then get the point cloud block 23.
  • the point cloud block 23 is inserted in the occupation map in a direction from left to right and from top to bottom.
  • the point cloud block 24 is obtained again.
  • the point cloud block 24 is inserted in the occupation map in a direction from left to right and from top to bottom.
  • the point cloud block 25 is inserted in the occupation map in a direction from left to right and from top to bottom.
  • the point cloud data packing After the point cloud data packing is completed, it can be determined that all the point cloud blocks of the current frame are in the occupied map. After that, the side information of the point cloud block can be encoded.
  • the side information may include at least one of u0, v0, u1, v1, d1, sizeU0, and sizeV0.
  • u0, v0, u1, v1 and d1 fixed-length coding of a fixed number of bits can be used.
  • sizeU0 and sizeV0 the index Glomb Rice code can be used. It should be noted that the above coding method may also be used to encode other side information.
  • the input information of the encoding method is the number M of the current frame point cloud block and the side information of each point cloud block. Encoding the input information can obtain a code stream that serves as input information for the decoding device.
  • the existing coding method is separately processed for the edge information of each frame point cloud block, and may include:
  • S201 Perform 32-bit encoding on the number M of current frame point cloud blocks.
  • the encoded code stream can include 0xC8.
  • S202 Encode side information of the point cloud block, where the side information includes at least one of u0, v0, u1, v1, and d1.
  • the maximum value of the side information of all point cloud blocks of the current frame is obtained.
  • the number of coded bits required for encoding is determined based on the maximum value, and the number of coded bits is 8-bit encoded.
  • the side information of all point cloud blocks of the current frame is encoded by the number of encoded bits.
  • the side information includes u0 and v0.
  • the number of current frame point cloud blocks is three.
  • the decimal values of the edge information u0 of the three point cloud blocks are 2, 5, and 9.
  • the side values of the edge information v0 of the three point cloud blocks are 3, 4, and 7, respectively.
  • the coding method is as follows:
  • the side information u0 the side information u0 of the 3 point cloud blocks of the current frame is ⁇ 2, 5, 9 ⁇ , and the maximum value is 9.
  • the number of coded bits required for coding is four.
  • the encoded bit number 4 is 8-bit encoded, and the encoded code stream includes 0x4.
  • the side information u0 of the 3 point cloud blocks of the current frame is sequentially encoded by using the coded bit number 4, and the encoded code stream includes 0x2, 0x5, and 0x9.
  • the side information v0 the side information v0 of the 3 point cloud blocks of the current frame is ⁇ 3, 4, 7 ⁇ , and the maximum value is 7.
  • the number of coded bits required for coding is three.
  • the encoded bit number 3 is 8-bit encoded, and the encoded code stream includes 0x3.
  • the side information v0 of the 3 point cloud blocks of the current frame is sequentially encoded by using the coded bit number 3, and the encoded code stream includes 0x3, 0x4, and 0x7.
  • S203 Encode side information of the point cloud block, and the side information includes sizeU0 and sizeV0.
  • sizeU0 is the side information sizeU0 of the i-th point cloud block
  • pre_sizeU0 is the side information sizeU0, 0 ⁇ i ⁇ M of the i-1th point cloud block.
  • sizeV0 is the side information sizeV0 of the i-th point cloud block
  • pre_sizeV0 is the side information sizeV0 of the i-th point cloud block.
  • the pre_sizeU0 may be a first preset value, for example, 0, when the edge information difference of the first point cloud block of the current frame is obtained.
  • Pre_sizeV0 can be a second preset value.
  • the execution order of S202 and S203 is not limited.
  • the encoding order of the various side information is not limited. For example, if the side information is 3, they are u1, v1, and d1.
  • the encoding order may be: ..., u1, v1 and d1 encoding of the previous point cloud block in the current frame, u1, v1 and d1 encoding of the current point cloud block in the current frame, u1, v1 of the next point cloud block in the current frame And d1 encoding,...
  • the coding order may also be: u1 encoding of all point cloud blocks in the current frame, v1 encoding of all point cloud blocks in the current frame, and d1 encoding of all point cloud blocks in the current frame.
  • the encoding order of sizeU0 and sizeV0 is not limited. It should be noted that the encoding device and the decoding device may define encoding and decoding sequences in advance.
  • the input information of the decoding method is the code stream output by the encoding device.
  • the decoding method corresponds to the encoding method.
  • the following side information includes u0, v0, u1, v1, d1, sizeU0 and sizeV0, and u0, v0, u1, v1, d1 are encoded first, and sizeU0 and sizeV0 are encoded as examples, and the existing decoding method is explained. .
  • the existing decoding method is separately processed for the side information of each frame point cloud block, and may include:
  • the existing side information coding method and decoding method only perform separate coding processing and decoding processing for the side information of each frame point cloud block, and the point cloud data of consecutive frames have strong correlation, resulting in Loss of compression performance for side information coding.
  • FIG. 5 is a flowchart of an encoding method according to Embodiment 1 of the present application.
  • the execution subject may be an encoding device.
  • the coding method provided in this embodiment may include:
  • the X first point cloud blocks and the X second point cloud blocks have a preset matching relationship, and the X second point cloud blocks are included in a previous frame of the current frame.
  • X is less than or equal to M, and X and M are both positive integers.
  • the point cloud block of the current frame may be referred to as a first point cloud block, and the number of the first point cloud blocks of the current frame is M.
  • the point cloud block of the previous frame of the current frame may be referred to as a second point cloud block.
  • the X first point cloud blocks of the current frame have a preset matching relationship with the X second point cloud blocks of the previous frame. That is to say, through the X first point cloud blocks and the X second point cloud blocks, it is illustrated that there is a certain correlation between point cloud data of consecutive frames. This correlation can be exploited during subsequent encoding and decoding.
  • M and X are not limited in this embodiment. Moreover, if the number of second point cloud blocks of the previous frame is defined as N0, X is less than or equal to N0. That is, X ⁇ min (M, N0), min (M, N0) is the smaller of M and N0.
  • the side information may include, but is not limited to, various side information shown in Table 1, and may also include other information related to the point cloud block.
  • the side information may further include an index value of the point cloud block, where the index value indicates an order of arrangement of a point cloud block in all point cloud blocks.
  • the index values of the first point cloud block may be 0, 1, 2, ..., M-2, M-1, or 1, 2, ... in order. , M-1, M.
  • one set of side information difference values can be obtained.
  • the X group side information difference value is obtained according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks.
  • the number of side information is not limited, and the side information may be one type or multiple types.
  • the side information is one type, the one side side information difference value includes only one value.
  • the set of side information difference values includes a plurality of values, and each value corresponds to one side information.
  • u0 in the formula represents the side information u0 of the first point cloud block
  • pre_u0 in the formula represents the side information u0 of the second point cloud block.
  • the side information is seven, specifically u0, v0, u1, v1, d1, sizeU0 and sizeV0 in Table 1.
  • 1 set of side information difference delta_x x - pre_x.
  • x in the formula represents the side information x of the first point cloud block
  • pre_x in the formula represents the side information x of the second point cloud block
  • x may be u0, v0, u1, v1, d1, sizeU0 and sizeV0. That is, the set of side information difference values is ⁇ delta_u0, delta_v0, delta_u1, delta_v1, delta_d1, delta_sizeU0, delta_sizeV0 ⁇ .
  • the X group side information difference value is obtained according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks, and may include:
  • the X first point cloud blocks and the X second point cloud blocks have a preset matching relationship.
  • the same first point cloud block and the second point cloud block are matched. Therefore, the difference between the side information of the kth first point cloud block and the side information of the kth second point cloud block is determined as the kth group side information difference value.
  • the X-edge information difference is obtained by subtracting the edge information of the first point cloud block and the second point cloud block which are sorted by the same, which simplifies the complexity of the difference calculation and improves the coding speed.
  • obtaining the X group side information difference value according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks may include:
  • the difference between the side information of the X first point cloud blocks and the side information of the X second point cloud blocks matching the X first point cloud blocks is determined as the X group side information difference value.
  • the matching information is obtained, and the matching information indicates a matching relationship between the X first point cloud blocks and the X second point cloud blocks.
  • the matching information is encoded.
  • the X first point cloud blocks and the X second point cloud blocks have a preset matching relationship.
  • the order of the first point cloud block and the second point cloud block that match each other may be the same or different in the X first point cloud blocks and the X second point cloud blocks, respectively.
  • the difference between the side information of the X first point cloud blocks and the side information of the X second point cloud blocks matching the X first point cloud blocks is determined as the X group side information difference, and the coding is improved. Accuracy, which in turn improves coding performance.
  • the matching information may include an index value of the X first point cloud blocks and an index value of the X second point cloud blocks.
  • X 3.
  • the index values of the three first point cloud blocks are 0, 1, and 2.
  • the index values of the three second point cloud blocks are 0, 1, and 2, respectively.
  • the matching information may include: index values ⁇ 0, 1, 2 ⁇ of the three first point cloud blocks and index values ⁇ 0, 2, 1 ⁇ of the three second point cloud blocks.
  • the matching information may include an index value of the X first point cloud blocks and X index difference values, where the X index difference values are index values of the X first point cloud blocks and the X first point cloud blocks.
  • the above example is also taken as an example.
  • the index values of the X first point cloud blocks are ⁇ 0, 1, 2 ⁇ .
  • the index values of the X second point cloud blocks matching the X first point cloud blocks are ⁇ 0, 2, 1 ⁇ .
  • the matching information may include 1 bit indication information.
  • the 1 bit indication information may be 0 or 1.
  • the 1st indication information indicates that the first point cloud block and the second point cloud block that match each other have the same order, further compressing the code stream, and improving coding efficiency.
  • the X first point cloud blocks and the X second point cloud blocks have a preset matching relationship, according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks, The X group side information difference.
  • the correlation between the two frames of data is considered, which reduces the coding loss and improves the coding compression performance.
  • the method for encoding the X-edge information difference is not limited, and the existing coding method may be used, as long as the coding method and the decoding method correspond.
  • the X-group side information difference is encoded, and the index Glomb Rice code can be used.
  • the encoding method provided in this embodiment determines X first point cloud blocks in the M first point cloud blocks of the current frame, X first point cloud blocks and X in the previous frame of the current frame.
  • the second point cloud block has a preset matching relationship, and the X group side information difference values obtained from the side information of the X first point cloud blocks and the side information of the X second point cloud blocks are encoded, and the The correlation between the two frames of data before and after, reduces the coding loss and improves the coding compression performance.
  • the coding method provided in this embodiment may further include:
  • the method for encoding the M in this embodiment is not limited, and an existing encoding method may be used, as long as the encoding method and the decoding method correspond.
  • the M is encoded, and the fixed encoding bit number can be used for the fixed length encoding.
  • This embodiment does not limit the specific value of the preset number of encoded bits. For example, it can be 32bit.
  • the coding method provided in this embodiment may further include:
  • the X is encoded so that the number of the first point cloud blocks matching the second point cloud block of the previous frame in the current frame can be clearly known during decoding, thereby improving coding efficiency.
  • encoding X may include:
  • the fourth coded bit number is determined according to M.
  • X is encoded using the fourth number of coded bits.
  • X is less than or equal to M, so the maximum number of encoded bits (fourth number of encoded bits) required to encode X can be determined by M. Furthermore, by encoding the X with the fourth number of coded bits, the code stream can be further compressed to improve the coding compression performance.
  • the 16 bits can be used to encode X, and the encoded code stream can include 0x5A.
  • the preset matching relationship may be determined by the following steps:
  • N second point cloud blocks in the previous frame of the current frame where N is a positive integer.
  • the value Qij is associated and the Qik with the largest correlation value is determined.
  • the projection direction of the j unmatched first point cloud blocks is the same as the projection direction of the ith second point cloud block.
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to Qik matches the i-th second point cloud block, wherein the kth first point cloud block is j first points that have not yet matched One of the clouds.
  • M 20.
  • the preset threshold can be identified as thr.
  • the first point cloud block in the first set with the same projection direction as pre_patch[1] is patch[1] and patch[2].
  • the correlation value Q11 between pre_patch[1] and patch[1], and the correlation value Q12 between pre_patch[1] and patch[2] are obtained.
  • pre_patch[1] matches patch[1]. That is to say, the first point cloud block with the current frame index value of 1 matches the second point cloud block with the previous frame index value of 1.
  • the patch[1] (index value 1) is deleted in the first set to form a new first set.
  • the new first set includes 19 first point cloud blocks, which can be re-identified as pre_patch[j], 0 ⁇ j ⁇ 19, and the corresponding index value is 2-20.
  • pre_patch[2] index value 2
  • T 19
  • the first point cloud block in the first set with the same projection direction as pre_patch[2] is patch[3] and patch[4]
  • Q23 correlation value
  • Q24>Q23 the magnitude of Q24 and the preset threshold thr is compared. If Q24 ⁇ thr, it means that there is no first point cloud block matching pre_patch[2] in the current frame. At this point, the first set does not change. After that, continue to traverse the next second point cloud block until the N second point cloud blocks are traversed.
  • the N second points can be determined.
  • the cloud block has all the first point clouds in a matching relationship.
  • the specific value of the preset threshold is not limited in this embodiment, and is set as needed.
  • N is the number of second point cloud blocks of the previous frame. It should be noted that, in this embodiment, how to obtain N second point cloud blocks from the N0 second point cloud blocks is not limited.
  • the first N first point cloud blocks may be acquired according to the order of the N0 first point cloud blocks.
  • the associated value Qij may be a quotient of the first reference value and the second reference value.
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix.
  • the first reference value is a number of pixel points included in an intersection area of the effective area of the first occupation matrix and the effective area of the second occupation matrix
  • the second reference value is valid for the effective area of the first occupation matrix and the second occupation matrix The number of pixels contained in the union area of the region.
  • the effective area of the first occupied matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupied matrix is the i-th second point cloud block according to the projection.
  • the area occupied by the direction after the two-dimensional plane is projected.
  • the first occupied matrix is the matrix area corresponding to the effective area of the first occupied matrix
  • the second occupied matrix is the matrix area corresponding to the effective area of the second occupied matrix.
  • the method may further include:
  • the M first point cloud blocks may be sorted according to the order of the heights of the first point cloud blocks on the occupied graph from large to small. For a plurality of first point cloud blocks having the same height, the first point cloud blocks may be sorted according to the width of the first point cloud block on the occupied graph from large to small, thereby completing the M first points. Sorting of clouds. Exemplarily, as shown on the right side of FIG. 2, only the order of the point cloud blocks 31 to 34 will be described as an example. According to the height of the point cloud block on the occupation map, the order is: point cloud block 31, point cloud block 32 and point cloud block 33, and point cloud block 34.
  • the point cloud block 32 and the point cloud block 33 are sorted in order of the width of the point cloud block on the occupied map. Therefore, the order of the point cloud blocks 31 to 34 after sorting is: point cloud block 31, point cloud block 32, point cloud block 33, and point cloud block 34.
  • the first point cloud block Before determining the matching relationship between the M first point cloud blocks of the current frame and the N second point cloud blocks of the previous frame, the first point cloud block may be upgraded by sorting the M first point cloud blocks. The matching speed with the second cloud block, thereby increasing the encoding processing speed.
  • determining the first one point cloud blocks in the M first point cloud blocks of the current frame may include:
  • the X first point cloud blocks are determined in the O first point cloud blocks, and the O first first point cloud blocks are the first point cloud blocks matching the N second point cloud blocks, O ⁇ X.
  • X first point cloud blocks may be determined in all first point cloud blocks matching the N second point cloud blocks. That is to say, X ⁇ O, and O is the number of first point cloud blocks having a one-to-one matching relationship with the N second point cloud blocks.
  • the preset matching relationship may include:
  • the order of encoding the X-group side information difference and encoding the M is not limited. If the side information is multiple, the encoding order of the various side information is not limited in the process of encoding the X group side information difference. As long as the encoding device and the decoding device define the encoding and decoding order in advance.
  • the embodiment provides an encoding method, including: determining X first point cloud blocks in the M first point cloud blocks of the current frame, and acquiring side information of the X first point cloud blocks and X second points.
  • the side information of the cloud block obtains the X group side information difference value according to the side information of the X first point cloud blocks and the side information of the X second point cloud blocks, and encodes the X group side information difference value and M.
  • the encoding method provided in this embodiment utilizes the correlation between the two points of cloud data before and after, and the X-group side information difference obtained from the side information of the X first point cloud blocks and the side information of the X second point cloud blocks.
  • the value is encoded, which reduces the coding loss and improves the coding compression performance.
  • FIG. 6 is a flowchart of an encoding method according to Embodiment 2 of the present application.
  • the encoding method provided in this embodiment provides another implementation manner of the encoding method based on the first embodiment of the method shown in FIG. 5, which mainly provides that when X ⁇ M, the first one cloud block is provided.
  • the coding method provided in this embodiment may further include:
  • the implementation manner of encoding the first coded bit number in this embodiment is not limited.
  • the first coded bit number may be encoded by using a preset number of bits. This embodiment does not limit the specific value of the preset number of encoded bits, for example, 8 bits.
  • the side information may include at least one of the following: an X coordinate minimum value (u1) of the point cloud block in the three-dimensional coordinate system, and a Y coordinate minimum value (v1) of the point cloud block in the three-dimensional coordinate system.
  • Side information includes u0 and v0. After encoding the side information of the seven first point cloud blocks, the side information of the remaining three first point cloud blocks needs to be encoded.
  • the decimal values of the side information u0 of the remaining three first point cloud blocks are 2, 5, and 9, respectively.
  • the decimal values of the side information v0 of the remaining three first point cloud blocks are 3, 4, and 7, respectively.
  • the preset number of encoded bits is 8 bits.
  • the coding method is as follows:
  • the side information u0 the side information u0 of the three first point cloud blocks is ⁇ 2, 5, 9 ⁇ , the maximum value is 9, and the number of coded bits required for encoding is four.
  • the encoded bit number 4 is 8-bit encoded, and the encoded code stream includes 0x4. Then, the side information u0 of the three first point cloud blocks is sequentially encoded by using the coded bit number 4, and the encoded code stream includes 0x2, 0x5, and 0x9.
  • the side information v0 the side information v0 of the three first point cloud blocks is ⁇ 3, 4, 7 ⁇ , the maximum value is 7, and the number of coded bits required for encoding is 3.
  • the encoded bit number 3 is 8-bit encoded, and the encoded code stream includes 0x3.
  • the side information v0 of the three first point cloud blocks is sequentially encoded by using the coded bit number 3, and the encoded code stream includes 0x3, 0x4, and 0x7.
  • the execution order of encoding the side information of the first first point cloud blocks and the third coded bit number is not limited. If the side information is plural, the encoding order of various side information is not limited. As long as the encoding device and the decoding device define the encoding and decoding order in advance.
  • the embodiment provides an encoding method, including: acquiring side information of the Y first point cloud blocks, obtaining a maximum value A of edge information of the Y first point cloud blocks, and determining Y first points according to the maximum value A.
  • the first coded bit number corresponding to the side information of the cloud block is encoded by the preset number of coded bits, and the side information of the Y first point cloud blocks is coded by using the first coded bit number.
  • the encoding method provided in this embodiment determines the number of bits required for encoding according to the side information of the remaining Y first point cloud blocks, and avoids determining the number of bits required for encoding according to the side information of all the M first point cloud blocks.
  • the data processing data volume is small, which improves the efficiency and rationality of the encoding and improves the encoding performance.
  • FIG. 7 is a flowchart of an encoding method according to Embodiment 3 of the present application.
  • the encoding method provided by this embodiment provides another implementation manner of the encoding method based on the first embodiment of the method shown in FIG. 5, which mainly provides that when X ⁇ M, the first first cloud blocks are provided.
  • the encoding method provided in this embodiment may further include:
  • the maximum value Bk is greater than or equal to the maximum value Ak, determine that the bit corresponding to the kth side information in the first identification information is the first symbol, and determine the kth of the Y first point cloud blocks according to the maximum value Bk.
  • the maximum value Bk is smaller than the maximum value Ak, determine that the bit corresponding to the kth side information in the first identification information is the second symbol, and determine the kth side of the Y first point cloud blocks according to the maximum value Ak.
  • the first symbol may be 0 and the second symbol may be 1.
  • the first symbol may be 1 and the second symbol may be 0.
  • the side information may include at least one of the following: an X coordinate minimum value (u1) of the point cloud block in the three-dimensional coordinate system, and a Y coordinate minimum value (v1) of the point cloud block in the three-dimensional coordinate system.
  • the implementation manner of encoding the third coded bit number in this embodiment is not limited.
  • the third coded bit number may be encoded by using a preset number of bits. This embodiment does not limit the specific value of the preset number of encoded bits, for example, 8 bits.
  • the implementation manner of encoding the first identifier information in this embodiment is not limited.
  • the first identification information may be encoded by using a preset number of bits.
  • the specific value of the preset number of coding bits is not limited, for example, 8 bits or Zbit, and Z is the number of side information.
  • each bit a, b, c, d, e corresponds to u0, v0, u1, v1 and d1, respectively.
  • the first symbol is 0 and the second symbol is 1.
  • the maximum values of the five kinds of side information u0, v0, u1, v1, and d1 of the X first point cloud blocks are max_u0, max_v0, max_u1, max_v1, and max_d1, respectively.
  • the maximum values of the five kinds of side information u0, v0, u1, v1, and d1 of the Y first point cloud blocks are max_u0', max_v0', max_u1', max_v1', max_d1', respectively.
  • the number of third coded bits corresponding to the side information u0 of the Y first point cloud blocks may be determined according to max_u0', and the side information u0 of the Y first point cloud blocks may be encoded by the third coded bit number.
  • Table 2 first identification information and second identification information
  • the side information of the X first point cloud blocks is obtained by encoding the X group side information difference values.
  • the side information of the X first point cloud blocks is encoded first, and correspondingly, the side information of the X first point cloud blocks is decoded. That is to say, the decoding device first obtains side information of the X first point cloud blocks.
  • the number of coding required bits determined according to the maximum value of the side information of the X first point cloud blocks may be used as the pair of Y first point cloud blocks. The number of coded bits when the side information is encoded, thereby encoding the side information of the Y first point cloud blocks.
  • the decoding device it is not necessary to specifically encode and notify the decoding device of the number of coded bits corresponding to the side information of the Y first point cloud blocks, and further compress the code stream, thereby improving coding efficiency and compression performance.
  • the value of each bit in the first identification information if the number of coded bits corresponding to the side information of the Y first point cloud blocks is the largest according to the side information of the X first point cloud blocks, If the value is determined, the number of coded bits corresponding to the side information of the Y first point cloud blocks is obtained according to the side information of the X first point cloud blocks that have been decoded, and the code stream can be further parsed according to the number of the coded bits.
  • the side information of the Y first point cloud blocks if the number of coded bits corresponding to the side information of the Y first point cloud blocks is the largest according to the side information of the X first point cloud blocks.
  • the encoding method provided in this embodiment may include: if the edge information is Z, and Z>1, before encoding the first identifier information, the method may further include:
  • the maximum value of the side information of the X first point cloud blocks is greater than or equal to the maximum value of the side information of the Y first point cloud blocks.
  • the maximum value of the side information of the X first point cloud blocks is smaller than the maximum value of the side information of the Y first point cloud blocks.
  • it may also include:
  • the second identification information is determined to be the second symbol.
  • the second identification information is encoded.
  • the second identifier information (indicated by F) is 1 bit, indicating whether the maximum values of the Z kinds of side information of the X first point cloud blocks are greater than or equal to the Z kinds of side information of the Y first point cloud blocks. Maximum value.
  • the second identification information is the second symbol.
  • the maximum value of the side information of the X first point cloud blocks is greater than or equal to the maximum value of the side information of the Y first point cloud blocks.
  • the maximum value of the side information of the X first point cloud blocks is smaller than the maximum value of the side information of the Y first point cloud blocks.
  • the method may further include:
  • the second identification information is determined to be the first symbol.
  • the second identification information (indicated by F) is 1 bit.
  • the second identification information is the first symbol.
  • the maximum value of the side information of the X first point cloud blocks is greater than or equal to the maximum value of the side information of the Y first point cloud blocks.
  • S604 is not executed. Only the second identification information of 1 bit needs to be encoded, and the code stream is further compressed, thereby improving coding efficiency and compression performance.
  • the specific value of the second identification information can be seen in Table 2.
  • the side information of the Y first point cloud blocks, the first identification information and/or the second identification information, and the order of encoding the third coding bit number are not limited. If the side information is plural, the encoding order of various side information is not limited. As long as the encoding device and the decoding device define the encoding and decoding order in advance.
  • Step 3 If the maximum value Bk is greater than or equal to the maximum value Ak, it is determined that the bit corresponding to the k-th side information in the first identification information is the first symbol. If the maximum value Bk is smaller than the maximum value Ak, it is determined that the bit corresponding to the k-th side information in the first identification information is the second symbol.
  • the Y first point cloud blocks can be determined.
  • FIG. 8 is a flowchart of a decoding method according to Embodiment 1 of the present application.
  • the decoding method provided in this embodiment corresponds to the coding method provided in the method embodiments shown in FIG. 5 to FIG. As shown in FIG. 8, the decoding method provided in this embodiment may include:
  • the M first point cloud blocks of the current frame include X first point cloud blocks, and the X first point cloud blocks have a preset matching relationship with the X second point cloud blocks of the previous frame of the current frame.
  • X is less than or equal to M, and X and M are both positive integers.
  • the decoding method provided in this embodiment further includes:
  • the side information of the Y first point cloud blocks is obtained according to the code stream by using the first coded bit number.
  • the decoding method provided in this embodiment further includes:
  • the bit corresponding to the kth side information in the first identification information is the second symbol, obtain the third number of coded bits according to the code stream, and obtain the first first point cloud blocks according to the code stream by using the third coded bit number.
  • the decoding method provided in this embodiment further includes:
  • the identification information is obtained according to the code stream.
  • the identifier information includes the first identifier information, and the bit corresponding to the k-th side information in the first identifier information is the first symbol, determining according to the maximum value Bk of the k-th side information of the X first point cloud blocks
  • the third coded bit number is obtained according to the code stream, and the third coded bit number is used according to the code stream.
  • the identification information includes the second identification information, and the second identification information is the first symbol, determining the second number of coding bits according to the maximum value Bk of the kth side information of the X first point cloud blocks, and adopting the second coding bit
  • the second identification information is the second symbol
  • the bit corresponding to the k-th side information in the first identification information is the first symbol, according to the X first points.
  • the third identifier is obtained according to the code stream. And encoding, by using the third coded bit number, the kth side information of the Y first point cloud blocks according to the code stream, where the third coded bit number is an encoding device according to the Y first
  • the identification information includes the first identification information and the second identification information, and a specific decoding order is given below.
  • Step 11 Obtain second identification information according to the code stream.
  • Step 12 If the second identifier information is the first symbol, determine the second coded bit number according to the maximum value Bk of the kth side edge information of the X first point cloud blocks, and obtain the M according to the code stream by using the second coded bit number.
  • the kth side information of the remaining Y first point cloud blocks in the first point cloud block, k 1, . . . , Z.
  • Step 13 If the second identification information is the second symbol, obtain the first identification information.
  • Step 15 If the bit corresponding to the k-th side information in the first identification information is the second symbol, obtain the third number of coded bits according to the code stream, and obtain the first Y points according to the code stream by using the third coded bit number.
  • the method for obtaining the first identification information is determined according to the coding manner of the first identification information and the second identification information.
  • the first identifier information and the second identifier information are respectively encoded, for example, the first identifier information is encoded by Zbit, and the second identifier information is encoded by 1 bit
  • the decoded code stream obtains first identifier information.
  • the first identifier information and the second identifier information are jointly encoded, for example, the first identifier information and the second identifier information are encoded by one byte, then in step 11, the first identifier information has been obtained.
  • the side information of the X first point cloud blocks is obtained according to the X group edge information difference value and the X second point cloud block edge information, including:
  • the side information of the X first point cloud blocks is obtained according to the X group edge information difference value and the X second point cloud block edge information, including:
  • the matching information is obtained according to the code stream, and the matching information indicates a matching relationship between the X first point cloud blocks and the X second point cloud blocks.
  • the side information of the X first point cloud blocks is obtained according to the matching information, the X group side information difference value, and the X second point cloud block side information.
  • the decoding method provided in this embodiment further includes:
  • the fourth coded bit number is determined according to M.
  • X is obtained from the code stream using the fourth number of coded bits.
  • the side information includes at least one of the following: an X coordinate minimum value (u1) of the point cloud block in the three-dimensional coordinate system, and a Y coordinate minimum value (v1) of the point cloud block in the three-dimensional coordinate system, the point cloud The minimum value of the Z coordinate of the block in the three-dimensional coordinate system (d1), the minimum value of the X coordinate of the point cloud block in the occupied graph according to the projection direction (u0), and the minimum value of the Y coordinate of the point cloud block in the occupied graph according to the projection direction ( V0).
  • the decoding method provided by the embodiment of the present application is corresponding to the coding method provided by the method embodiment shown in FIG. 5 to FIG. 7.
  • the technical principle and the technical effect are similar, and details are not described herein again.
  • the embodiment of the present application further provides a point cloud data packaging method, where the execution entity may be an encoder, which is used to solve the problem that the point cloud block is inconsistent in time and space caused by performing separate packaging processing only for each frame point cloud data. technical problem.
  • the left and right sides of FIG. 2 respectively show occupation diagrams corresponding to adjacent two-frame point cloud data.
  • the point cloud blocks of the previous frame are separately sorted, and the order of the first five point cloud blocks is sequentially the point cloud blocks 21-25.
  • Point cloud blocks 21 to 25 are sequentially inserted in the occupation map in the order in which the point cloud blocks are arranged.
  • the point cloud blocks of the next frame are separately sorted, and the order of the first five point cloud blocks is sequentially the point cloud blocks 31-35.
  • Point cloud blocks 31 to 35 are sequentially inserted in the occupation map in the order in which the point cloud blocks are arranged.
  • the point cloud block 21, the point cloud block 22 on the left side of FIG. 2 and the point cloud block 31 and the point cloud block 32 on the right side of FIG. 2 are occupied by two frames before and after.
  • the position on the map is different.
  • the consistency of the point cloud block in time and space is destroyed, which leads to the loss of compression performance when the side information of the point cloud block is encoded, which affects the coding performance.
  • the point cloud data packing method provided by the embodiment of the present application mainly relates to step S101 in FIG. 3, and other steps are similar to those in FIG. 3.
  • the point cloud data packing method provided by the embodiment of the present application, for sorting the M first point cloud blocks of the current frame may include:
  • N second point cloud blocks in the previous frame of the current frame where N is a positive integer.
  • the value Qij is associated and the Qik with the largest correlation value is determined.
  • the projection direction of the j unmatched first point cloud blocks is the same as the projection direction of the ith second point cloud block.
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to Qik matches the i-th second point cloud block, wherein the kth first point cloud block is j first points that have not yet matched One of the clouds.
  • the first point cloud blocks matching the N second point cloud blocks are sequentially sorted.
  • the order of arrangement of the first point cloud blocks that are not matched with the N second point cloud blocks is not limited.
  • the associated value Qij may be a quotient of the first reference value and the second reference value.
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix.
  • the first reference value is a number of pixel points included in an intersection area of the effective area of the first occupation matrix and the effective area of the second occupation matrix
  • the second reference value is valid for the effective area of the first occupation matrix and the second occupation matrix The number of pixels contained in the union area of the region.
  • the effective area of the first occupied matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupied matrix is the i-th second point cloud block according to the projection.
  • the area occupied by the direction after the two-dimensional plane is projected.
  • the first occupied matrix is the matrix area corresponding to the effective area of the first occupied matrix
  • the second occupied matrix is the matrix area corresponding to the effective area of the second occupied matrix.
  • the method may further include:
  • FIG. 9 is a schematic diagram of an occupation diagram according to an embodiment of the present application.
  • the left and right sides of FIG. 9 respectively show occupation diagrams corresponding to adjacent two-frame point cloud blocks.
  • the order of the previous frame point cloud blocks 41 to 44 is the point cloud blocks 41 to 44 in order.
  • the order of the point cloud blocks 51 to 54 is the point cloud blocks 51 to 54 in order.
  • the coding compression performance can be improved when the side information of the point cloud block is subsequently encoded.
  • the point cloud data packing method provided by the embodiment obtains the order of the current frame point cloud block according to the order of the previous frame point cloud block, ensures the consistency of the point cloud blocks of the two frames before and after, and improves the subsequent The encoding compression performance.
  • the embodiment further provides an encoding device, including a processing module, for performing the method for packaging the point cloud data provided by the embodiment of the present application.
  • an encoding device including a processing module, for performing the method for packaging the point cloud data provided by the embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an encoding apparatus according to Embodiment 1 of the present application.
  • the encoding apparatus provided in the embodiment of the present application is used to execute the encoding method provided by any of the method embodiments shown in FIG. 5 to FIG.
  • the coding apparatus provided in this embodiment of the present application may include:
  • the determining module 61 is configured to determine X first point cloud blocks in the M first point cloud blocks of the current frame.
  • the X first point cloud blocks and the X second point cloud blocks have a preset matching relationship, and the X second point cloud blocks are included in the previous frame of the current frame.
  • X is less than or equal to M, and X and M are both positive integers.
  • the obtaining module 62 is configured to obtain side information of the X first point cloud blocks and side information of the X second point cloud blocks.
  • the encoding module 63 is configured to obtain X sets of side information difference values according to side information of the X first point cloud blocks and side information of the X second point cloud blocks, and encode the X sets of side information difference values.
  • the obtaining module 62 is further configured to:
  • the encoding module 63 is also used to:
  • the first coded bit number corresponding to the side information of the Y first point cloud blocks is determined according to the maximum value A.
  • the first coded bit number is encoded.
  • the side information of the Y first point cloud blocks is encoded using the first number of coded bits.
  • the obtaining module 62 is further configured to:
  • the encoding module 63 is also used to:
  • the maximum value Bk is greater than or equal to the maximum value Ak, it is determined that the bit corresponding to the k-th side information in the first identification information is the first symbol. If the maximum value Bk is smaller than the maximum value Ak, it is determined that the bit corresponding to the k-th side information in the first identification information is the second symbol.
  • the determining module 61 is specifically configured to determine a preset matching relationship by using the following steps:
  • N second point cloud blocks in the previous frame of the current frame where N is a positive integer.
  • the value Qij is associated, and the Qik with the largest correlation value is determined, wherein the projection direction of the j unmatched first point cloud blocks is the same as the projection direction of the ith second point cloud block.
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to Qik matches the i-th second point cloud block, wherein the kth first point cloud block is j first points that have not yet matched One of the clouds.
  • the determining module 61 is specifically configured to:
  • the X first point cloud blocks are determined in the O first point cloud blocks, and the O first first point cloud blocks are the first point cloud blocks matching the N second point cloud blocks, O ⁇ X.
  • the associated value Qij is a quotient of the first reference value and the second reference value.
  • the first reference value is an area of an intersection area of the first occupation matrix and the second occupation matrix
  • the second reference value is an area of a union area of the first occupation matrix and the second occupation matrix.
  • the first reference value is a number of pixel points included in an intersection area of the effective area of the first occupation matrix and the effective area of the second occupation matrix
  • the second reference value is valid for the effective area of the first occupation matrix and the second occupation matrix The number of pixels contained in the union area of the region.
  • the effective area of the first occupied matrix is the area actually occupied by the jth first point cloud block after being projected on the two-dimensional plane according to the projection direction
  • the effective area of the second occupied matrix is the i-th second point cloud block according to the projection.
  • the area occupied by the direction after the two-dimensional plane is projected.
  • the first occupied matrix is the matrix area corresponding to the effective area of the first occupied matrix
  • the second occupied matrix is the matrix area corresponding to the effective area of the second occupied matrix.
  • the encoding module 63 is specifically configured to:
  • the difference between the side information of the X first point cloud blocks and the side information of the X second point cloud blocks matching the X first point cloud blocks is determined as the X group side information difference value.
  • the obtaining module 62 is further configured to obtain matching information, where the matching information indicates a matching relationship between the X first point cloud blocks and the X second point cloud blocks.
  • the encoding module 63 is further configured to encode the matching information.
  • the encoding module 63 is specifically configured to:
  • the encoding module 63 is further configured to:
  • the fourth coded bit number is determined according to M.
  • X is encoded using the fourth number of coded bits.
  • the side information includes at least one of the following: a minimum value of the X coordinate of the point cloud block in the three-dimensional coordinate system, a minimum value of the Y coordinate of the point cloud block in the three-dimensional coordinate system, and a point cloud block in the three-dimensional coordinate system.
  • the coding apparatus provided in this embodiment may perform the coding method provided in any of the embodiments shown in FIG. 5 to FIG. 7.
  • the technical principle and technical effects are similar, and details are not described herein again.
  • FIG. 11 is a schematic structural diagram of a decoding apparatus according to Embodiment 1 of the present application.
  • the decoding apparatus provided in the embodiment of the present application is configured to execute the decoding method provided by the method embodiment shown in FIG.
  • the decoding apparatus provided by the embodiment of the present application may include:
  • the decoding module 72 is configured to obtain, according to the code stream, an X group side information difference value of the X first point cloud blocks of the current frame.
  • the M first point cloud blocks of the current frame include X first point cloud blocks, and the X first point cloud blocks have a preset matching relationship with the X second point cloud blocks of the previous frame of the current frame.
  • X is less than or equal to M, and X and M are both positive integers.
  • the obtaining module 71 is configured to obtain side information of the X second point cloud blocks.
  • the decoding module 72 is further configured to obtain side information of the X first point cloud blocks according to the X group side information difference value and the X second point cloud block side information.
  • the decoding module 72 is further configured to:
  • the side information of the Y first point cloud blocks is obtained according to the code stream by using the first coded bit number.
  • the decoding module 72 is further configured to:
  • the second identification information is obtained according to the code stream.
  • the second identifier information is the first symbol, determining the second number of coded bits according to the maximum value Bk of the kth side edge information of the X first point cloud blocks, and obtaining the first M numbers according to the code stream by using the second coded bit number.
  • the kth side information of the remaining Y first point cloud blocks in the point cloud block, k 1, . . . , Z.
  • the first identification information is obtained.
  • the bit corresponding to the kth side information in the first identification information is the second symbol, obtain the third number of coded bits according to the code stream, and obtain the first first point cloud blocks according to the code stream by using the third coded bit number.
  • the decoding module 72 is further configured to:
  • the fourth coded bit number is determined according to M.
  • X is obtained from the code stream using the fourth number of coded bits.
  • the decoding apparatus provided in this embodiment can perform the decoding method provided in the embodiment shown in FIG. 8.
  • the technical principle and technical effects are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of an encoder according to Embodiment 1 of the present application.
  • the encoder provided in this embodiment may include: a processor 81 and a memory 82.
  • the memory 82 is used to store instructions.
  • the processor 81 is configured to execute the instructions stored in the memory, so that the encoder performs the encoding method provided by any of the embodiments shown in FIG. 5 to FIG. 7.
  • the specific implementation manner and the technical effects are similar. Narration.
  • the code may also include a transceiver 83 for communicating with other devices.
  • FIG. 13 is a schematic structural diagram of a decoder according to Embodiment 1 of the present application.
  • the decoder provided in this embodiment may include: a processor 91 and a memory 92.
  • the memory 92 is used to store instructions.
  • the processor 91 is configured to execute the instructions stored in the memory, so that the network device performs the decoding method provided by the embodiment shown in FIG. 8.
  • the specific implementation manner and technical effects are similar, and details are not described herein again.
  • the decoder may also include a transceiver 93 for communicating with other devices.
  • the processor in the embodiment of the present application may be a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or the like. Programming logic devices, transistor logic devices, hardware components, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)) or the like.
  • a magnetic medium eg, a floppy disk, a hard disk, a magnetic tape
  • an optical medium eg, a DVD
  • a semiconductor medium eg, a solid state disk (SSD)
  • the matching information related to the embodiment of the present application may include any one of the following in another implementation manner:
  • the X index difference values are the difference between the index values of the X first point cloud blocks and the index values of the X second point cloud blocks corresponding to the X first point cloud blocks.
  • the decoding device may obtain or derive an index value of the X first point cloud blocks.
  • X is equal to 5.
  • the encoding device and the decoding device can know that the index values of the X first point cloud blocks are sequentially 0, 1, 2, 3, 4.
  • the index values of the five second point cloud blocks corresponding to the five first point cloud blocks are 0, 2, 3, 1, and 4, respectively.
  • the matching information may include index values of five second point cloud blocks that are matched with the five first point cloud blocks, specifically, 0, 2, 3, 1, 4.
  • the matching information can be encoded using 3 bits.
  • the matching information may include X index difference values.
  • the X index difference values may be: an index value of the first point cloud block minus an index value of the corresponding corresponding second point cloud block.
  • the X index difference values may be: 0-0, 1-2, 2-3, 3-1,4-4, that is, 0, -1, -1, 2, 0.
  • the matching information may include X index difference values.
  • the X index difference values may be: an index value of the second point cloud block corresponding to the first point cloud block and an index value of the first point cloud block.
  • the X index difference values may be: 0-0, 2-1,3-2, 1-3, 4-4, that is, 0, 1, 1, 2, 0.
  • acquiring side information of the X first point cloud blocks and side information of the X second point cloud blocks may include :
  • the index values of the five first point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the seven side information of the first point cloud block with an index value of 0 is labeled u0 0 , v0 0 , u1 0 , v1 0 , d1 0 , sizeU0 0 and sizeV0 0 .
  • the index values of the five second point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the seven side information of the second point cloud block with an index value of 2 is labeled pre_u0 2 , pre_v0 2 , pre_u1 2 , pre_v1 2 , pre_d1 2 , pre_sizeU0 2 and pre_sizeV0 2 .
  • the matching information includes an index value of the X first point cloud blocks and an index value of the X second point cloud blocks corresponding to the X first point cloud blocks.
  • the side information of the five second point cloud blocks corresponding to the matching of the five first point cloud blocks is as follows:
  • Delta_u0 0 u0 0 -pre_u0
  • delta_v0 0 v0 0 -pre_v0
  • delta_u1 0 u1 0 - pre_u1
  • Delta_u0 1 u0 1 -pre_u0 2
  • delta_v0 1 v0 1 -pre_v0 2
  • delta_u 1 u1 1 -pre_u1 2
  • Delta_v1 1 v1 1 -pre_v1 2
  • delta_d1 1 d1 1 -pre_d1 2
  • delta_sizeU0 1 sizeU0 1 -pre_sizeU0 2
  • delta_sizeV0 1 sizeV0 1 -pre_sizeV0 2 ;
  • Delta_u0 2 u0 2 -pre_u0 3
  • delta_v0 2 v0 2 -pre_v0 3
  • delta_u 2 u1 2 -pre_u1 3
  • Delta_v1 2 v1 2 -pre_v1 3
  • delta_d1 2 d1 2 -pre_d1 3
  • delta_sizeU0 2 sizeU0 2 -pre_sizeU0 3
  • delta_sizeV0 2 sizeV0 2 -pre_sizeV0 3 ;
  • Delta_u0 3 u0 3 -pre_u0 1
  • delta_v0 3 v0 3 -pre_v0 1
  • delta_u 3 u1 3 -pre_u1 1
  • Delta_u0 4 u0 4 -pre_u0 4
  • delta_v0 4 v0 4 -pre_v0 4
  • delta_u 4 u1 4 -pre_u1 4
  • Delta_v1 4 v1 4 -pre_v1 4
  • delta_d1 4 d1 4 -pre_d1 4
  • delta_sizeU0 4 sizeU0 4 -pre_sizeU0 4
  • delta_sizeV0 4 sizeV0 4 -pre_sizeV0 4 .
  • the matching information includes X index difference values.
  • the X index difference values are the index values of the X first point cloud blocks minus the difference values of the index values of the X second point cloud blocks corresponding to the X first point cloud blocks. For example, ⁇ 0, -1, -1, 2, 0 ⁇ .
  • the index values of the five first point cloud blocks are 0, 1, 2, 3, and 4, respectively. Since the five index difference values are 0, -1, -1, 2, 0, the index values of the five second point cloud blocks corresponding to the five first point cloud blocks are: 0-0, 1 -(-1), 2-(-1), 3-2, 4-0, ie, 0, 2, 3, 1, 4.
  • the side information of the five first point cloud blocks, the side information of the five second point cloud blocks corresponding to the matching of the five first point cloud blocks, and the side information difference of the five first point cloud blocks are the same as above. No longer.
  • the order of obtaining the side information of the first point cloud block and the side information of acquiring the second point cloud block are not limited.
  • the side information of the X first point cloud blocks may include:
  • the index values of the five second point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the seven side information of the second point cloud block with an index value of 2 is labeled pre_u0 2 , pre_v0 2 , pre_u1 2 , pre_v1 2 , pre_d1 2 , pre_sizeU0 2 and pre_sizeV0 2 .
  • the matching information includes index values of X second point cloud blocks that match the X first point cloud blocks.
  • the index values of the 5 second point cloud blocks are ⁇ 0, 2, 3, 1, 4 ⁇ .
  • the index values of the five first point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the side information of the five second point cloud blocks corresponding to the five first point cloud blocks whose index values are 0, 1, 2, 3, 4 are as follows:
  • the matching information includes an index value of the X first point cloud blocks and X index difference values.
  • the X index difference values are the difference between the index values of the X second point cloud blocks corresponding to the X first point cloud blocks and the index values of the X first point cloud blocks.
  • the index values of the five first point cloud blocks ⁇ 0, 1, 2, 3, 4 ⁇ , and the five index differences are ⁇ 0, 1, 1, 2, 0 ⁇ .
  • the index values of the five second point cloud blocks corresponding to the five first point cloud blocks are: 0+0, 1+1, 2+1, 3+(-2), 4+0, ie 0, 2, 3, 1, 4.
  • the side information of the five second point cloud blocks corresponding to the matching of the five first point cloud blocks is the same as above, and details are not described herein again.
  • the X first information may be obtained according to the X group side information difference value and the X second point cloud block side information.
  • the side information of the point cloud block may be obtained according to the X group side information difference value and the X second point cloud block side information.
  • the side information of the point cloud block has a normal axis index normalAxis
  • the side information of the X first point cloud blocks normal axis index normalAxis can pass the first point with X
  • the edge information of the second point cloud block matched by the cloud block is determined by the normal coordinate axis index normalAxis.
  • the index values of the five first point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the edge information of the first point cloud block with the index value of 0 is normalAxis labeled normalAxis 0 .
  • the index values of the five second point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the side information normal coordinate index normalAxis of the second point cloud block with an index value of 0 is marked as pre_normalAxis 0 .
  • the matching information includes index values of X second point cloud blocks that match the X first point cloud blocks.
  • the index values of the 5 second point cloud blocks are ⁇ 0, 2, 3, 1, 4 ⁇ .
  • the index values of the five first point cloud blocks are 0, 1, 2, 3, and 4, respectively.
  • the side information normal axis index normalAxis of the five second point cloud blocks corresponding to the five first point cloud blocks whose index values are 0, 1, 2, 3, 4 are as follows:
  • pre_normalAxis 0 pre_normalAxis 0 ;
  • pre_normalAxis 2 pre_normalAxis 2 ;
  • pre_normalAxis 3 pre_normalAxis 3 ;
  • pre_normalAxis 1 pre_normalAxis 1 ;
  • pre_normalAxis 4 pre_normalAxis 4 .
  • normalAxis 0 pre_normalAxis 0 ;
  • normalAxis 1 pre_normalAxis 2 ;
  • normalAxis 2 pre_normalAxis 3 ;
  • normalAxis 3 pre_normalAxis 1 ;
  • normalAxis 4 pre_normalAxis 4 .
  • the matching relationship may be determined by the following steps:
  • N second point cloud blocks in the previous frame of the current frame where N is a positive integer.
  • the projection direction of the j unmatched first point cloud blocks is the same as the projection direction of the ith second point cloud block.
  • the Qik is greater than the preset threshold, determining that the kth first point cloud block corresponding to Qik matches the i-th second point cloud block, wherein the kth first point cloud block is j first points that have not yet matched One of the clouds.
  • the second cloud block is identified by pre_patch.
  • the first cloud block is identified by a patch.
  • the good match index bestMatchIndex is -1. Where -1 is the default value of bestMatchIndex, and can also be other default values. For example, a value greater than or equal to N can be selected.
  • the best match index is used to indicate an index of the second point cloud block that matches the current first point cloud block.
  • the preset threshold can be identified as thr.
  • pre_patch[1] index value is 1
  • pre_patch[1] is calculated with all first point clouds satisfying the above conditions.
  • m is an index of the first point cloud block corresponding to the maximum value of the associated value. Compare the size of Q1m with the preset threshold thr.
  • pre_patch[2] index value 2
  • the array W stores all the first point cloud blocks that have a matching relationship with the second point cloud block, and assumes that there are matchedPatchCount.
  • the matchedPatchCount first point cloud blocks having a matching relationship are arranged in the array W in the same order as the N second point cloud blocks. Putting the remaining first point cloud patches in the M first point cloud blocks that do not have a matching relationship with the N second point cloud blocks into the array W, and placing the matchedPatchCount first matching relationships Behind the point cloud block.
  • the pre-matchedPatchCount of the array W is a patch with a matching relationship, and the rest are patches with no matching relationship.
  • the order of placing the first point cloud block without the matching relationship into the array W is not limited, and the patches of the M first point cloud blocks that do not have the matching relationship may be sequentially (that is, Put the patch with the bestMatchIndex of -1 into the array W. It is also possible to put a patch that does not have a matching relationship among the M first point cloud blocks (that is, a patch whose patch has a bestMatchIndex of -1) into the array W in a random order.
  • the first matchedPatchCount first point cloud blocks in the M first point cloud blocks are the first point cloud blocks having the matching relationship, and the subsequent M-matchedPatchCount first point cloud blocks have no matching relationship (the best matching index)
  • the embodiment of the present application further provides an encoding method, where, when X ⁇ M, the remaining Y firsts except the X first point cloud blocks in the M first point cloud blocks are provided.
  • the encoding method provided in this embodiment may include:
  • Step 21 Obtain Z kinds of side information of the remaining Y first point cloud blocks in the M first point cloud blocks.
  • Step 23 If the number of bits required for the maximum value Bk is greater than or equal to the number of bits required for the maximum value Ak, it is determined that the bit corresponding to the k-th side information in the first identification information is the first symbol, and is required according to the maximum value Bk.
  • the maximum value Bk of the kth side information of the X first point cloud blocks is 200, and the number of bits required for encoding Bk is 8 bits.
  • the maximum value Ak of the kth side information of the Y first point cloud blocks is 209, and the number of bits required to encode Ak is 8 bits.
  • the number of second coding bits corresponding to the k-th side information of the Y first point cloud blocks may be determined to be 8 bits according to the number of bits required for the maximum value Bk or the maximum value Bk. And encoding the kth side information of the Y first point cloud blocks by using the second coded bit number 8.
  • the encoding method provided by this embodiment does not compare the maximum value Bk with the maximum value Ak, but compares the number of bits required for the maximum value Bk and the number of bits required for the maximum value Ak.
  • the number of bits required for the maximum value Bk is greater than or equal to the number of bits required for the maximum value Ak
  • the k-th side information of the Y first point cloud blocks can be directly encoded by the number of bits required for the maximum value Bk. Since it is not necessary to specifically encode and notify the decoding device of the number of coded bits corresponding to the side information of the Y first point cloud blocks, the code stream is further compressed, and the coding efficiency and compression performance are improved.
  • Step 24 If the number of bits required for the maximum value Bk is less than the number of bits required for the maximum value Ak, it is determined that the bit corresponding to the k-th side information in the first identification information is the second symbol, and the number of bits required according to the maximum value Ak Or the maximum value Ak determines the third coded bit number corresponding to the kth side information of the Y first point cloud blocks, encodes the third coded bit number, and uses the third coded bit number to the Y first point cloud blocks.
  • Step 25 Encode the first identification information.
  • step 21 can be referred to the description of S601 in the embodiment shown in FIG. 7.
  • step 22 can be referred to the description of S602, and step 25 can be referred to the description of S605.
  • the technical principle and technical effect are similar and will not be described here.
  • encoding the third number of coded bits may include:
  • the third coded bit number is directly encoded.
  • the third coded bit number can be directly encoded by using 3 bits, and the coded code stream includes 0x6.
  • the decoding device can parse the code stream to obtain the third coded bit number.
  • the decoding device can parse 3 bits from the code stream, and if it is 0x6, the third coded bit number can be obtained as 6.
  • encoding the third coded bit number may include:
  • the difference between the number of third coded bits and the number of bits required for the maximum value Bk is encoded.
  • the number of third coded bits is generally greater than or equal to the number of coded bits required for the maximum value Ak, and the number of bits required for the maximum value Bk is three, then the number of third coded bits and the maximum value Bk are The difference between the number of bits required is 4 bits.
  • the difference can be encoded using 2 bits, and the encoded code stream includes 0x4.
  • the decoding device can obtain the difference bit information from the code stream.
  • the third number of coded bits is obtained based on the difference bit information and the number of bits required for the maximum value Bk.
  • the decoding device can parse 2 bits from the code stream, and if it is 0x4, the difference bit information can be obtained as 4.
  • the number of bits required to obtain the maximum value Bk is three. Then, the number of bits required for the difference bit information 4 and the maximum value Bk is 3, and the number of third coded bits is 7.
  • the correlation between point cloud data of consecutive frames is utilized, and the current frame and the previous frame of the current frame are consecutive two frames.
  • two consecutive frames may also be referred to as reference frames of the current frame and the current frame.
  • the reference frame of the current frame may be the previous frame of the current frame or the next frame of the current frame.
  • the point cloud block in the current frame may be referred to as a first point cloud block.
  • a point cloud block in a reference frame may be referred to as a reference point cloud block.
  • the previous frame or the next frame of the current frame may be the frame after the adjustment sequence.
  • the previous or subsequent frame of the current frame is not necessarily the previous or subsequent frame in the time series.
  • the input number of frames to be processed point cloud can be a chronologically adjusted sequence.
  • the time series frame sequence is the first, second, third, ..., 7 frames, and the adjusted order becomes the first, third, seventh, fourth, fifth, second, and sixth.
  • the current frame is the seventh frame
  • the previous frame of the seventh frame is the third frame in the frame sequence after the adjustment sequence
  • the latter frame of the seventh frame is the fourth frame in the frame sequence after the adjustment sequence.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本申请实施例提供一种编码方法、解码方法和装置。其中,编码方法包括:在当前帧的M个第一点云块中确定X个第一点云块;X个第一个点云块与X个第二点云块存在预设的匹配关系,X个第二点云块包含在当前帧的前一帧中;其中,X小于或者等于M,且X和M均为正整数;获取X个第一点云块的边信息和X个第二点云块的边信息;根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值;对X组边信息差值进行编码。本申请实施例提供的编码方法,利用前后两帧点云数据的关联性,提升了编码的压缩性能。

Description

编码方法、解码方法和装置
本申请要求于2018年01月17日提交中国专利局、申请号为201810045808.X、申请名称为《编码方法、解码方法和装置》的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及图像处理技术领域,尤其涉及一种编码方法、解码方法和装置。
背景技术
随着计算机技术和三维(Three Dimensions,3D)传感器技术的不断发展,采集点云数据越来越便捷,采集的数据质量也越来越高,数据规模也越来越大。所谓点云或者点云数据,是指通过测量仪器得到的产品外观表面的点数据集合。面对海量的点云数据,如何有效的对点云数据进行高质量压缩、编码、存储和传输变得非常重要。
对点云数据进行处理时,一种常用的处理方法为:首先,对当前帧的点云数据进行分割获得多个点云块(也称为patch)。对多个点云块进行投影形成多个二维图像块。对所有的二维图像块进行打包操作(也称为packing),形成深度图和纹理图(如果点云数据带有颜色信息的话)。然后,对深度图和纹理图进行基于图像或者视频编码的方式进行编码,以及对点云块的边信息进行编码。这种方法充分利用了成熟的编码优势,能够得到很高的编码效率。
但是,连续帧的点云数据之间具有很强的相关性。上述方法仅针对每一帧点云数据进行单独处理,导致编码压缩性能的损失。
发明内容
本申请实施例提供一种编码方法、解码方法和装置,提升了编码压缩性能。
第一方面,本申请实施例提供一种编码方法,该方法包括:在当前帧的M个第一点云块中确定X个第一点云块,获取X个第一点云块的边信息和X个第二点云块的边信息,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,对X组边信息差值进行编码。
通过第一方面提供的编码方法,利用前后两帧点云数据的关联性,通过对根据X个第一点云块的边信息和X个第二点云块的边信息得到的X组边信息差值进行编码,降低了编码损耗,提升了编码压缩性能。
可选的,在第一方面的一种可能的实施方式中,若X<M,还包括:获取M个第一点云块中剩余的Y个第一点云块的边信息,Y=M-X。获取Y个第一点云块的边信息的最大值A。根据最大值A确定Y个第一点云块的边信息对应的第一编码比特数。对第一编码比特数进行编码。采用第一编码比特数对Y个第一点云块的边信息进行编码。
通过该可能的实施方式提供的编码方法,根据剩余的Y个第一点云块的边信息确定编 码所需比特数,避免了根据所有M个第一点云块的边信息确定编码所需比特数,减小了数据处理数据量,提升了编码的效率和合理性,提升了编码性能。
可选的,在第一方面的一种可能的实施方式中,若X<M,且边信息为Z种,Z>1,还包括:获取M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X;获取X个第一点云块的第k种边信息的最大值Bk和Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z;若最大值Bk大于或者等于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第一符号;若最大值Bk小于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第二符号;若第一标识信息中每个比特位均为第一符号,则确定第二标识信息为第一符号,并对第二标识信息编码;根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z;若第一标识信息中至少一个比特位为第二符号,则确定第二标识信息为第二符号,对第一标识信息和第二标识信息进行编码;若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z;若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据最大值Ak确定Y个第一点云块的第k种边信息对应的第三编码比特数,对第三编码比特数进行编码,并采用第三编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
通过该可能的实施方式提供的编码方法,通过将X个第一点云块的边信息的最大值与Y个第一点云块的边信息的最大值进行比较,进而可以确定Y个第一点云块的边信息对应的编码比特数。当采用根据X个第一点云块的边信息的最大值确定的编码比特数对Y个第一点云块的边信息进行编码时,进一步压缩了码流,提高了编码效率和压缩性能。
可选的,在第一方面的一种可能的实施方式中,预设的匹配关系通过下述步骤确定:获取当前帧的前一帧中N个第二点云块,N为正整数。对于N个第二点云块中的第i个第二点云块,i=1,…,N,获取第i个第二点云块与j个尚未匹配的第一点云块之间的关联值Qij,并确定出关联值最大的Qik,其中,j个尚未匹配的第一点云块的投影方向与第i个第二点云块的投影方向相同。若Qik大于预设阈值,则确定Qik对应的第k个第一点云块与第i个第二点云块匹配,其中,第k个第一点云块为j个尚未匹配的第一点云块中的一个。
可选的,在第一方面的一种可能的实施方式中,若确定出O个第一点云块存在匹配关系,则在当前帧的M个第一点云块中确定X个第一点云块,包括:在O个第一点云块中确定X个第一点云块,O个第一点云块为与N个第二点云块匹配的第一点云块,O≥X。
可选的,在第一方面的一种可能的实施方式中,关联值Qij为第一参考值与第二参考值的商。第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,第二参考值为第一占用矩阵和第二占用矩阵的并集区域的面积。或者,第一参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的交集区域中包含的像素点个数,第二参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的并集区域中包含的像素点个数。其中,第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,第二占用矩阵的有效区域为第i个第二点云块根据投影方向在二维平面投影后实际占用的区域,第一占用矩阵为第一占用矩阵的有效区域对应的矩阵区域,第二占用矩阵为第二占用矩阵的有效区域对应的矩阵区域。
可选的,在第一方面的一种可能的实施方式中,在确定预设的匹配关系之前,还可以包括:对M个第一点云块进行排序。
通过该可能的实施方式提供的编码方法,通过对M个第一点云块进行排序,可以提升第一点云块和第二点云块的匹配速度,进而提升编码处理速度。
可选的,在第一方面的一种可能的实施方式中,预设的匹配关系包括:按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,X个第一个点云块中的第k个第一点云块与X个第二个点云块中的第k个第二点云块匹配,k=1,…,X。
通过该可能的实施方式提供的编码方法,设置排序相同的第一点云块和第二点云块匹配,简化了匹配关系,提升了编码速度。
可选的,在第一方面的一种可能的实施方式中,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,包括:将X个第一点云块的边信息分别和与X个第一点云块匹配的X个第二点云块的边信息之间的差值确定为X组边信息差值。方法还包括:获取匹配信息,匹配信息指示了X个第一点云块与X个第二点云块之间的匹配关系。对匹配信息进行编码。
通过该可能的实施方式提供的编码方法,将排序相同的第一点云块和第二点云块的边信息对应相减获得X组边信息差值,简化了差值计算的复杂度,提升了编码速度。
可选的,在第一方面的一种可能的实施方式中,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,包括:按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,将X个第一个点云块中第k个第一点云块的边信息与X个第二个点云块中第k个第二点云块的边信息之间的差值,确定为X组边信息差值中的第k组边信息差值,k=1,…,X。
通过该可能的实施方式提供的编码方法,将X个第一点云块的边信息分别和与X个第一点云块匹配的X个第二点云块的边信息之间的差值确定为X组边信息差值,提升了编码的准确性,进而提升了编码性能。
可选的,在第一方面的一种可能的实施方式中,还包括:根据M确定第四编码比特数。采用第四编码比特数对X进行编码。
第二方面,本申请实施例提供一种解码方法,该方法包括:根据码流获得当前帧X个第一点云块的X组边信息差值。获取X个第二点云块的边信息。根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息。
可选的,在第二方面的一种可能的实施方式中,若X<M,方法还包括:根据码流获得第一编码比特数,第一编码比特数为编码装置根据M个第一点云块中剩余的Y个第一点云块的边信息的最大值A确定的,Y=M-X。采用第一编码比特数根据码流获得Y个第一点云块的边信息。
可选的,在第二方面的一种可能的实施方式中,若X<M,且边信息为Z种,Z>1,方法还包括:根据码流获得第二标识信息;若第二标识信息为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z;若第二标识信息为第二符号,则获得第一标识信息;若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用 第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z;若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用第三编码比特数根据码流获得Y个第一点云块的第k种边信息,第三编码比特数为编码装置根据Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
可选的,在第二方面的一种可能的实施方式中,方法还包括:根据M确定第四编码比特数。采用第四编码比特数根据码流获得X。
第三方面,本申请实施例提供一种编码装置,包括:确定模块、获取模块和编码模块。确定模块用于在当前帧的M个第一点云块中确定X个第一点云块。获取模块用于获取X个第一点云块的边信息和X个第二点云块的边信息。编码模块用于根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,对X组边信息差值进行编码。
可选的,在第三方面的一种可能的实施方式中,若X<M,获取模块还用于:获取M个第一点云块中剩余的Y个第一点云块的边信息,Y=M-X。获取Y个第一点云块的边信息的最大值A。编码模块还用于:根据最大值A确定Y个第一点云块的边信息对应的第一编码比特数。对第一编码比特数进行编码。采用第一编码比特数对Y个第一点云块的边信息进行编码。
可选的,在第三方面的一种可能的实施方式中,若X<M,且边信息为Z种,Z>1,获取模块还用于:获取M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X。获取X个第一点云块的第k种边信息的最大值Bk和Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z。编码模块还用于:若最大值Bk大于或者等于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第一符号;若最大值Bk小于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第二符号;若第一标识信息中每个比特位均为第一符号,则确定第二标识信息为第一符号,并对第二标识信息编码;根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z;若第一标识信息中至少一个比特位为第二符号,则确定第二标识信息为第二符号,对第一标识信息和第二标识信息进行编码;若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z;若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据最大值Ak确定Y个第一点云块的第k种边信息对应的第三编码比特数,对第三编码比特数进行编码,并采用第三编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
可选的,在第三方面的一种可能的实施方式中,确定模块具体用于通过下述步骤确定预设的匹配关系:获取当前帧的前一帧中N个第二点云块,N为正整数。对于N个第二点云块中的第i个第二点云块,i=1,…,N,获取第i个第二点云块与j个尚未匹配的第一点云块之间的关联值Qij,并确定出关联值最大的Qik,其中,j个尚未匹配的第一点云块的投影方向与第i个第二点云块的投影方向相同。若Qik大于预设阈值,则确定Qik对应的第k个第一点云块与第i个第二点云块匹配,其中,第k个第一点云块为j个尚未匹配的第一点云块中的一个。
可选的,在第三方面的一种可能的实施方式中,若确定出O个第一点云块存在匹配关系,确定模块具体用于:在O个第一点云块中确定X个第一点云块,O个第一点云块为与N个第二点云块匹配的第一点云块,O≥X。
可选的,在第三方面的一种可能的实施方式中,关联值Qij为第一参考值与第二参考值的商。第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,第二参考值为第一占用矩阵和第二占用矩阵的并集区域的面积。或者,第一参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的交集区域中包含的像素点个数,第二参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的并集区域中包含的像素点个数。其中,第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,第二占用矩阵的有效区域为第i个第二点云块根据投影方向在二维平面投影后实际占用的区域,第一占用矩阵为第一占用矩阵的有效区域对应的矩阵区域,第二占用矩阵为第二占用矩阵的有效区域对应的矩阵区域。
可选的,在第三方面的一种可能的实施方式中,预设的匹配关系包括:按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,X个第一个点云块中的第k个第一点云块与X个第二个点云块中的第k个第二点云块匹配,k=1,…,X。
可选的,在第三方面的一种可能的实施方式中,编码模块具体用于:将X个第一点云块的边信息分别和与X个第一点云块匹配的X个第二点云块的边信息之间的差值确定为X组边信息差值。获取模块还用于,获取匹配信息,匹配信息指示了X个第一点云块与X个第二点云块之间的匹配关系。编码模块还用于,对匹配信息进行编码。
可选的,在第三方面的一种可能的实施方式中,编码模块具体用于:按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,将X个第一个点云块中第k个第一点云块的边信息与X个第二个点云块中第k个第二点云块的边信息之间的差值,确定为X组边信息差值中的第k组边信息差值,k=1,…,X。
可选的,在第三方面的一种可能的实施方式中,编码模块还用于:根据M确定第四编码比特数。采用第四编码比特数对X进行编码。
第四方面,本申请实施例提供一种解码装置,包括:解码模块和获取模块。解码模块用于根据码流获得当前帧X个第一点云块的X组边信息差值。获取模块用于获取X个第二点云块的边信息。解码模块还用于,根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息。
可选的,在第四方面的一种可能的实施方式中,若X<M,解码模块还用于:根据码流获得第一编码比特数,第一编码比特数为编码装置根据M个第一点云块中剩余的Y个第一点云块的边信息的最大值A确定的,Y=M-X。采用第一编码比特数根据码流获得Y个第一点云块的边信息。
可选的,在第四方面的一种可能的实施方式中,若X<M,且边信息为Z种,Z>1,解码模块还用于:根据码流获得第二标识信息;若第二标识信息为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z;若第二标识信息为第二符号,则获得第一标识信息;若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数, 采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z;若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用第三编码比特数根据码流获得Y个第一点云块的第k种边信息,第三编码比特数为编码装置根据Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
可选的,在第四方面的一种可能的实施方式中,解码模块还用于:根据M确定第四编码比特数。采用第四编码比特数根据码流获得X。
结合上述第一方面以及第一方面的各可能的实施方式、第二方面以及第二方面的各可能的实施方式、第三方面以及第三方面的各可能的实施方式、第四方面以及第四方面的各可能的实施方式,X个第一个点云块与X个第二点云块存在预设的匹配关系,X个第二点云块包含在当前帧的前一帧中。其中,X小于或者等于M,且X和M均为正整数。边信息包括下列中的至少一种:点云块在三维坐标系中的X坐标最小值、点云块在三维坐标系中的Y坐标最小值、点云块在三维坐标系中的Z坐标最小值、点云块根据投影方向在占用图中的X坐标最小值和点云块根据投影方向在占用图中的Y坐标最小值。
第五方面,本申请实施例提供一种编码器,该编码器包括处理器和存储器,存储器用于存储指令,处理器用于执行存储器中存储的指令,以使编码器执行上述第一方面的方法。
上述第五方面的编码器还可以包括收发器,该收发器用于和其他设备通信。
第六方面,本申请实施例提供一种解码器,该解码器包括处理器和存储器,存储器用于存储指令,处理器用于执行存储器中存储的指令,以使解码器执行上述第二方面的方法。
上述第六方面的解码器还可以包括收发器,该收发器用于和其他设备通信。
第七方面,本申请实施例提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现第一方面或第二方面任一项所述的方法。
第八方面,本申请实施例提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。编码器或者解码器的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得编码器或者解码器实施第一方面或者第二方面的各种实施方式提供的方法。
本申请第九方面提供一种芯片,所述芯片可应用于编码器,所述芯片包括:至少一个通信接口,至少一个处理器,至少一个存储器,所述通信接口、存储器和处理器通过总线互联,所述处理器调用所述存储器中存储的计算机程序,以执行本申请第一方面提供的编码方法。
本申请第十方面提供一种芯片,所述芯片可应用于解码器,所述芯片包括:至少一个通信接口,至少一个处理器,至少一个存储器,所述通信接口、存储器和处理器通过总线互联,所述处理器调用所述存储器中存储的计算机程序,以执行本申请第二方面提供的解码方法。
可选的,在第一方面的一种可能的实施方式中,若X<M,且所述边信息为Z种,Z≥1,所述方法还包括:
获取所述M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X,Y为正整数;
获取所述X个第一点云块的第k种边信息的最大值Bk和所述Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z;
若所述最大值Bk大于或者等于所述最大值Ak,或者,所述最大值Bk所需比特数大于或者等于所述最大值Ak所需比特数,则确定与所述第k种边信息对应的标识信息为第一符号;
若所述最大值Bk小于所述最大值Ak,或者,所述最大值Bk所需比特数小于所述最大值Ak所需比特数,则确定与所述第k种边信息对应的标识信息为第二符号。
可选的,在第一方面的一种可能的实施方式中,所述方法还包括:
若与Z种边信息对应的Z个标识信息均为所述第一符号,则确定第二标识信息为第三符号,并将所述第二标识信息编码入所述码流中;
根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
可选的,在第一方面的一种可能的实施方式中,所述方法还包括:
若与Z种边信息对应的Z个标识信息中的至少一个标识信息为所述第二符号,则确定第二标识信息为第四符号,将所述与Z种边信息对应的Z个标识信息和所述第二标识信息编码入所述码流中;
若与所述第k种边信息对应的标识信息为所述第一符号,则根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z;或者,
若与所述第k种边信息对应的标识信息为所述第二符号,则根据所述最大值Ak确定所述Y个第一点云块的第k种边信息对应的第三编码比特数,将所述第三编码比特数编码入所述码流中,并采用所述第三编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
可选的,在第一方面的一种可能的实施方式中,所述将所述第三编码比特数编码入所述码流中,包括:
将所述第三编码比特数与所述最大值Bk所需比特数之间的差值编码入所述码流中。
可选的,在第一方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第一方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第一方面的一种可能的实施方式中,所述边信息差值包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
可选的,在第一方面的一种可能的实施方式中,所述边信息包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
可选的,在第一方面的一种可能的实施方式中,所述当前帧的参考帧包括所述当前帧的前一帧,或者,所述当前帧的后一帧。
可选的,在第二方面的一种可能的实施方式中,还包括:
若所述第二标识信息为第四符号,则从所述码流中获得与Z种边信息对应的Z个标识信息;
若与第k种边信息对应的标识信息为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,k=1,…,Z。
可选的,在第二方面的一种可能的实施方式中,还包括:
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z。
可选的,在第二方面的一种可能的实施方式中,还包括:
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得差值;所述差值 为所述Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述最大值Bk所需比特数之间的差值,k=1,…,Z;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息。
可选的,在第二方面的一种可能的实施方式中,还包括:
若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为所述Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述最大值Bk所需比特数之间的差值,k=1,…,Z;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息。
可选的,在第二方面的一种可能的实施方式中,所述方法还包括:
解析所述码流,以获得匹配信息;所述匹配信息用于指示所述X个第一点云块与所述X个参考点云块之间的匹配关系;
所述获取X个参考点云块的边信息,包括:
根据所述匹配信息,确定与X个第一点云块匹配对应的所述X个参考点云块;
获得所述X个参考点云块的边信息。
可选的,在第二方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第二方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第二方面的一种可能的实施方式中,所述边信息差值包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影 方向在占用图中的Y坐标最小值之间的差值。
可选的,在第二方面的一种可能的实施方式中,所述边信息包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
可选的,在第三方面的一种可能的实施方式中,若X<M,且所述边信息为Z种,Z≥1,所述获取模块还用于:
获取所述M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X,Y为正整数;
获取所述X个第一点云块的第k种边信息的最大值Bk和所述Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z;
若所述最大值Bk大于或者等于所述最大值Ak,或者,所述最大值Bk所需比特数大于或者等于所述最大值Ak所需比特数,则确定与所述第k种边信息对应的标识信息为第一符号;
若所述最大值Bk小于所述最大值Ak,或者,所述最大值Bk所需比特数小于所述最大值Ak所需比特数,则确定与所述第k种边信息对应的标识信息为第二符号。
可选的,在第三方面的一种可能的实施方式中,所述编码模块还用于:
若与Z种边信息对应的Z个标识信息均为所述第一符号,则确定第二标识信息为第三符号,并将所述第二标识信息编码入所述码流中;
根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
可选的,在第三方面的一种可能的实施方式中,所述编码模块还用于:
若与Z种边信息对应的Z个标识信息中的至少一个标识信息为所述第二符号,则确定第二标识信息为第四符号,将所述与Z种边信息对应的Z个标识信息和所述第二标识信息编码入所述码流中;
若与所述第k种边信息对应的标识信息为所述第一符号,则根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z;或者,
若与所述第k种边信息对应的标识信息为所述第二符号,则根据所述最大值Ak确定所述Y个第一点云块的第k种边信息对应的第三编码比特数,将所述第三编码比特数编码入所述码流中,并采用所述第三编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
可选的,在第三方面的一种可能的实施方式中,所述编码模块具体用于:
将所述第三编码比特数与所述最大值Bk所需比特数之间的差值编码入所述码流中。
可选的,在第三方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第三方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第三方面的一种可能的实施方式中,所述边信息差值包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
可选的,在第三方面的一种可能的实施方式中,所述边信息包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
可选的,在第三方面的一种可能的实施方式中,所述当前帧的参考帧包括所述当前帧的前一帧,或者,所述当前帧的后一帧。
可选的,在第四方面的一种可能的实施方式中,所述解码模块还用于:
若所述第二标识信息为第四符号,则从所述码流中获得与Z种边信息对应的Z个标识信息;
若与第k种边信息对应的标识信息为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,k=1,…,Z。
可选的,在第四方面的一种可能的实施方式中,所述解码模块还用于:
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z。
可选的,在第四方面的一种可能的实施方式中,所述解码模块还用于:
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得差值;所述差值为所述Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述最大值Bk所需比特数之间的差值,k=1,…,Z;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息。
可选的,在第四方面的一种可能的实施方式中,所述解码模块还用于:
若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为所述Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述最大值Bk所需比特数之间的差值,k=1,…,Z;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息。
可选的,在第四方面的一种可能的实施方式中,所述解码模块还用于:
解析所述码流,以获得匹配信息;所述匹配信息用于指示所述X个第一点云块与所述X个参考点云块之间的匹配关系;
所述获取模块具体用于:
根据所述匹配信息,确定与X个第一点云块匹配对应的所述X个参考点云块;
获得所述X个参考点云块的边信息。
可选的,在第四方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第 一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第四方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第四方面的一种可能的实施方式中,所述边信息差值包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
可选的,在第四方面的一种可能的实施方式中,所述边信息包括下列中的至少一种:
所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
第十一方面,本申请实施例提供一种确定点云块之间匹配关系的方法,包括:
获取当前帧中的M个第一点云块以及所述当前帧的参考帧中的N个参考点云块;M和N均为正整数;
根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系;X小于或者等于M,X小于或者等于N。
可选的,在第十一方面的一种可能的实施方式中,所述根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系,包括:
根据所述M个第一点云块与所述N个参考点云块,获得所述M个第一点云块与所述N个参考点云块之间的关联值;
根据所述M个第一点云块与所述N个参考点云块之间的关联值,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系。
可选的,在第十一方面的一种可能的实施方式中,所述根据所述M个第一点云块与所述N个参考点云块之间的关联值,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系,包括:
对于所述N个参考点云块中的第i个参考点云块,i=1,…,N,获取所述第i个参考点云块与j个尚未匹配的第一点云块之间的关联值,并在j个关联值中确定出关联值最大的Qik;其中,所述j个尚未匹配的第一点云块包括:在所述当前帧中的M个第一点云块中与所述第i个参考点云块之前的i-1个参考点云块均不匹配,且投影方向与所述第i个参考点云块的投影方向相同的第一点云块;j小于或等于M,k小于或等于j,j、k和M均为正整数;
若所述Qik大于预设阈值,则确定所述Qik对应的第k个第一点云块与所述第i个参考点云块匹配,其中,所述第k个第一点云块为所述j个尚未匹配的第一点云块中的一个。
可选的,在第十一方面的一种可能的实施方式中,所述关联值为第一参考值与第二参考值的商;
所述第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,所述第二参考值为所述第一占用矩阵和所述第二占用矩阵的并集区域的面积;或者,
所述第一参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的交集区域中包含的像素点个数,所述第二参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的并集区域中包含的像素点个数;
其中,所述第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,所述第二占用矩阵的有效区域为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域,所述第一占用矩阵为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域对应的矩阵区域,所述第二占用矩阵为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域对应的矩阵区域。
可选的,在第十一方面的一种可能的实施方式中,所述根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系,包括:
按照所述N个参考点云块在所述参考帧中的排列顺序和所述M个第一点云块在所述当前帧中的排列顺序,确定X个第一点云块分别与所述X个参考点云块匹配。
可选的,在第十一方面的一种可能的实施方式中,还包括:
将所述当前帧中的所述X个第一点云块,按照与所述X个参考点云块的匹配顺序排序;
将所述当前帧中除所述X个第一点云块之外的至少一个第一点云块,分别排列在所述X个第一点云块的后面。
第十二方面,本申请实施例提供一种编码方法,包括:
获取匹配信息,所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X个参考点云块包含在当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M为当前帧中的第一点云块的个数;
将所述匹配信息编入码流。
可选的,在第十二方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第十二方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第十二方面的一种可能的实施方式中,
所述方法还包括:
将X组边信息差值编码入所述码流,其中,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值。
可选的,在第十二方面的一种可能的实施方式中,所述方法还包括:将所述X编码入所述码流中;或者,所述方法还包括:根据所述M确定第四编码比特数;采用所述第四编码比特数将所述X编码入所述码流中。
第十三方面,本申请实施例提供一种解码方法,包括:
解析码流,以获得匹配信息;所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X表示当前帧中与参考点云块匹配的第一点云块的个数,所述参考点云块包含在所述当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M表示所述当前帧中的第一点云块的数量;
根据所述匹配信息,获得所述X个第一点云块的边信息。
可选的,在第十三方面的一种可能的实施方式中,所述根据所述匹配信息,获得所述X个第一点云块的边信息,包括:
根据所述匹配信息,确定所述X个参考点云块;
根据所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
可选的,在第十三方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第十三方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第十三方面的一种可能的实施方式中,所述方法还包括:
解析所述码流,以得到X组边信息差值,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值;
所述根据所述匹配信息,获得所述X个第一点云块的边信息,包括:
根据所述匹配信息,确定所述X个参考点云块;
根据所述X组边信息差值和所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
可选的,在第十三方面的一种可能的实施方式中,所述方法还包括:解析所述码流,以得到所述X;或者,所述方法还包括:根据所述M确定第四编码比特数;采用所述第四编码比特数解析所述码流以获得所述X。
第十四方面,本申请实施例提供一种解码方法,包括:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得与Z种边信息对应的Z个标识信息;
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z,Z≥1,Y和Z均为正整数。
可选的,在第十四方面的一种可能的实施方式中,还包括:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第十四方面的一种可能的实施方式中,还包括:
若与第k种边信息对应的标识信息为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
第十五方面,本申请实施例提供一种解码方法,包括:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得Y个第一点云块的第k种 边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z,Z≥1,Y和Z均为正整数。
可选的,在第十五方面的一种可能的实施方式中,还包括:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第十五方面的一种可能的实施方式中,还包括:
若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
第十六方面,本申请实施例提供一种解码方法,包括:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得与Z种边信息对应的Z个标识信息;
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得差值;所述差值为当前帧中除X个第一点云块之外的Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述当前帧中所述X个第一点云块的第k种边信息的最大值Bk所需比特数之间的差值;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,k=1,…,Z,Z≥1,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第十六方面的一种可能的实施方式中,还包括:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第十六方面的一种可能的实施方式中,还包括:
若与第k种边信息对应的标识信息为第一符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
第十七方面,本申请实施例提供一种解码方法,包括:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为当前帧中除X个第一点云块之外的Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述当前帧中所述X个第一点云块的第k种边信息的最大值Bk 所需比特数之间的差值;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,k=1,…,Z,Z≥1,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第十七方面的一种可能的实施方式中,还包括:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第十七方面的一种可能的实施方式中,还包括:
若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
第十八方面,本申请实施例提供一种确定点云块之间匹配关系的装置,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于:
获取当前帧中的M个第一点云块以及所述当前帧的参考帧中的N个参考点云块;M和N均为正整数;
根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系;X小于或者等于M。
可选的,在第十八方面的一种可能的实施方式中,所述处理器具体用于:
根据所述M个第一点云块与所述N个参考点云块,获得所述M个第一点云块与所述N个参考点云块之间的关联值;
根据所述M个第一点云块与所述N个参考点云块之间的关联值,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系。
可选的,在第十八方面的一种可能的实施方式中,所述处理器具体用于:
对于所述N个参考点云块中的第i个参考点云块,i=1,…,N,获取所述第i个参考点云块与j个尚未匹配的第一点云块之间的关联值,并在j个关联值中确定出关联值最大的Qik;其中,所述j个尚未匹配的第一点云块包括:在所述当前帧中的M个第一点云块中与所述第i个参考点云块之前的i-1个参考点云块均不匹配,且投影方向与所述第i个参考点云块的投影方向相同的第一点云块;j小于或等于M,k小于或等于j,j、k和M均为正整数;
若所述Qik大于预设阈值,则确定所述Qik对应的第k个第一点云块与所述第i个参考点云块匹配,其中,所述第k个第一点云块为所述j个尚未匹配的第一点云块中的一个。
可选的,在第十八方面的一种可能的实施方式中,所述关联值为第一参考值与第二参考值的商;
所述第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,所述第二参考值为所述第一占用矩阵和所述第二占用矩阵的并集区域的面积;或者,
所述第一参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的交集区域中包含的像素点个数,所述第二参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的并集区域中包含的像素点个数;
其中,所述第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,所述第二占用矩阵的有效区域为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域,所述第一占用矩阵为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域对应的矩阵区域,所述第二占用矩阵为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域对应的矩阵区域。
可选的,在第十八方面的一种可能的实施方式中,所述处理器具体用于:
按照所述N个参考点云块在所述参考帧中的排列顺序和所述M个第一点云块在所述当前帧中的排列顺序,确定X个第一点云块分别与所述X个参考点云块匹配。
可选的,在第十八方面的一种可能的实施方式中,所述处理器还用于:
将所述当前帧中的所述X个第一点云块,按照与所述X个参考点云块的匹配顺序排序;
将所述当前帧中除所述X个第一点云块之外的至少一个第一点云块,分别排列在所述X个第一点云块的后面。
第十九方面,本申请实施例提供一种编码装置,包括:
获取模块,用于获取匹配信息,所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X个参考点云块包含在当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M为当前帧中的第一点云块的个数;
编码模块,用于将所述匹配信息编入码流。
可选的,在第十九方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第十九方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第十九方面的一种可能的实施方式中,所述编码模块还用于:
将X组边信息差值编码入所述码流,其中,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值。
可选的,在第十九方面的一种可能的实施方式中,所述编码模块还用于:将所述X编码入所述码流中;
或者,
所述编码模块还用于:根据所述M确定第四编码比特数;采用所述第四编码比特数将 所述X编码入所述码流中。
第二十方面,本申请实施例提供一种解码装置,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于:
解析码流,以获得匹配信息;所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X表示当前帧中与参考点云块匹配的第一点云块的个数,所述参考点云块包含在所述当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M表示所述当前帧中的第一点云块的数量;
根据所述匹配信息,获得所述X个第一点云块的边信息。
可选的,在第二十方面的一种可能的实施方式中,所述处理器具体用于:
根据所述匹配信息,确定所述X个参考点云块;
根据所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
可选的,在第二十方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
与所述X个第一点云块对应匹配的X个参考点云块的索引值;
X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第二十方面的一种可能的实施方式中,所述匹配信息包括下列中的任意一种:
所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
可选的,在第二十方面的一种可能的实施方式中,所述处理器还用于:
解析所述码流,以得到X组边信息差值,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值;
所述处理器具体用于:
根据所述匹配信息,确定所述X个参考点云块;
根据所述X组边信息差值和所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
可选的,在第二十方面的一种可能的实施方式中,所述处理器还用于:解析所述码流,以得到所述X;
或者,
所述处理器还用于:根据所述M确定第四编码比特数;采用所述第四编码比特数解析所述码流以获得所述X。
第二十一方面,本申请实施例提供一种解码装置,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得与Z种边信息对应的Z个标识信息;
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z,Z≥1,Y和Z均为正整数。
可选的,在第二十一方面的一种可能的实施方式中,所述处理器还用于:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第二十一方面的一种可能的实施方式中,所述处理器还用于:
若与第k种边信息对应的标识信息为第一符号,则根据当前帧中所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
第二十二方面,本申请实施例提供一种解码装置,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z,Z≥1,Y和Z均为正整数。
可选的,在第二十二方面的一种可能的实施方式中,所述处理器还用于:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第二十二方面的一种可能的实施方式中,所述处理器还用于:
若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
第二十三方面,本申请实施例提供一种解码装置,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得与Z种边信息对应的Z个标识信息;
若与第k种边信息对应的标识信息为第二符号,则从所述码流中获得差值;所述差值为当前帧中除X个第一点云块之外的Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述当前帧中所述X个第一点云块的第k种边信息的最大值Bk所需比特数之间的差值;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,k=1,…,Z,Z≥1,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第二十三方面的一种可能的实施方式中,所述处理器还用于:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第二十三方面的一种可能的实施方式中,所述处理器还用于:
若与第k种边信息对应的标识信息为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
第二十四方面,本申请实施例提供一种解码装置,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于:
解析码流,以获得第二标识信息;
若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为当前帧中除X个第一点云块之外的Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述当前帧中所述X个第一点云块的第k种边信息的最大值Bk所需比特数之间的差值;
根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数;
采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,k=1,…,Z,Z≥1,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第二十四方面的一种可能的实施方式中,所述处理器还用于:
若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
可选的,在第二十四方面的一种可能的实施方式中,所述处理器还用于:
若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
本申请实施例提供一种编码方法、解码方法和装置。利用前后两帧点云数据的关联性,在当前帧的M个第一点云块中确定X个第一点云块,X个第一个点云块与当前帧的前一帧中的X个第二点云块存在预设的匹配关系。根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值。通过对X组边信息差值进行编码,降低了编码损耗,提升了编码性能。
附图说明
图1为现有的分割点云数据的示意图;
图2为现有的占用图的示意图;
图3为现有的点云数据打包方法的流程图;
图4为现有的编码方法的流程图;
图5为本申请实施例一提供的编码方法的流程图;
图6为本申请实施例二提供的编码方法的流程图;
图7为本申请实施例三提供的编码方法的流程图;
图8为本申请实施例一提供的解码方法的流程图;
图9为本申请实施例涉及的占用图的示意图;
图10为本申请实施例一提供的编码装置的结构示意图;
图11为本申请实施例一提供的解码装置的结构示意图;
图12为本申请实施例一提供的编码器的结构示意图;
图13为本申请实施例一提供的解码器的结构示意图。
具体实施方式
本申请实施例提供的编码方法、解码方法和装置,旨在解决目前针对每一帧点云数据进行单独处理导致的编码压缩性能损失的技术问题。
下面对现有的点云数据的处理方法进行简单的介绍。涉及四个阶段,分别为:点云数据分割阶段、点云数据打包(也称为packing)阶段、边信息编码阶段和边信息解码阶段。
(1)点云数据分割阶段
按照预设规则对点云数据进行分割获得多个点云块(也称为patch)。其中,每个点云块都是一个连通区域,且任意两个点云块没有交叠区域。
示例性的,图1为现有的分割点云数据的示意图。图1左侧示出了三维坐标系下的点云数据,所述点云数据包括通过测量仪器得到的人像11外观表面的点数据集合。三维坐标系包括x轴、y轴和z轴。以z轴负方向作为投影方向,图1右侧示出了对点云数据的分割结果。为了方便说明,在x轴和y轴确定的二维平面上对点云块进行说明。如图1右侧所示,点云数据可以分割为6个点云块,分别为点云块12~点云块17。
需要说明,三维坐标系中根据三个坐标轴一共有6个投影方向,分别为:x轴正方向、 x轴负方向、y轴正方向、y轴负方向、z轴正方向和z轴负方向。点云数据可以在至少一个投影方向上进行分割形成多个点云块。
(2)点云数据打包(packing)阶段
打包(packing)问题在数学上是一个优化问题,是指如何将大小不同的盒子放到一个容器中,目标是使得容器越稠密越好或者所用容器个数越少越好。点云数据的打包问题,是指对于形状各异的多个点云块,根据投影方向经过三维到二维的投影,可以将所有的点云块按照某种规则紧密的排列在一张二维图像上,目标是使得二维图像中包含的缝隙越少越好或者目标图像越小越好。这个排列所有点云块的过程就称为点云数据打包(packing)。该阶段可以实现点云块从三维到二维的投影以及获得点云块对应的边信息。首先对涉及的相关概念进行介绍。
1)投影图
点云块经过三维到二维的投影按照打包顺序形成的二维的投影图。
投影图可以包括深度投影图和纹理投影图。深度投影图是各个点云块经过投影得到的深度图,按照打包顺序生成的二维图像。纹理投影图是各个点云块经过投影得到的纹理图,按照打包顺序生成的二维图像。深度投影图和纹理投影图可以具有相同的长度和宽度。
2)占用图(也称为occupancy map)
占用图是一个2值二维图像,用于表示上述投影图中某个像素位置是否被点云数据中的某点占据。通常,为了节约编码比特,占用图的分辨率低于投影图的分辨率。
示例性的,图2为现有的占用图的示意图。图2中左侧和右侧分别示出了相邻的前后两帧点云块对应的占用图。其中,不同的字母表示点云块的投影方向或者法向轴不同。字母A~F可以依次表示投影方向或者法向轴为:x轴正方向、y轴正方向、z轴正方向、x轴负方向、y轴负方向和z轴负方向。示例性的,图2左侧包括点云块21~25,图2右侧包括点云块31~35。其中,连续分布的相同字母显示的点(像素点)表示被一个点云块占据,点云块实际占用的区域可以称为有效区域。没有字母显示的点表示没有被点云数据占据,这些点形成的区域可以称为无效区域。
3)边信息
边信息可以指示点云块的位置信息。下面通过表1进行说明。
在表1中,u1、v1和d1指示了点云块在三维坐标系中的位置,在点云数据分割结束后,可以获得点云块的u1、v1和d1。在表1中,sizeU和sizeV指示了点云块在投影图中的宽度和高度。点云块根据投影方向经过三维到二维的投影后,可以获得sizeU和sizeV。sizeU与sizeU0之间,sizeV和sizeV0之间可以具有一定的对应关系。具体的,可以与占用图的分辨率相关。u0、v0、sizeU0和sizeV0指示了点云块在占用图中的位置。根据sizeU和sizeV可以获得sizeU0和sizeV0。将所有的点云块按照某种规则紧密的排列在占用图上,可以获得u0和v0。
表1点云块的边信息
Figure PCTCN2018112215-appb-000001
Figure PCTCN2018112215-appb-000002
图3为现有的点云数据打包方法的流程图。如图3所示,现有的点云数据打包方法,针对每一帧点云数据单独处理,可以包括:
S101、将当前帧的点云块进行排序。
具体的,可以按照点云块在二维平面投影后的高度从大到小的顺序对点云块进行排序。对于高度相同的多个点云块,可以按照点云块在二维平面投影后的宽度从大到小的顺序对多个点云块进行排序,从而可以完成对所有点云块的排序。按照上述方法,可以获得当前帧点云块的排序为patch[1],…,patch[i],…,patch[M],0<i≤M,M为当前帧点云块的个数。
S102、获取当前帧占用图的高度和宽度的初始值。
计算公式如下:
占用图的宽度的最小值=投影图的宽度的最小值/占用图的分辨率。
占用图的宽度的初始值=max(占用图的宽度的最小值,第i个点云块在占用图中的宽度+1),0<i≤M。
占用图的高度的最小值=投影图的高度的最小值/占用图的分辨率。
占用图的高度的初始值=max(占用图的高度的最小值,第i个点云块在占用图中的高度),0<i≤M。
占用图的初始大小=占用图的高度的初始值×占用图的宽度的初始值。
S103、根据当前帧点云块的排列顺序依次获取第i个点云块patch[i],0<i≤M。
S104、在占用图中按照从左向右以及从上向下的方向判断是否可以插入第i个点云块patch[i]。
若可以插入第i个点云块patch[i],则获取第i个点云块patch[i]在占用图中的位置u0和v0。之后,返回执行S103,直至获取第M个点云块patch[M]。
若占用图中没有可以插入第i个点云块patch[i]的位置,则执行S105。
其中,占用图中已经被点云块占据的位置,不可以插入新的点云块。
S105、将占用图的高度和宽度加倍。
并返回执行S104,直至可以插入第i个点云块patch[i]。
下面结合图2通过具体示例说明。
参见图2左侧,假设前5个点云块的排序依次为点云块21~25,投影方向分别用字母C、F、A、D和A标识。假设占用图足够大,即不考虑S105。点云数据打包方法如下。按照点云块的排列顺序,首先获得点云块21。在占用图中按照从左向右以及从上向下的方向插入点云块21。然后,获得点云块22。在占用图中按照从左向右以及从上向下的方向插入点云块22。再获得点云块23。在占用图中按照从左向右以及从上向下的方向插入点云块23。再获得点云块24。在占用图中按照从左向右以及从上向下的方向插入点云块24。再获得点云块25。在占用图中按照从左向右以及从上向下的方向插入点云块25。
在完成点云数据打包(packing)后,可以确定当前帧所有的点云块在占用图中的位置。之后,可以对点云块的边信息进行编码。
(3)边信息编码阶段
主要涉及对点云块的如下几种边信息进行编码。边信息可以包括u0,v0,u1,v1,d1,sizeU0和sizeV0中的至少一种。对于u0,v0,u1,v1和d1,可以采用固定比特数的定长编码。对于sizeU0和sizeV0,可以采用指数哥伦布(Glomb Rice)编码。需要说明,对其他边信息进行编码也可以采用上述编码方法。
编码方法的输入信息为当前帧点云块的个数M和每个点云块的边信息。对输入信息进行编码可以获得码流,所述码流作为解码装置的输入信息。
图4为现有的编码方法的流程图。如图4所示,现有的编码方法针对每一帧点云块的边信息单独处理,可以包括:
S201、对当前帧点云块的个数M进行32bit编码。
例如,M=200。编码后的码流可以包括0xC8。
S202、对点云块的边信息进行编码,边信息包括u0,v0,u1,v1和d1中的至少一种。
对于每一种边信息,获取当前帧所有点云块的边信息的最大值。根据所述最大值确定编码所需的编码比特数,并对所述编码比特数进行8bit编码。对当前帧所有点云块的边信息采用所述编码比特数进行编码。
下面通过具体示例进行说明。
假设边信息包括u0和v0。当前帧点云块的个数为3个。3个点云块的边信息u0的十进制取值分别为2、5和9。3个点云块的边信息v0的十进制取值分别为3、4和7。
编码方法具体如下:
对于边信息u0,当前帧3个点云块的边信息u0为{2,5,9},最大值为9。对于9采用固定比特数的定长编码,编码所需的编码比特数为4。首先对编码比特数4进行8bit编码,编码后的码流包括0x4。然后,采用编码比特数4对当前帧3个点云块的边信息u0依次编码,编码后的码流包括0x2、0x5和0x9。
对于边信息v0,当前帧3个点云块的边信息v0为{3,4,7},最大值为7。对于7采用固定比特数的定长编码,编码所需的编码比特数为3。首先对编码比特数3进行8bit编码,编码后的码流包括0x3。然后,采用编码比特数3对当前帧3个点云块的边信息v0依次编码,编码后的码流包括0x3、0x4和0x7。
S203、对点云块的边信息进行编码,边信息包括sizeU0和sizeV0。
对于边信息sizeU0,获取当前帧第i个点云块的边信息差值delta_sizeU0=sizeU0– pre_sizeU0,依次对delta_sizeU0进行指数Glomb Rice编码。其中,sizeU0为第i个点云块的边信息sizeU0,pre_sizeU0为第i-1个点云块的边信息sizeU0,0<i≤M。
对于边信息sizeV0,获取当前帧第i个点云块的边信息差值delta_sizeV0=pre_sizeV0-sizeV0,依次对delta_sizeV0进行指数Glomb Rice编码。其中,sizeV0为第i个点云块的边信息sizeV0,pre_sizeV0为第i-个点云块的边信息sizeV0。
其中,在获取当前帧第1个点云块的边信息差值时,pre_sizeU0可以为第一预设值,例如为0。pre_sizeV0可以第二预设值。
需要说明,在编码过程中,对于S202和S203的执行顺序不做限定。在S202中,如果边信息为多种,对于各种边信息的编码顺序不做限定。例如,如果边信息为3种,分别为u1,v1和d1。编码顺序可以为:…,当前帧中前一个点云块的u1,v1和d1编码,当前帧中当前点云块的u1,v1和d1编码,当前帧中下一个点云块的u1,v1和d1编码,…。编码顺序还可以为:当前帧中所有点云块的u1编码,当前帧中所有点云块的v1编码,当前帧中所有点云块的d1编码。相似的,在S203中,对于sizeU0和sizeV0的编码顺序不做限定。需要说明,编码装置和解码装置可以预先定义编码和解码顺序。
(4)边信息解码阶段
解码方法的输入信息为编码装置输出的码流。解码方法与编码方法相对应。
下面以边信息包括u0,v0,u1,v1,d1,sizeU0和sizeV0,且u0,v0,u1,v1,d1编码在前,sizeU0和sizeV0编码在后为示例,对现有的解码方法进行说明。现有的解码方法针对每一帧点云块的边信息单独处理,可以包括:
S301、从码流中解码32bit,获得当前帧点云块的个数M。
S302、从码流中连续解码5个8bit,依次获得u0,v0,u1,v1和d1的最大值编码所需要的编码比特数。
S303、根据当前帧点云块的个数M和u0,v0,u1,v1和d1分别对应的编码比特数,依次从码流中解码获得当前帧各个点云块的u0,v0,u1,v1和d1的值。
S304、根据当前帧点云块的个数M,根据指数Glomb Rice方法解码出当前帧各个点云块的sizeU0的差分值delta_sizeU0,以及当前帧各个点云块的sizeV0的差分值delta_sizeV0。根据sizeU0=pre_sizeU0+delta_sizeU0和sizeV0=pre_sizeV0–delta_sizeV0获得当前帧各个点云块的sizeU0和sizeV0的值。
可见,现有的边信息编码方法和解码方法,仅针对每一帧点云块的边信息进行单独的编码处理和解码处理,而连续帧的点云数据之间具有很强的相关性,导致边信息编码的压缩性能损失。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
本申请说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
图5为本申请实施例一提供的编码方法的流程图。本实施例提供的编码方法,执行主体可以为编码装置。如图5所示,本实施例提供的编码方法,可以包括:
S401、在当前帧的M个第一点云块中确定X个第一点云块。
其中,X个第一个点云块与X个第二点云块存在预设的匹配关系,X个第二点云块包含在当前帧的前一帧中。其中,X小于或者等于M,且X和M均为正整数。
具体的,当前帧的点云块可以称为第一点云块,当前帧的第一点云块的个数为M。当前帧的前一帧的点云块可以称为第二点云块。当前帧的X个第一个点云块与前一帧的X个第二点云块存在预设的匹配关系。也就是说,通过X个第一个点云块和X个第二点云块,说明了连续帧的点云数据之间具有一定的相关性。在后续编码和解码时,可以利用该相关性。
需要说明的是,本实施例对于M和X的具体取值不做限定。而且,如果将前一帧的第二点云块的个数定义为N0,则X小于或者等于N0。也就是说,X≤min(M,N0),min(M,N0)为M和N0中的较小值。可选的,X可以为预设数值,对于编码装置和解码装置均为已知的数值。例如,X=min(M,N0)。
S402、获取X个第一点云块的边信息和X个第二点云块的边信息。
其中,边信息可以参见表1,此处不再赘述。
需要说明的是,边信息可以包括但不仅限于表1示出的各种边信息,还可以包括其他与点云块相关的信息。可选的,边信息还可以包括点云块的索引值,所述索引值指示了一个点云块在所有点云块中的排列顺序。例如,按照当前帧M个第一点云块的排列顺序,第一点云块的索引值可以依次为0,1,2,…,M-2,M-1,或者是1,2,…,M-1,M。
S403、根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值。
具体的,根据1个第一点云块的边信息和1个第二点云块的边信息可以得到1组边信息差值。这样,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值。需要说明的是,本实施例对于边信息的个数不做限定,边信息可以为1种,也可以为多种。当边信息为1种时,1组边信息差值仅包括1个数值。当边信息为多种时,1组边信息差值包括多个数值,每个数值与一个边信息对应。
下面结合表1通过具体示例进行说明。
假设边信息为1种,具体为表1中的u0。则1组边信息差值delta_u0=u0–pre_u0。其中,公式中的u0表示第一点云块的边信息u0,公式中的pre_u0表示第二点云块的边信息u0。
假设边信息为7种,具体为表1中的u0,v0,u1,v1,d1,sizeU0和sizeV0。则1组边信息差值delta_x=x–pre_x。其中,公式中的x表示第一点云块的边信息x,公式中的pre_x表示第二点云块的边信息x,x可以为u0,v0,u1,v1,d1,sizeU0和sizeV0。即,1组边信息差值为{delta_u0,delta_v0,delta_u1,delta_v1,delta_d1,delta_sizeU0,delta_sizeV0}。
可选的,在一种实现方式中,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,可以包括:
按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,将X个第一个点云块中第k个第一点云块的边信息与X个第二个点云块中第k个第二点云块的边信息之间的差值,确定为X组边信息差值中的第k组边信息差值,k=1,…,X。
具体的,X个第一点云块和X个第二点云块存在预设的匹配关系。在该种实现方式中, 按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,排序相同的第一点云块和第二点云块匹配。因此,第k个第一点云块的边信息与第k个第二点云块的边信息之间的差值,确定为第k组边信息差值。
通过将排序相同的第一点云块和第二点云块的边信息对应相减获得X组边信息差值,简化了差值计算的复杂度,提升了编码速度。
可选的,在另一种实现方式中,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,可以包括:
将X个第一点云块的边信息分别和与X个第一点云块匹配的X个第二点云块的边信息之间的差值确定为X组边信息差值。
还可以包括:
获取匹配信息,匹配信息指示了X个第一点云块与X个第二点云块之间的匹配关系。
对匹配信息进行编码。
具体的,X个第一点云块和X个第二点云块存在预设的匹配关系。在该种实现方式中,相互匹配的第一点云块和第二点云块分别在X个第一点云块和X个第二点云块中的排列顺序可能相同,也可能不同。将X个第一点云块的边信息分别和与X个第一点云块匹配的X个第二点云块的边信息之间的差值确定为X组边信息差值,提升了编码的准确性,进而提升了编码性能。
可选的,匹配信息可以包括X个第一点云块的索引值和X个第二点云块的索引值。例如,X=3。3个第一点云块的索引值分别为0,1,2。3个第二点云块的索引值分别为0,1,2。假设,索引值为0的第一点云块与索引值为0的第二点云块匹配、索引值为1的第一点云块与索引值为2的第二点云块匹配、索引值为2的第一点云块与索引值为1的第二点云块匹配。那么匹配信息可以包括:3个第一点云块的索引值{0,1,2}和3个第二点云块的索引值{0,2,1}。
可选的,匹配信息可以包括X个第一点云块的索引值以及X个索引差值,X个索引差值为X个第一点云块的索引值和与X个第一点云块匹配的X个第二点云块的索引值之间的差值。还以上述示例为例。X个第一点云块的索引值为{0,1,2}。与X个第一点云块匹配的X个第二点云块的索引值为{0,2,1}。则X个索引差值可以为{0-0,1-2,2-1}={0,-1,1}。因此,匹配信息可以包括:3个第一点云块的索引值{0,1,2}和3个索引差值{0,-1,1}。
可选的,若X个第一点云块的排序和与X个第一点云块匹配的X个第二点云块的排序相同,则匹配信息可以包括1bit指示信息。可选的,所述1bit指示信息可以为0或者1。
通过1bit指示信息指示相互匹配的第一点云块和第二点云块的排序相同,进一步压缩了码流,提升了编码效率。
S404、对X组边信息差值进行编码。
具体的,由于X个第一个点云块与X个第二点云块存在预设的匹配关系,根据X个第一点云块的边信息和X个第二点云块的边信息得到了X组边信息差值。通过对X组边信息差值进行编码,考虑了前后两帧数据的关联性,降低了编码损耗,提升了编码压缩性能。
需要说明的是,本实施例对X组边信息差值进行编码的方法不做限定,可以采用现有的编码方法,只要编码方法和解码方法对应即可。可选的,对X组边信息差值进行编码, 可以采用指数Glomb Rice编码。
可见,本实施例提供的编码方法,通过在当前帧的M个第一点云块中确定X个第一点云块,X个第一个点云块与当前帧的前一帧中的X个第二点云块存在预设的匹配关系,通过对根据X个第一点云块的边信息和X个第二点云块的边信息得到的X组边信息差值进行编码,考虑了前后两帧数据的关联性,降低了编码损耗,提升了编码压缩性能。
可选的,本实施例提供的编码方法,还可以包括:
对M进行编码。
需要说明的是,本实施例对M进行编码的方法不做限定,可以采用现有的编码方法,只要编码方法和解码方法对应即可。可选的,对M进行编码,可以采用预设编码比特数进行定长编码。本实施例对于预设编码比特数的具体取值不做限定。例如可以为32bit。
可选的,本实施例提供的编码方法,还可以包括:
对X进行编码。
具体的,对X进行编码,以便在解码时可以明确获知当前帧中与前一帧的第二点云块匹配的第一点云块的个数,提升了编码效率。
可选的,对X进行编码,可以包括:
根据M确定第四编码比特数。
采用第四编码比特数对X进行编码。
具体的,X小于或者等于M,因此可以通过M确定对X进行编码所需的最大编码比特数(第四编码比特数)。进而,采用第四编码比特数对X进行编码,可以进一步压缩码流,提升编码压缩性能。
下面通过具体示例进行说明。
例如,M=200,X=90。根据M=200可以确定第四编码比特数为16bit。则可以采用16bit对X进行编码,编码后的码流可以包括0x5A。
可选的,在一种实现方式中,预设的匹配关系可以通过下述步骤确定:
获取当前帧的前一帧中N个第二点云块,N为正整数。
对于N个第二点云块中的第i个第二点云块,i=1,…,N,获取第i个第二点云块与j个尚未匹配的第一点云块之间的关联值Qij,并确定出关联值最大的Qik。其中,j个尚未匹配的第一点云块的投影方向与第i个第二点云块的投影方向相同。
若Qik大于预设阈值,则确定Qik对应的第k个第一点云块与第i个第二点云块匹配,其中,第k个第一点云块为j个尚未匹配的第一点云块中的一个。
若Qik小于或者等于预设阈值,则确定没有第一点云块与第i个第二点云块匹配。
下面通过具体示例进行说明。
假设N=10。按照第二点云块的排列顺序,10个第二点云块可以标识为pre_patch[i],i=1,…,10,对应的索引值可以为1~10。M=20。按照第一点云块的排列顺序,20个第一点云块可以标识为patch[k],k=1,…,20,对应的索引值可以为1~20。预设阈值可以标识为thr。
遍历N个第二点云块。首先,获取pre_patch[1](索引值为1),并遍历第一集合。第一集合包括未被匹配的T个第一点云块。此时,T=M=20。第一集合包括20个第一点云块,可以标识为pre_patch[j],j=1,…,20,对应的索引值为1~20。假设第一集合中与pre_patch[1] 具有相同投影方向的第一点云块为patch[1]和patch[2]。获取pre_patch[1]与patch[1]之间的关联值Q11,pre_patch[1]与patch[2]之间的关联值Q12。假设Q11>Q12,则比较Q11与预设阈值thr的大小。如果Q11>thr,则确定pre_patch[1]与patch[1]匹配。也就是说,当前帧索引值为1的第一点云块与前一帧索引值为1的第二点云块匹配。在第一集合中删除patch[1](索引值为1)形成新的第一集合。此时,新的第一集合包括19个第一点云块,可以重新标识为pre_patch[j],0<j≤19,对应的索引值为2~20。
继续遍历N个第二点云块,获取pre_patch[2](索引值为2),并遍历第一集合。此时,T=19。假设第一集合中与pre_patch[2]具有相同投影方向的第一点云块为patch[3]和patch[4],获取pre_patch[2]与patch[3]之间的关联值Q23,pre_patch[2]与patch[4]之间的关联值Q24。假设Q24>Q23,则比较Q24与预设阈值thr的大小。如果Q24<thr,则说明在当前帧中没有与pre_patch[2]匹配的第一点云块。此时,第一集合不变。之后,继续遍历下一个第二点云块,直至遍历完N个第二点云块为止。
可见,通过遍历N个第二点云块和M个第一点云块,比较投影方向相同的第一点云块与第二点云块之间的关联值,可以确定与N个第二点云块存在一一匹配关系的所有第一点云块。
需要说明的是,本实施例对于预设阈值的具体取值不做限定,根据需要进行设置。
需要说明的是,本实施例对于N的具体取值不做限定,根据需要进行设置。其中,N≤N0,N0为前一帧的第二点云块的个数。需要说明的是,本实施例对于如何从N0个第二点云块中获取N个第二点云块不做限定。例如,可以按照N0个第一点云块的排列顺序获取前N个第一点云块。
可选的,关联值Qij可以为第一参考值与第二参考值的商。
所述第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,第二参考值为第一占用矩阵和第二占用矩阵的并集区域的面积。或者,
第一参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的交集区域中包含的像素点个数,第二参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的并集区域中包含的像素点个数。
其中,第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,第二占用矩阵的有效区域为第i个第二点云块根据投影方向在二维平面投影后实际占用的区域,第一占用矩阵为第一占用矩阵的有效区域对应的矩阵区域,第二占用矩阵为第二占用矩阵的有效区域对应的矩阵区域。
可选的,在确定预设的匹配关系之前,还可以包括:
对M个第一点云块进行排序。
具体的,可以按照第一点云块在占用图上的高度从大到小的顺序对M个第一点云块进行排序。对于高度相同的多个第一点云块,可以按照第一点云块在占用图上的宽度从大到小的顺序对多个第一点云块进行排序,进而完成对M个第一点云块的排序。示例性的,如图2右侧所示,仅以点云块31~34的排序为例进行说明。按照点云块在占用图上的高度从大到小排序,依次为:点云块31、点云块32和点云块33、点云块34。由于点云块32和点云块33在占用图上的高度相同,再按照点云块在占用图上的宽度从大到小的顺序对点云块32和点云块33排序。因此,点云块31~34排序后的顺序依次为:点云块31、点云块 32、点云块33、点云块34。
在确定当前帧的M个第一点云块和前一帧的N个第二点云块之间的匹配关系之前,通过对M个第一点云块进行排序,可以提升第一点云块和第二点云块的匹配速度,进而提升编码处理速度。
可选的,本实施例提供的编码方法,若确定出O个第一点云块存在匹配关系,在当前帧的M个第一点云块中确定X个第一点云块,可以包括:
在O个第一点云块中确定X个第一点云块,O个第一点云块为与N个第二点云块匹配的第一点云块,O≥X。
具体的,可以在与N个第二点云块匹配的所有第一点云块中确定X个第一点云块。也就是说,X≤O,O为与N个第二点云块存在一一匹配关系的第一点云块的个数。
可选的,在另一种实现方式中,预设的匹配关系可以包括:
按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,X个第一个点云块中的第k个第一点云块与X个第二个点云块中的第k个第二点云块匹配,k=1,…,X。
通过设置排序相同的第一点云块和第二点云块匹配,简化了匹配关系,提升了编码速度。
需要说明的是,在编码过程中,对X组边信息差值进行编码和对M进行编码的执行顺序不做限定。如果边信息为多种,在对X组边信息差值进行编码的过程中,对于各种边信息的编码顺序不做限定。只要编码装置和解码装置预先定义编码和解码顺序即可。
本实施例提供了一种编码方法,包括:在当前帧的M个第一点云块中确定X个第一点云块,获取X个第一点云块的边信息和X个第二点云块的边信息,根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,对X组边信息差值和M进行编码。本实施例提供的编码方法,利用前后两帧点云数据的关联性,通过对根据X个第一点云块的边信息和X个第二点云块的边信息得到的X组边信息差值进行编码,降低了编码损耗,提升了编码压缩性能。
图6为本申请实施例二提供的编码方法的流程图。本实施例提供的编码方法,在图5所示方法实施例一的基础上,提供了编码方法的另一种实现方式,主要涉及在X<M时,提供了对M个第一点云块中除X个第一点云块之外的剩余的Y个第一点云块的边信息的编码方法。如图6所示,本实施例提供的编码方法,还可以包括:
S501、获取M个第一点云块中剩余的Y个第一点云块的边信息。
其中,Y=M-X。
S502、获取Y个第一点云块的边信息的最大值A。
S503、根据最大值A确定Y个第一点云块的边信息对应的第一编码比特数。
S504、对第一编码比特数进行编码。
S505、采用第一编码比特数对Y个第一点云块的边信息进行编码。
需要说明的是,本实施例对第一编码比特数进行编码的实现方式不做限定。可选的,可以采用预设比特数对第一编码比特数进行编码。本实施例对于预设编码比特数的具体数值不做限定,例如为8bit。
需要说明的是,本实施例对于边信息的个数不做限定。可选的,边信息可以包括下列 中的至少一种:点云块在三维坐标系中的X坐标最小值(u1),点云块在三维坐标系中的Y坐标最小值(v1),点云块在三维坐标系中的Z坐标最小值(d1),点云块根据投影方向在占用图中的X坐标最小值(u0),点云块根据投影方向在占用图中的Y坐标最小值(v0)。
下面结合表1通过示例进行说明。
假设M=10,X=7,Y=3。边信息包括u0和v0。在对7个第一点云块的边信息编码后,需要对剩余的3个第一点云块的边信息进行编码。剩余的3个第一点云块的边信息u0的十进制取值分别为2、5和9。剩余的3个第一点云块的边信息v0的十进制取值分别为3、4和7。预设编码比特数为8bit。
编码方法具体如下:
对于边信息u0,3个第一点云块的边信息u0为{2,5,9},最大值为9,编码所需的编码比特数为4。首先对编码比特数4进行8bit编码,编码后的码流包括0x4。然后,采用编码比特数4对3个第一点云块的边信息u0依次编码,编码后的码流包括0x2、0x5和0x9。
对于边信息v0,3个第一点云块的边信息v0为{3,4,7},最大值为7,编码所需的编码比特数为3。首先对编码比特数3进行8bit编码,编码后的码流包括0x3。然后,采用编码比特数3对3个第一点云块的边信息v0依次编码,编码后的码流包括0x3、0x4和0x7。
需要说明的是,在编码过程中,对Y个第一点云块的边信息和第三编码比特数进行编码的执行顺序不做限定。如果边信息为多种,对于各种边信息的编码顺序不做限定。只要编码装置和解码装置预先定义编码和解码顺序即可。
本实施例提供了一种编码方法,包括:获取Y个第一点云块的边信息,获取Y个第一点云块的边信息的最大值A,根据最大值A确定Y个第一点云块的边信息对应的第一编码比特数,采用预设编码比特数对第一编码比特数进行编码,采用第一编码比特数对Y个第一点云块的边信息进行编码。本实施例提供的编码方法,根据剩余的Y个第一点云块的边信息确定编码所需比特数,避免了根据所有M个第一点云块的边信息确定编码所需比特数,减小了数据处理数据量,提升了编码的效率和合理性,提升了编码性能。
图7为本申请实施例三提供的编码方法的流程图。本实施例提供的编码方法,在图5所示方法实施例一的基础上,提供了编码方法的又一种实现方式,主要涉及在X<M时,提供了对M个第一点云块中除X个第一点云块之外的剩余的Y个第一点云块的边信息的编码方法。如图7所示,本实施例提供的编码方法,还可以包括:
S601、获取M个第一点云块中剩余的Y个第一点云块的Z种边信息。
其中,Y=M-X,Z≥1。
S602、获取X个第一点云块的第k种边信息的最大值Bk和Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z。
S603、若最大值Bk大于或者等于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第一符号,根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
S604、若最大值Bk小于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第二符号,根据最大值Ak确定Y个第一点云块的第k种边信息对应的第三编码比 特数,对第三编码比特数进行编码,并采用第三编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
S605、对第一标识信息进行编码。
可选的,第一符号可以为0,第二符号可以为1。或者,第一符号可以为1,第二符号可以为0。
可选的,边信息可以包括下列中的至少一种:点云块在三维坐标系中的X坐标最小值(u1),点云块在三维坐标系中的Y坐标最小值(v1),点云块在三维坐标系中的Z坐标最小值(d1),点云块根据投影方向在占用图中的X坐标最小值(u0),点云块根据投影方向在占用图中的Y坐标最小值(v0)。
需要说明的是,本实施例对第三编码比特数进行编码的实现方式不做限定。可选的,可以采用预设比特数对第三编码比特数进行编码。本实施例对于预设编码比特数的具体数值不做限定,例如为8bit。
需要说明的是,本实施例对第一标识信息进行编码的实现方式不做限定。可选的,可以采用预设比特数对第一标识信息进行编码。本实施例对于预设编码比特数的具体数值不做限定,例如为8bit或者为Zbit,Z为边信息的个数。
下面结合表1通过具体示例进行详细说明。
假设边信息有5种,分别为u0,v0,u1,v1和d1。则第一标识信息包括5bit,通过A=abcde标识。其中,每个比特位a,b,c,d,e分别与u0,v0,u1,v1和d1一一对应。第一符号为0,第二符号为1。
X个第一点云块的5种边信息u0,v0,u1,v1,d1的最大值分别为max_u0,max_v0,max_u1,max_v1,max_d1。Y个第一点云块的5种边信息u0,v0,u1,v1,d1的最大值分别为max_u0’,max_v0’,max_u1’,max_v1’,max_d1’。
对于边信息u0,如果max_u0≥max_u0’,则a=0。此时,可以根据max_u0确定Y个第一点云块的边信息u0对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的边信息u0进行编码。例如,max_u0=7,第二编码比特数为3。采用第二编码比特数3对Y个第一点云块的边信息u0进行编码。如果max_u0<max_u0’,则a=1。此时,可以根据max_u0’确定Y个第一点云块的边信息u0对应的第三编码比特数,采用第三编码比特数对Y个第一点云块的边信息u0进行编码。
相似的,对于边信息v0,u1,v1和d1,根据比较结果可以确定b,c,d,e是0还是1。第一标识信息的具体取值可以参见表2。
表2第一标识信息和第二标识信息
F A=abcde F A=abcde F A=abcde F A=abcde
0 00000 1 01000 1 10000 1 11000
1 00001 1 01001 1 10001 1 11001
1 00010 1 01010 1 10010 1 11010
1 00011 1 01011 1 10011 1 11011
1 00100 1 01100 1 10100 1 11100
1 00101 1 01101 1 10101 1 11101
1 00110 1 01110 1 10110 1 11110
1 00111 1 01111 1 10111 1 11111
在本实施例中,对于X个第一点云块的边信息,是通过对X组边信息差值进行编码实现的。X个第一点云块的边信息编码在前,相应的,X个第一点云块的边信息解码也在前。也就是说,解码装置会首先获得X个第一点云块的边信息。编码时,通过将X个第一点云块的边信息的最大值与Y个第一点云块的边信息的最大值进行比较,如果X个第一点云块的边信息的最大值大于或者等于Y个第一点云块的边信息的最大值,则可以将根据X个第一点云块的边信息的最大值确定的编码所需比特数作为对Y个第一点云块的边信息进行编码时的编码比特数,从而对Y个第一点云块的边信息进行编码。这样,就不需要对Y个第一点云块的边信息对应的编码比特数专门编码并通知给解码装置,进一步压缩了码流,提高了编码效率和压缩性能。相应的,解码时,根据第一标识信息中的各个比特位的取值,如果Y个第一点云块的边信息对应的编码比特数为根据X个第一点云块的边信息的最大值确定的,则根据已经解码获得的X个第一点云块的边信息获得Y个第一点云块的边信息对应的编码比特数,进而可以根据所述编码比特数进一步解析码流获得Y个第一点云块的边信息。
可选的,本实施例提供的编码方法,若边信息为Z种,Z>1时,对第一标识信息进行编码之前,还可以包括:
确定第一标识信息中至少一个比特位为第二符号。
具体的,当边信息为多种时,对于部分边信息,X个第一点云块的边信息的最大值大于或者等于Y个第一点云块的边信息的最大值。对于另一部分边信息,X个第一点云块的边信息的最大值小于Y个第一点云块的边信息的最大值。此时,对第一标识信息编码。
可选的,还可以包括:
确定第二标识信息为第二符号。
对第二标识信息进行编码。
具体的,第二标识信息(用F表示)为1bit,指示了X个第一点云块的Z种边信息的最大值是否均大于或者等于Y个第一点云块的Z种边信息的最大值。在该种场景下,第二标识信息为第二符号。Z种边信息中,对于部分边信息,X个第一点云块的边信息的最大值大于或者等于Y个第一点云块的边信息的最大值。对于另一部分边信息,X个第一点云块的边信息的最大值小于Y个第一点云块的边信息的最大值。此时,可以对第一标识信息和第二标识信息均进行编码。可选的,可以对第一标识信息和第二标识信息分别编码。即,采用预设比特数对第一标识信息进行编码,采用1bit对第二标识信息进行编码。例如,若第一标识信息A=abcde,则可以采用5bit对A进行编码。采用1bit对第二标识信息进行编码。可选的,可以采用预设比特数对第一标识信息和第二标识信息进行联合编码。例如,若第一标识信息A=abcde,第二标识信息F=f,则可以通过一个字节对abcdef或者fabcde进行编码。
可选的,本实施例提供的编码方法,若边信息为Z种,Z>1,且第一标识信息中每个比特位均为第一符号,还可以包括:
确定第二标识信息为第一符号。
仅对第二标识信息进行编码。
具体的,第二标识信息(用F表示)为1bit。在该种场景下,第二标识信息为第一符号。Z种边信息中,对于每一种边信息,X个第一点云块的边信息的最大值大于或者等于Y个第一点云块的边信息的最大值。此时,不执行S604。仅需要对1bit的第二标识信息进行编码即可,进一步压缩了码流,提高了编码效率和压缩性能。示例性的,第二标识信息的具体取值可以参见表2。
需要说明的是,在编码过程中,对Y个第一点云块的边信息、对第一标识信息和/或第二标识信息、对第三编码比特数进行编码的执行顺序不做限定。如果边信息为多种,对于各种边信息的编码顺序不做限定。只要编码装置和解码装置预先定义编码和解码顺序即可。
示例性的,下面给出一种具体的编码顺序。
步骤1:获取M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X。
步骤2:获取X个第一点云块的第k种边信息的最大值Bk和Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z。
步骤3:若最大值Bk大于或者等于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第一符号。若最大值Bk小于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第二符号。
步骤4:若第一标识信息中每个比特位均为第一符号,则确定第二标识信息为第一符号,并对第二标识信息编码。根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
步骤5:若第一标识信息中至少一个比特位为第二符号,则确定第二标识信息为第二符号,对第一标识信息和第二标识信息进行编码。若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据最大值Ak确定Y个第一点云块的第k种边信息对应的第三编码比特数,对第三编码比特数进行编码,并采用第三编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
本实施例提供的编码方法,通过将X个第一点云块的边信息的最大值与Y个第一点云块的边信息的最大值进行比较,进而可以确定Y个第一点云块的边信息对应的编码比特数。当采用根据X个第一点云块的边信息的最大值确定的编码比特数对Y个第一点云块的边信息进行编码时,进一步压缩了码流,提高了编码效率和压缩性能。
图8为本申请实施例一提供的解码方法的流程图。本实施例提供的解码方法,与图5~图7所示方法实施例提供的编码方法对应。如图8所示,本实施例提供的解码方法,可以包括:
S701、根据码流获得当前帧X个第一点云块的X组边信息差值。
其中,当前帧的M个第一点云块包括X个第一点云块,X个第一个点云块与当前帧 的前一帧的X个第二点云块存在预设的匹配关系,X小于或者等于M,且X和M均为正整数。
S702、获取X个第二点云块的边信息。
S703、根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息。
可选的,若X<M,本实施例提供的解码方法,还包括:
根据码流获得第一编码比特数,第一编码比特数为编码装置根据M个第一点云块中剩余的Y个第一点云块的边信息的最大值A确定的,Y=M-X;
采用第一编码比特数根据码流获得Y个第一点云块的边信息。
可选的,若X<M,且边信息为Z种,Z≥1,本实施例提供的解码方法,还包括:
根据码流获得第一标识信息;
若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z;
若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用第三编码比特数根据码流获得Y个第一点云块的第k种边信息,第三编码比特数为编码装置根据Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
可选的,若X<M,且边信息为Z种,Z>1,本实施例提供的解码方法,还包括:
根据码流获得标识信息。
若标识信息包括第一标识信息,且第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
若标识信息包括第一标识信息,且第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用第三编码比特数根据码流获得Y个第一点云块的第k种边信息,第三编码比特数为编码装置根据Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
若标识信息包括第二标识信息,且第二标识信息为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
若标识信息包括第一标识信息和第二标识信息,第二标识信息为第二符号且第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
若标识信息包括第一标识信息和第二标识信息,第二标识信息为第二符号且第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用所述第三编码比特数根据所述码流获得所述Y个第一点云块的第k种边信息,所述第三编码比特数为编码装置根据所述Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
示例性的,假设标识信息包括第一标识信息和第二标识信息,下面给出一种具体的解码顺序。
步骤11:根据码流获得第二标识信息。
步骤12:若第二标识信息为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
步骤13:若第二标识信息为第二符号,则获得第一标识信息。
步骤14:若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
步骤15:若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用第三编码比特数根据码流获得Y个第一点云块的第k种边信息,第三编码比特数为编码装置根据Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
其中,步骤13中,获得第一标识信息的方式根据第一标识信息和第二标识信息的编码方式确定。可选的,若第一标识信息和第二标识信息分别编码,例如,第一标识信息采用Zbit编码,第二标识信息采用1bit编码,则解码码流获得第一标识信息。可选的,若第一标识信息和第二标识信息联合编码,例如,通过一个字节对第一标识信息和第二标识信息编码,则在步骤11中,已经获得了第一标识信息。
可选的,根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息,包括:
按照X组边信息差值的排列顺序和X个第二点云块的排列顺序,将X组边信息差值中第k组边信息差值与X个第二点云块中第k个第二点云块的边信息之间的和,确定为X个第一点云块中第k个第一点云块的边信息,k=1,…,Z。
可选的,根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息,包括:
根据码流获得匹配信息,匹配信息指示了X个第一点云块与X个第二点云块之间的匹配关系。
根据匹配信息、X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息。
可选的,本实施例提供的解码方法,还包括:
根据M确定第四编码比特数。
采用第四编码比特数根据码流获得X。
可选的,边信息包括下列中的至少一种:点云块在三维坐标系中的X坐标最小值(u1),点云块在三维坐标系中的Y坐标最小值(v1),点云块在三维坐标系中的Z坐标最小值(d1),点云块根据投影方向在占用图中的X坐标最小值(u0),点云块根据投影方向在占用图中的Y坐标最小值(v0)。
本申请实施例提供的解码方法,与图5~图7所示方法实施例提供的编码方法对应,其技术原理和技术效果类似,此处不再赘述。
本申请实施例还提供一种点云数据打包方法,执行主体可以为编码器,用于解决目前仅针对每一帧点云数据进行单独的打包处理而导致的点云块在时间和空间不一致的技术问题。
图2中左侧和右侧分别示出了相邻的前后两帧点云数据对应的占用图。如图2左侧所示,单独对前一帧的点云块进行排序,前5个点云块的排序依次为点云块21~25。按照点云块的排列顺序依次在占用图中插入点云块21~25。如图2右侧所示,单独对后一帧的点云块进行排序,前5个点云块的排序依次为点云块31~35。按照点云块的排列顺序依次在占用图中插入点云块31~35。由于单独对每一帧的点云块进行排序,导致了图2左侧的点云块21、点云块22与图2右侧的点云块31、点云块32在前后两帧的占用图上位置不同。破坏了点云块在时间和空间上的一致性,导致后续对点云块的边信息进行编码时造成压缩性能的损失,影响编码性能。
本申请实施例提供的点云数据打包方法,主要涉及图3中步骤S101,其他步骤与图3中相似。本申请实施例提供的点云数据打包方法,对当前帧的M个第一点云块进行排序,可以包括:
获取当前帧的前一帧中N个第二点云块,N为正整数。
对于N个第二点云块中的第i个第二点云块,i=1,…,N,获取第i个第二点云块与j个尚未匹配的第一点云块之间的关联值Qij,并确定出关联值最大的Qik。其中,j个尚未匹配的第一点云块的投影方向与第i个第二点云块的投影方向相同。
若Qik大于预设阈值,则确定Qik对应的第k个第一点云块与第i个第二点云块匹配,其中,第k个第一点云块为j个尚未匹配的第一点云块中的一个。
若Qik小于或者等于预设阈值,则确定没有第一点云块与第i个第二点云块匹配。
根据N个第二点云块的排列顺序,将与N个第二点云块匹配的第一点云块依次排序。
需要说明的是,本实施例对于没有与N个第二点云块匹配上的第一点云块的排列顺序不做限定。
可选的,关联值Qij可以为第一参考值与第二参考值的商。
所述第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,第二参考值为第一占用矩阵和第二占用矩阵的并集区域的面积。或者,
第一参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的交集区域中包含的像素点个数,第二参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的并集区域中包含的像素点个数。
其中,第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,第二占用矩阵的有效区域为第i个第二点云块根据投影方向在二维平面投影后实际占用的区域,第一占用矩阵为第一占用矩阵的有效区域对应的矩阵区域,第二占用矩阵为第二占用矩阵的有效区域对应的矩阵区域。
可选的,在获取当前帧的前一帧中N个第二点云块之前,还可以包括:
对M个第一点云块进行排序。
详细说明请参见图5所示方法实施例,其技术原理和技术效果类似,此处不再赘述。
下面通过具体示例说明。
图9为本申请实施例涉及的占用图的示意图。图9中左侧和右侧分别示出了相邻的前后两帧点云块对应的占用图。如图9左侧所示,以点云块41~44为例,前一帧点云块41~44的排序依次为点云块41~44。如图9右侧所示,对当前帧的点云块进行排序时,需要与点云块41~44进行匹配。匹配后,点云块51~54的排序依次为点云块51~54。确保了前后两帧中具有匹配关系的点云块在占用图中具有相同的位置,保证了点云块在时间和空间上的一致性。因此,在后续对点云块的边信息进行编码时可以提升编码压缩性能。
本实施例提供的点云数据打包方法,根据前一帧点云块的排序获得当前帧点云块的排序,确保了前后两帧的点云块在时间和空间上的一致性,提升了后续的编码压缩性能。
本实施例还提供一种编码装置,包括处理模块,用于执行本申请实施例提供的点云数据打包方法,其技术原理和技术效果类似,此处不再赘述。
图10为本申请实施例一提供的编码装置的结构示意图。本申请实施例提供的编码装置,用于执行图5~图7所示任一方法实施例提供的编码方法。如图10所示,本申请实施例提供的编码装置,可以包括:
确定模块61,用于在当前帧的M个第一点云块中确定X个第一点云块。X个第一个点云块与X个第二点云块存在预设的匹配关系,X个第二点云块包含在当前帧的前一帧中。其中,X小于或者等于M,且X和M均为正整数。
获取模块62,用于获取X个第一点云块的边信息和X个第二点云块的边信息。
编码模块63,用于根据X个第一点云块的边信息和X个第二点云块的边信息得到X组边信息差值,对X组边信息差值进行编码。
可选的,若X<M,获取模块62还用于:
获取M个第一点云块中剩余的Y个第一点云块的边信息,Y=M-X。
获取Y个第一点云块的边信息的最大值A。
编码模块63还用于:
根据最大值A确定Y个第一点云块的边信息对应的第一编码比特数。
对第一编码比特数进行编码。
采用第一编码比特数对Y个第一点云块的边信息进行编码。
可选的,若X<M,且边信息为Z种,Z>1,获取模块62还用于:
获取M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X。
获取X个第一点云块的第k种边信息的最大值Bk和Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z。
编码模块63还用于:
若最大值Bk大于或者等于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第一符号。若最大值Bk小于最大值Ak,则确定第一标识信息中与第k种边信息对应的比特位为第二符号。
若第一标识信息中每个比特位均为第一符号,则确定第二标识信息为第一符号,并对第二标识信息编码。根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
若第一标识信息中至少一个比特位为第二符号,则确定第二标识信息为第二符号,对 第一标识信息和第二标识信息进行编码。若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据最大值Ak确定Y个第一点云块的第k种边信息对应的第三编码比特数,对第三编码比特数进行编码,并采用第三编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
可选的,确定模块61具体用于通过下述步骤确定预设的匹配关系:
获取当前帧的前一帧中N个第二点云块,N为正整数。
对于N个第二点云块中的第i个第二点云块,i=1,…,N,获取第i个第二点云块与j个尚未匹配的第一点云块之间的关联值Qij,并确定出关联值最大的Qik,其中,j个尚未匹配的第一点云块的投影方向与第i个第二点云块的投影方向相同。
若Qik大于预设阈值,则确定Qik对应的第k个第一点云块与第i个第二点云块匹配,其中,第k个第一点云块为j个尚未匹配的第一点云块中的一个。
可选的,若确定出O个第一点云块存在匹配关系,确定模块61具体用于:
在O个第一点云块中确定X个第一点云块,O个第一点云块为与N个第二点云块匹配的第一点云块,O≥X。
可选的,关联值Qij为第一参考值与第二参考值的商。
第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,第二参考值为第一占用矩阵和第二占用矩阵的并集区域的面积。或者,
第一参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的交集区域中包含的像素点个数,第二参考值为第一占用矩阵的有效区域和第二占用矩阵的有效区域的并集区域中包含的像素点个数。
其中,第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,第二占用矩阵的有效区域为第i个第二点云块根据投影方向在二维平面投影后实际占用的区域,第一占用矩阵为第一占用矩阵的有效区域对应的矩阵区域,第二占用矩阵为第二占用矩阵的有效区域对应的矩阵区域。
可选的,预设的匹配关系包括:按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,X个第一个点云块中的第k个第一点云块与X个第二个点云块中的第k个第二点云块匹配,k=1,…,X。
可选的,编码模块63具体用于:
将X个第一点云块的边信息分别和与X个第一点云块匹配的X个第二点云块的边信息之间的差值确定为X组边信息差值。
获取模块62还用于,获取匹配信息,匹配信息指示了X个第一点云块与X个第二点云块之间的匹配关系。
编码模块63还用于,对匹配信息进行编码。
可选的,编码模块63具体用于:
按照X个第一点云块的排列顺序和X个第二点云块的排列顺序,将X个第一个点云块中第k个第一点云块的边信息与X个第二个点云块中第k个第二点云块的边信息之间的差值,确定为X组边信息差值中的第k组边信息差值,k=1,…,X。
可选的,编码模块63还用于:
根据M确定第四编码比特数。
采用第四编码比特数对X进行编码。
可选的,边信息包括下列中的至少一种:点云块在三维坐标系中的X坐标最小值、点云块在三维坐标系中的Y坐标最小值、点云块在三维坐标系中的Z坐标最小值、点云块根据投影方向在占用图中的X坐标最小值和点云块根据投影方向在占用图中的Y坐标最小值。
本实施例提供的编码装置,可以执行图5~图7所示任一实施例提供的编码方法,其技术原理和技术效果类似,此处不再赘述。
图11为本申请实施例一提供的解码装置的结构示意图。本申请实施例提供的解码装置,用于执行图8所示方法实施例提供的解码方法。如图11所示,本申请实施例提供的解码装置,可以包括:
解码模块72,用于根据码流获得当前帧X个第一点云块的X组边信息差值。其中,当前帧的M个第一点云块包括X个第一点云块,X个第一个点云块与当前帧的前一帧的X个第二点云块存在预设的匹配关系,X小于或者等于M,且X和M均为正整数。
获取模块71,用于获取X个第二点云块的边信息。
解码模块72还用于,根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息。
可选的,若X<M,解码模块72还用于:
根据码流获得第一编码比特数,第一编码比特数为编码装置根据M个第一点云块中剩余的Y个第一点云块的边信息的最大值A确定的,Y=M-X。
采用第一编码比特数根据码流获得Y个第一点云块的边信息。
可选的,若X<M,且边信息为Z种,Z>1,解码模块72还用于:
根据码流获得第二标识信息。
若第二标识信息为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
若第二标识信息为第二符号,则获得第一标识信息。
若第一标识信息中与第k种边信息对应的比特位为第一符号,则根据X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用第二编码比特数根据码流获得M个第一点云块中剩余的Y个第一点云块的第k种边信息,k=1,…,Z。
若第一标识信息中与第k种边信息对应的比特位为第二符号,则根据码流获得第三编码比特数,采用第三编码比特数根据码流获得Y个第一点云块的第k种边信息,第三编码比特数为编码装置根据Y个第一点云块的第k种边信息的最大值Ak确定的,k=1,…,Z。
可选的,解码模块72还用于:
根据M确定第四编码比特数。
采用第四编码比特数根据码流获得X。
本实施例提供的解码装置,可以执行图8所示实施例提供的解码方法,其技术原理和技术效果类似,此处不再赘述。
图12为本申请实施例一提供的编码器的结构示意图。如图12所示,本实施例提供的编码器,可以包括:处理器81和存储器82。其中,所述存储器82用于存储指令。所述处理器81用于执行所述存储器中存储的指令,以使所述编码器执行图5~图7所示任一实施例提供的编码方法,具体实现方式和技术效果类似,这里不再赘述。该编码还可以包括收发器83,所述收发器83用于和其他设备通信。
图13为本申请实施例一提供的解码器的结构示意图。如图13所示,本实施例提供的解码器,可以包括:处理器91和存储器92。其中,所述存储器92用于存储指令。所述处理器91用于执行所述存储器中存储的指令,以使所述网络设备执行图8所示实施例提供的解码方法,具体实现方式和技术效果类似,这里不再赘述。该解码器还可以包括收发器93,所述收发器93用于和其他设备通信。
可以理解,本申请实施例中的处理器可以是中央处理器(CPU),通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC),现场可编程门阵列(FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘solid state disk(SSD))等。
可选的,本申请实施例涉及的匹配信息,在又一种实现方式中,可以包括下列中的任意一种:
与X个第一点云块对应匹配的X个第二点云块的索引值。
X个索引差值。X个索引差值为X个第一点云块的索引值和与X个第一点云块对应匹配的X个第二点云块的索引值之间的差值。
在该种实现方式中,解码装置可以获得或者推导获得X个第一点云块的索引值。
下面通过具体示例进行说明。
假设X等于5。编码装置和解码装置可以获知X个第一点云块的索引值依次为0,1,2,3,4。与上述5个第一点云块对应匹配的5个第二点云块的索引值分别为0,2,3,1,4。
可选的,在一种实现方式中,匹配信息可以包括与上述5个第一点云块对应匹配的5个第二点云块的索引值,具体的,为0,2,3,1,4。可以采用3bit对匹配信息进行编码。
可选的,在另一种实现方式中,匹配信息可以包括X个索引差值。该X个索引差值可以为:第一点云块的索引值减去对应匹配的第二点云块的索引值。具体的,X个索引差值可以为:0-0,1-2,2-3,3-1,4-4,即,0,-1,-1,2,0。
可选的,在又一种实现方式中,匹配信息可以包括X个索引差值。该X个索引差值可以为:与第一点云块对应匹配的第二点云块的索引值减去该第一点云块的索引值。具体的,X个索引差值可以为:0-0,2-1,3-2,1-3,4-4,即,0,1,1,-2,0。
可选的,本申请图5所示实施例提供的编码方法中,若获取匹配信息,S402、获取X个第一点云块的边信息和X个第二点云块的边信息,可以包括:
获取X个第一点云块的边信息。
根据匹配信息,获取与X个第一点云块匹配对应的X个第二点云块的边信息。
下面通过具体示例进行说明。
假设边信息为7种,具体为表1中的u0,v0,u1,v1,d1,sizeU0和sizeV0。
X=5。
5个第一点云块的索引值依次为0,1,2,3,4。索引值为i,i=0,1,2,3,4的第一点云块的7种边信息标记为u0 i,v0 i,u1 i,v1 i,d1 i,sizeU0 i和sizeV0 i。例如,索引值为0的第一点云块的7种边信息标记为u0 0,v0 0,u1 0,v1 0,d1 0,sizeU0 0和sizeV0 0
5个第二点云块的索引值依次为0,1,2,3,4。索引值为j,j=0,1,2,3,4的第二点云块的7种边信息标记为pre_u0 j,pre_v0 j,pre_u1 j,pre_v1 j,pre_d1 j,pre_sizeU0 j和pre_sizeV0 j。例如,索引值为2的第二点云块的7种边信息标记为pre_u0 2,pre_v0 2,pre_u1 2,pre_v1 2,pre_d1 2,pre_sizeU0 2和pre_sizeV0 2
可选的,在一个示例中,匹配信息包括X个第一点云块的索引值以及与X个第一点云块对应匹配的X个第二点云块的索引值。例如,5个第一点云块的索引值{0,1,2,3,4}和5个第二点云块的索引值{0,2,3,1,4}。
那么,5个第一点云块的边信息如下:
u0 0,v0 0,u1 0,v1 0,d1 0,sizeU0 0,sizeV0 0
u0 1,v0 1,u1 1,v1 1,d1 1,sizeU0 1,sizeV0 1
u0 2,v0 2,u1 2,v1 2,d1 2,sizeU0 2,sizeV0 2
u0 3,v0 3,u1 3,v1 3,d1 3,sizeU0 3,sizeV0 3
u0 4,v0 4,u1 4,v1 4,d1 4,sizeU0 4,sizeV0 4
与5个第一点云块匹配对应的5个第二点云块的边信息如下:
pre_u0 0,pre_v0 0,pre_u1 0,pre_v1 0,pre_d1 0,pre_sizeU0 0,pre_sizeV0 0
pre_u0 2,pre_v0 2,pre_u1 2,pre_v1 2,pre_d1 2,pre_sizeU0 2,pre_sizeV0 2
pre_u0 3,pre_v0 3,pre_u1 3,pre_v1 3,pre_d1 3,pre_sizeU0 3,pre_sizeV0 3
pre_u0 1,pre_v0 1,pre_u1 1,pre_v1 1,pre_d1 1,pre_sizeU0 1,pre_sizeV0 1
pre_u0 4,pre_v0 4,pre_u1 4,pre_v1 4,pre_d1 4,pre_sizeU0 4,pre_sizeV0 4
5个第一点云块的边信息差值如下:
delta_u0 0=u0 0-pre_u0 0,delta_v0 0=v0 0-pre_v0 0,delta_u1 0=u1 0-pre_u1 0,
delta_v1 0=v1 0-pre_v1 0,delta_d1 0=d1 0-pre_d1 0,delta_sizeU0 0=sizeU0 0-pre_sizeU0 0,delta_sizeV0 0=sizeV0 0-pre_sizeV0 0
delta_u0 1=u0 1-pre_u0 2,delta_v0 1=v0 1-pre_v0 2,delta_u 1=u1 1-pre_u1 2,
delta_v1 1=v1 1-pre_v1 2,delta_d1 1=d1 1-pre_d1 2,delta_sizeU0 1=sizeU0 1-pre_sizeU0 2,delta_sizeV0 1=sizeV0 1-pre_sizeV0 2
delta_u0 2=u0 2-pre_u0 3,delta_v0 2=v0 2-pre_v0 3,delta_u 2=u1 2-pre_u1 3,
delta_v1 2=v1 2-pre_v1 3,delta_d1 2=d1 2-pre_d1 3,delta_sizeU0 2=sizeU0 2-pre_sizeU0 3,delta_sizeV0 2=sizeV0 2-pre_sizeV0 3
delta_u0 3=u0 3-pre_u0 1,delta_v0 3=v0 3-pre_v0 1,delta_u 3=u1 3-pre_u1 1,
delta_v1 3=v1 3-pre_v1 1,delta_d1 3=d1 3-pre_d1 1,delta_sizeU0 3=sizeU0 3-pre_sizeU0 1,delta_sizeV0 3=sizeV0 3-pre_sizeV0 1
delta_u0 4=u0 4-pre_u0 4,delta_v0 4=v0 4-pre_v0 4,delta_u 4=u1 4-pre_u1 4,
delta_v1 4=v1 4-pre_v1 4,delta_d1 4=d1 4-pre_d1 4,delta_sizeU0 4=sizeU0 4-pre_sizeU0 4,delta_sizeV0 4=sizeV0 4-pre_sizeV0 4
可选的,在另一个示例中,匹配信息包括X个索引差值。X个索引差值为X个第一点云块的索引值减去与X个第一点云块对应匹配的X个第二点云块的索引值的差值。例如为,{0,-1,-1,2,0}。
首先,可以获知5个第一点云块的索引值依次为0,1,2,3,4。由于5个索引差值为0,-1,-1,2,0,那么,与5个第一点云块对应匹配的5个第二点云块的索引值依次为:0-0,1-(-1),2-(-1),3-2,4-0,即,0,2,3,1,4。
5个第一点云块的边信息、与5个第一点云块匹配对应的5个第二点云块的边信息,以及5个第一点云块的边信息差值同上,此处不再赘述。
需要说明的是,本实施例对于获取第一点云块的边信息和获取第二点云块的边信息的执行顺序不做限定。
可选的,本申请图8所示实施例提供的解码方法中,若解析码流,获得匹配信息,则,S703,根据X组边信息差值和X个第二点云块的边信息获得X个第一点云块的边信息,可以包括:
根据匹配信息,确定与X个第一点云块匹配对应的X个第二点云块的边信息。
根据X组边信息差值和X个第二点云块的边信息,获得X个第一点云块的边信息。
下面通过示例进行说明。
假设边信息为7种,具体为表1中的u0,v0,u1,v1,d1,sizeU0和sizeV0。
X=5。
5个第二点云块的索引值依次为0,1,2,3,4。索引值为j,j=0,1,2,3,4的第二点云块的7种边信息标记为pre_u0 j,pre_v0 j,pre_u1 j,pre_v1 j,pre_d1 j,pre_sizeU0 j和pre_sizeV0 j。例如,索引值为2的第二点云块的7种边信息标记为pre_u0 2,pre_v0 2,pre_u1 2,pre_v1 2,pre_d1 2,pre_sizeU0 2和pre_sizeV0 2
可选的,在一个示例中,匹配信息包括与X个第一点云块对应匹配的X个第二点云块的索引值。例如,5个第二点云块的索引值{0,2,3,1,4}。
首先,可以获知5个第一点云块的索引值依次为0,1,2,3,4。那么,与索引值为0,1,2,3,4的5个第一点云块对应匹配的5个第二点云块的边信息如下:
pre_u0 0,pre_v0 0,pre_u1 0,pre_v1 0,pre_d1 0,pre_sizeU0 0,pre_sizeV0 0
pre_u0 2,pre_v0 2,pre_u1 2,pre_v1 2,pre_d1 2,pre_sizeU0 2,pre_sizeV0 2
pre_u0 3,pre_v0 3,pre_u1 3,pre_v1 3,pre_d1 3,pre_sizeU0 3,pre_sizeV0 3
pre_u0 1,pre_v0 1,pre_u1 1,pre_v1 1,pre_d1 1,pre_sizeU0 1,pre_sizeV0 1
pre_u0 4,pre_v0 4,pre_u1 4,pre_v1 4,pre_d1 4,pre_sizeU0 4,pre_sizeV0 4
可选的,在另一个示例中,匹配信息包括X个第一点云块的索引值和X个索引差值。X个索引差值为与X个第一点云块对应匹配的X个第二点云块的索引值减去X个第一点云块的索引值的差值。例如,5个第一点云块的索引值{0,1,2,3,4},5个索引差值为{0,1,1,-2,0}。
由于已知第一点云块的索引值以及索引差值,因此,与5个第一点云块对应匹配的5个第二点云块的索引值依次为:0+0,1+1,2+1,3+(-2),4+0,即0,2,3,1,4。
与5个第一点云块匹配对应的5个第二点云块的边信息同上,此处不再赘述。
在确定与X个第一点云块匹配对应的X个第二点云块的边信息后,可以根据X组边信息差值和X个第二点云块的边信息,获得X个第一点云块的边信息。
需要说明的是,如果点云块的边信息中有法向坐标轴索引normalAxis,那么在解码端,X个第一点云块的边信息法向坐标轴索引normalAxis可以通过与X个第一点云块匹配的第二点云块的边信息法向坐标轴索引normalAxis确定。
例如,若X=5。
5个第一点云块的索引值依次为0,1,2,3,4。索引值为i,i=0,1,2,3,4的第一点云块的边信息法向坐标轴索引normalAxis标记为normalAxis i。例如,索引值为0的第一点云块的边信息法向坐标轴索引normalAxis标记为normalAxis 0
5个第二点云块的索引值依次为0,1,2,3,4。索引值为j,j=0,1,2,3,4的第二点云块的边信息法向坐标轴索引normalAxis标记为pre_normalAxis j。例如,索引值为0的第二点云块的边信息法向坐标轴索引normalAxis标记为pre_normalAxis 0
可选的,在一个示例中,匹配信息包括与X个第一点云块对应匹配的X个第二点云块的索引值。例如,5个第二点云块的索引值{0,2,3,1,4}。
首先,可以获知5个第一点云块的索引值依次为0,1,2,3,4。那么,与索引值为0,1,2,3,4的5个第一点云块对应匹配的5个第二点云块的边信息法向坐标轴索引normalAxis如下:
pre_normalAxis 0
pre_normalAxis 2
pre_normalAxis 3
pre_normalAxis 1
pre_normalAxis 4
那么,索引值为i,i=0,1,2,3,4的第一点云块的边信息法向坐标轴索引normalAxis标记为normalAxis i可以通过如下公式获得:
normalAxis 0=pre_normalAxis 0
normalAxis 1=pre_normalAxis 2
normalAxis 2=pre_normalAxis 3
normalAxis 3=pre_normalAxis 1
normalAxis 4=pre_normalAxis 4
可选的,本申请实施例涉及的,匹配关系可以通过下述步骤确定:
获取当前帧的前一帧中N个第二点云块,N为正整数。
对于N个第二点云块中的第i个第二点云块,i=1,…,N,获取第i个第二点云块与j个尚未匹配的第一点云块之间的关联值,并确定出关联值最大值Qik。其中,j个尚未匹配的第一点云块的投影方向与第i个第二点云块的投影方向相同。
若Qik大于预设阈值,则确定Qik对应的第k个第一点云块与第i个第二点云块匹配,其中,第k个第一点云块为j个尚未匹配的第一点云块中的一个。
若Qik小于或者等于预设阈值,则确定没有第一点云块与第i个第二点云块匹配。
下面通过另一个示例进行说明。
假设N=10。第二点云块用pre_patch标识。第一点云块用patch标识。按照第二点云块的排列顺序,10个第二点云块可以标识为pre_patch[i],i=1,…,10,对应的索引值可以为1~10。M=20,按照第一点云块的排列顺序,20个第一点云块可以标识为patch[k],k=1,…,20,对应的索引值可以为1~20,对应的最佳匹配索引bestMatchIndex均为-1。其中,-1为bestMatchIndex的缺省值,也可以为其他缺省值,例如可以选择大于或者等于N的值。最佳匹配索引用于指示与当前第一点云块匹配的第二点云块的索引。预设阈值可以标识为thr。
遍历N个第二点云块。首先,获取pre_patch[1](索引值为1),然后遍历M个第一点云块。假设为patch[k],k=1,…,20。如果patch[k]的投影方向与pre_patch[1]的投影方向相同,且patch[k]的最佳匹配索引bestMatchIndex为-1,则计算pre_patch[1]与所有满足上述条件的第一点云块patch[k]之间的关联值,并获得这些关联值中的最大值Q1m。其中,m为关联值的最大值对应的第一点云块的索引。比较Q1m与预设阈值thr的大小。如果Q1m>thr,则确定pre_patch[1]与patch[m]匹配。也就是说,当前帧索引值为m的第一点云块与前一帧索引值为1的第二点云块匹配。更新patch[m]的最佳匹配索引bestMatchIndex为m,并将patch[m]保存在数组W中。如果Q1m<=thr,则说明M个第一点云块中没有与pre_patch[1]存在匹配关系的点云块。
继续遍历N个第二点云块,获取pre_patch[2](索引值为2),采用上述相同的步骤。在M个第一点云块中寻找与pre_patch[2]具有匹配关系的点云块。如果与pre_patch[2]匹配的第二点云块的索引值为-1,说明在M个第一点云块中没有找到与pre_patch[2]存在匹配 关系的patch。如果与pre_patch[2]匹配的第二点云块的索引值为n,说明M个第一点云块中的第n个patch与pre_patch[2]存在匹配关系,即patch[n]的最佳匹配索引bestMatchIndex为n。直至遍历完N个第二点云块为止。
通过上述步骤,数组W中保存了所有依次与第二点云块存在匹配关系的第一点云块,假设有matchedPatchCount个。matchedPatchCount个具有匹配关系的第一点云块在数组W中的排列顺序与N个第二点云块的排列顺序相同。将M个第一点云块中与N个第二点云块都不存在匹配关系的剩余的第一点云块(patch)放入数组W中,且放入matchedPatchCount个具有匹配关系的第一点云块的后面。数组W的前matchedPatchCount个patch为具有匹配关系的patch,其余为不具有匹配关系的patch。需要说明的是,本申请实施例对于不具有匹配关系的第一点云块放入数组W的顺序不做限定,可以依次将M个第一点云块中不具有匹配关系的patch(也就是patch的bestMatchIndex为-1的patch)放入数组W。也可以以随机的顺序将M个第一点云块中不具有匹配关系的patch(也就是patch的bestMatchIndex为-1的patch),放入数组W。
然后用数组W更新M个第一点云块中patch数组顺序。这样M个第一点云块中的前matchedPatchCount个第一点云块为具有匹配关系的第一点云块,后面的M-matchedPatchCount个第一点云块为不具有匹配关系(最佳匹配索引bestMatchIndex为-1)的第一点云块。
可选的,本申请实施例还提供一种编码方法,主要涉及在X<M时,提供了对M个第一点云块中除X个第一点云块之外的剩余的Y个第一点云块的边信息的编码方法。本实施例提供的编码方法,可以包括:
步骤21、获取M个第一点云块中剩余的Y个第一点云块的Z种边信息。
其中,Y=M-X,Z≥1。
步骤22、获取X个第一点云块的第k种边信息的最大值Bk和Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z。
步骤23、若最大值Bk所需比特数大于或者等于最大值Ak所需比特数,则确定第一标识信息中与第k种边信息对应的比特位为第一符号,根据最大值Bk所需比特数或者最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数,并采用第二编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
下面通过示例进行说明。
假设,X个第一点云块的第k种边信息的最大值Bk为200,编码Bk需要的比特数为8位。Y个第一点云块的第k种边信息的最大值Ak为209,编码Ak需要的比特数为8位。此时,可以根据最大值Bk所需比特数或者最大值Bk确定Y个第一点云块的第k种边信息对应的第二编码比特数为8位。并采用第二编码比特数8对Y个第一点云块的第k种边信息进行编码。
相比于图7所示实施例,本实施例提供的编码方法,不是比较最大值Bk与最大值Ak,而是比较最大值Bk所需要的比特数和最大值Ak所需要的比特数。当最大值Bk所需比特数大于或者等于最大值Ak所需比特数,可以直接采用最大值Bk所需比特数对Y个第一点云块的第k种边信息进行编码。由于不需要对Y个第一点云块的边信息对应的编码比特 数专门编码并通知给解码装置,进一步压缩了码流,提高了编码效率和压缩性能。
步骤24、若最大值Bk所需比特数小于最大值Ak所需比特数,则确定第一标识信息中与第k种边信息对应的比特位为第二符号,根据最大值Ak所需比特数或者最大值Ak确定Y个第一点云块的第k种边信息对应的第三编码比特数,对第三编码比特数进行编码,并采用第三编码比特数对Y个第一点云块的第k种边信息进行编码,k=1,…,Z。
步骤25、对第一标识信息进行编码。
需要说明的是,步骤21可以参见图7所示实施例中S601的描述,步骤22可以参见S602的描述,步骤25可以参见S605的描述。技术原理和技术效果相似,此处不再赘述。
可选的,在一种实现方式中,图7所示实施例中S604,以及步骤24中,对第三编码比特数进行编码,可以包括:
直接对第三编码比特数进行编码。
下面通过示例进行说明。
假设,第三编码比特数为6,则可以采用3bit直接对第三编码比特数编码,编码后的码流包括0x6。
相应的,在解码端,解码装置可以解析码流,获得第三编码比特数。
还以上述示例为例。解码装置可以从码流中解析3个bit,假设为0x6,则可以获得第三编码比特数为6。
可选的,在另一种实现方式中,图7所示实施例中S604,以及步骤24中,对第三编码比特数进行编码,可以包括:
对第三编码比特数与最大值Bk所需比特数之间的差值进行编码。
下面通过示例进行说明。
假设,第三编码比特数为7,第三编码比特数一般大于或者等于最大值Ak所需编码比特数,最大值Bk所需比特数为3,则,第三编码比特数与最大值Bk所需比特数之间的差值为4bit。可以采用2bit对该差值编码,编码后的码流包括0x4。
相应的,在解码端,解码装置可以从码流中获得差值比特信息。差值比特信息用于指示Y个第一点云块的第k种边信息的最大值Ak所需比特数与最大值Bk所需比特数之间的差值,k=1,…,Z。根据差值比特信息和最大值Bk所需比特数获得第三编码比特数。
还以上述示例为例。解码装置可以从码流中解析2个bit,假设为0x4,则可以获得差值比特信息为4。而已经获得最大值Bk所需比特数为3。那么,可以根据差值比特信息4和最大值Bk所需比特数为3,获得第三编码比特数为7。
需要说明的是,本实施例提供的编码方法,除步骤23和步骤24之外,其他与图7所示实施例相似,技术原理和技术效果相似,此处不再赘述。
需要说明的是,在本申请各实施例中,利用了连续帧的点云数据之间的相关性,当前帧和当前帧的前一帧为连续的两帧。在一些实施方式中,连续的两帧也可以称为当前帧和当前帧的参考帧。其中,当前帧的参考帧可以为当前帧的前一帧,或者为当前帧的后一帧。当前帧中的点云块可以称为第一点云块。参考帧中的点云块可以称为参考点云块。
需要说明的是,当前帧的前一帧或者后一帧可以是调整顺序后的帧。当前帧的前一帧或者后一帧不一定为时间序列上的前一帧或者后一帧。例如:输入的若干帧待处理点云可 以为经过时间顺序调整后的序列。例如:时间序列帧顺序为第1,2,3,…7帧,经过调整后的顺序变为第1,3,7,4,5,2,6。假设,当前帧为第7帧,那么,第7帧的前一帧在调整顺序后的帧序列中为第3帧,第7帧的后一帧在调整顺序后的帧序列中为第4帧。

Claims (100)

  1. 一种点云数据的编码方法,其特征在于,包括:
    在当前帧的M个第一点云块中确定X个第一点云块;所述X个第一点云块与X个参考点云块存在匹配关系,所述X个参考点云块包含在所述当前帧的参考帧中;其中,X小于或者等于M,且X和M均为正整数;
    获取所述X个第一点云块的边信息和所述X个参考点云块的边信息;
    根据所述X个第一点云块的边信息和所述X个参考点云块的边信息得到X组边信息差值;
    将所述X组边信息差值编码入码流。
  2. 根据权利要求1所述的方法,其特征在于,若X<M,所述方法还包括:
    获取所述M个第一点云块中剩余的Y个第一点云块的至少一种边信息,Y=M-X,Y为正整数;
    针对每种边信息,获取所述Y个第一点云块的该种边信息的最大值A;
    根据所述最大值A确定所述Y个第一点云块的该种边信息对应的第一编码比特数;
    将所述第一编码比特数编码入所述码流中;
    采用所述第一编码比特数将所述Y个第一点云块的该种边信息编码入所述码流中。
  3. 根据权利要求1所述的方法,其特征在于,若X<M,且所述边信息为Z种,Z≥1,所述方法还包括:
    获取所述M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X,Y为正整数;
    获取所述X个第一点云块的第k种边信息的最大值Bk和所述Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z;
    若所述最大值Bk大于或者等于所述最大值Ak,或者,所述最大值Bk所需比特数大于或者等于所述最大值Ak所需比特数,则确定第一标识信息中与所述第k种边信息对应的比特位为第一符号;
    若所述最大值Bk小于所述最大值Ak,或者,所述最大值Bk所需比特数小于所述最大值Ak所需比特数,则确定所述第一标识信息中与所述第k种边信息对应的比特位为第二符号。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    若所述第一标识信息中每个比特位均为所述第一符号,则确定第二标识信息为第三符号,并将所述第二标识信息编码入所述码流中;
    根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
  5. 根据权利要求3或4所述的方法,其特征在于,所述方法还包括:
    若所述第一标识信息中至少一个比特位为所述第二符号,则确定第二标识信息为第四符号,将所述第一标识信息和所述第二标识信息编码入所述码流中;
    若所述第一标识信息中与第k种边信息对应的比特位为所述第一符号,则根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z;或者,
    若第一标识信息中与第k种边信息对应的比特位为所述第二符号,则根据所述最大值Ak确定所述Y个第一点云块的第k种边信息对应的第三编码比特数,将所述第三编码比特数编码入所述码流中,并采用所述第三编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
  6. 根据权利要求5所述的方法,其特征在于,所述将所述第三编码比特数编码入所述码流中,包括:
    将所述第三编码比特数与所述最大值Bk所需比特数之间的差值编码入所述码流中。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述根据所述X个第一点云块的边信息和所述X个参考点云块的边信息得到X组边信息差值,包括:
    分别将所述X个第一点云块的边信息和与所述X个第一点云块对应匹配的X个参考点云块的边信息之间的差值确定为所述X组边信息差值。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:
    获取匹配信息,所述匹配信息用于指示所述X个第一点云块与所述X个参考点云块之间的匹配关系;
    将所述匹配信息编码入所述码流中。
  9. 根据权利要求8所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  10. 根据权利要求8所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  11. 根据权利要求1-6任一项所述的方法,其特征在于,所述根据所述X个第一点云块的边信息和所述X个参考点云块的边信息得到X组边信息差值,包括:
    按照所述X个第一点云块在所述当前帧中的排列顺序和所述X个参考点云块在所述参 考帧中的排列顺序,将所述X个第一个点云块中第k个第一点云块的边信息与所述X个参考点云块中第k个参考点云块的边信息之间的差值,确定为所述X组边信息差值中的第k组边信息差值,k=1,…,X。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述方法还包括:
    根据所述M确定第四编码比特数;
    采用所述第四编码比特数将所述X编码入所述码流中。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述边信息差值包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
  14. 根据权利要求1-12任一项所述的方法,其特征在于,所述边信息包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
    所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
    所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
  15. 根据权利要求1-14任一项所述的方法,其特征在于,所述当前帧的参考帧包括所述当前帧的前一帧,或者,所述当前帧的后一帧。
  16. 一种点云数据的解码方法,其特征在于,包括:
    解析码流,以获得X组边信息差值;其中,X表示当前帧中与参考点云块匹配的第一点云块的个数,X小于或者等于M,M表示当前帧中的第一点云块的个数,且X和M均为正整数;
    获取X个参考点云块的边信息;所述参考点云块包含在所述当前帧的参考帧中;
    根据所述X组边信息差值和所述X个参考点云块的边信息获得所述当前帧中的X个第一点云块的边信息。
  17. 根据权利要求16所述的方法,其特征在于,若X<M,所述方法还包括:
    解析所述码流,以获得至少一个第一编码比特数;每个所述第一编码比特数为用于编码Y个第一点云块的至少一种边信息中与该第一编码比特数对应的一种边信息的最大值A所需要的比特数,Y=M-X,Y为正整数;
    采用所述至少一个第一编码比特数从所述码流中获得所述Y个第一点云块的至少一种边信息。
  18. 根据权利要求16所述的方法,其特征在于,若X<M,且所述边信息为Z种,Z≥1,所述方法还包括:
    从所述码流中获得第二标识信息;
    若所述第二标识信息为第三符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,k=1,…,Z,Y=M-X,Y为正整数。
  19. 根据权利要求18所述的方法,其特征在于,还包括:
    若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
    若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,k=1,…,Z。
  20. 根据权利要求19所述的方法,其特征在于,还包括:
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z。
  21. 根据权利要求19所述的方法,其特征在于,还包括:
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为所述Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述最大值Bk所需比特数之间的差值,k=1,…,Z;
    根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z;
    采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息。
  22. 根据权利要求16-21任一项所述的方法,其特征在于,所述方法还包括:
    解析所述码流,以获得匹配信息;所述匹配信息用于指示所述X个第一点云块与所述X个参考点云块之间的匹配关系;
    所述获取X个参考点云块的边信息,包括:
    根据所述匹配信息,确定与X个第一点云块匹配对应的所述X个参考点云块;
    获得所述X个参考点云块的边信息。
  23. 根据权利要求22所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  24. 根据权利要求22所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  25. 根据权利要求16-24任一项所述的方法,其特征在于,所述方法还包括:
    根据所述M确定第四编码比特数;
    采用所述第四编码比特数解析所述码流以获得所述X。
  26. 根据权利要求16-25任一项所述的方法,其特征在于,所述边信息差值包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
  27. 根据权利要求16-25任一项所述的方法,其特征在于,所述边信息包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
    所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
    所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
  28. 一种确定点云块之间匹配关系的方法,其特征在于,包括:
    获取当前帧中的M个第一点云块以及所述当前帧的参考帧中的N个参考点云块;M和N均为正整数;
    根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系;X小于或者等于M,X小于或者等于N。
  29. 根据权利要求28所述的方法,其特征在于,所述根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系,包括:
    根据所述M个第一点云块与所述N个参考点云块,获得所述M个第一点云块与所述N个参考点云块之间的关联值;
    根据所述M个第一点云块与所述N个参考点云块之间的关联值,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系。
  30. 根据权利要求29所述的方法,其特征在于,所述根据所述M个第一点云块与所述N个参考点云块之间的关联值,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系,包括:
    对于所述N个参考点云块中的第i个参考点云块,i=1,…,N,获取所述第i个参考点云块与j个尚未匹配的第一点云块之间的关联值,并在j个关联值中确定出关联值最大的Qik;其中,所述j个尚未匹配的第一点云块包括:在所述当前帧中的M个第一点云块中与所述 第i个参考点云块之前的i-1个参考点云块均不匹配,且投影方向与所述第i个参考点云块的投影方向相同的第一点云块;j小于或等于M,k小于或等于j,j、k和M均为正整数;
    若所述Qik大于预设阈值,则确定所述Qik对应的第k个第一点云块与所述第i个参考点云块匹配,其中,所述第k个第一点云块为所述j个尚未匹配的第一点云块中的一个。
  31. 根据权利要求29所述的方法,其特征在于,所述关联值为第一参考值与第二参考值的商;
    所述第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,所述第二参考值为所述第一占用矩阵和所述第二占用矩阵的并集区域的面积;或者,
    所述第一参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的交集区域中包含的像素点个数,所述第二参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的并集区域中包含的像素点个数;
    其中,所述第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,所述第二占用矩阵的有效区域为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域,所述第一占用矩阵为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域对应的矩阵区域,所述第二占用矩阵为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域对应的矩阵区域。
  32. 根据权利要求28所述的方法,其特征在于,所述根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系,包括:
    按照所述N个参考点云块在所述参考帧中的排列顺序和所述M个第一点云块在所述当前帧中的排列顺序,确定X个第一点云块分别与所述X个参考点云块匹配。
  33. 根据权利要求28-32任一项所述的方法,其特征在于,还包括:
    将所述当前帧中的所述X个第一点云块,按照与所述X个参考点云块的匹配顺序排序;
    将所述当前帧中除所述X个第一点云块之外的至少一个第一点云块,分别排列在所述X个第一点云块的后面。
  34. 一种编码方法,其特征在于,包括:
    获取匹配信息,所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X个参考点云块包含在当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M为当前帧中的第一点云块的个数;
    将所述匹配信息编入码流。
  35. 根据权利要求34所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第 一点云块对应匹配的X个参考点云块的索引值之间的差值。
  36. 根据权利要求34所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  37. 根据权利要求34-36任一项所述的方法,其特征在于,所述方法还包括:
    将X组边信息差值编码入所述码流,其中,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值。
  38. 根据权利要求34-37任一项所述的方法,其特征在于,
    所述方法还包括:将所述X编码入所述码流中;
    或者,
    所述方法还包括:根据所述M确定第四编码比特数;采用所述第四编码比特数将所述X编码入所述码流中。
  39. 一种解码方法,其特征在于,包括:
    解析码流,以获得匹配信息;所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X表示当前帧中与参考点云块匹配的第一点云块的个数,所述参考点云块包含在所述当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M表示所述当前帧中的第一点云块的数量;
    根据所述匹配信息,获得所述X个第一点云块的边信息。
  40. 根据权利要求39所述的方法,其特征在于,所述根据所述匹配信息,获得所述X个第一点云块的边信息,包括:
    根据所述匹配信息,确定所述X个参考点云块;
    根据所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
  41. 根据权利要求39或40所述的方法,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  42. 根据权利要求39或40所述的方法,其特征在于,所述匹配信息包括下列中的任 意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  43. 根据权利要求39-42任一项所述的方法,其特征在于,所述方法还包括:
    解析所述码流,以得到X组边信息差值,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值;
    所述根据所述匹配信息,获得所述X个第一点云块的边信息,包括:
    根据所述匹配信息,确定所述X个参考点云块;
    根据所述X组边信息差值和所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
  44. 根据权利要求39-43任一项所述的方法,其特征在于,
    所述方法还包括:解析所述码流,以得到所述X;
    或者,
    所述方法还包括:根据所述M确定第四编码比特数;采用所述第四编码比特数解析所述码流以获得所述X。
  45. 一种解码方法,其特征在于,包括:
    解析码流,以获得第二标识信息;
    若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z,Z≥1,Y和Z均为正整数。
  46. 根据权利要求45所述的方法,其特征在于,还包括:
    若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  47. 根据权利要求45或46所述的方法,其特征在于,还包括:
    若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数, M表示当前帧的第一点云块的个数。
  48. 一种解码方法,其特征在于,包括:
    解析码流,以获得第二标识信息;
    若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为当前帧中除X个第一点云块之外的Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述当前帧中所述X个第一点云块的第k种边信息的最大值Bk所需比特数之间的差值;
    根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数;
    采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,k=1,…,Z,Z≥1,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  49. 根据权利要求48所述的方法,其特征在于,还包括:
    若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  50. 根据权利要求48或49所述的方法,其特征在于,还包括:
    若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
  51. 一种点云数据的编码装置,其特征在于,包括:
    确定模块,用于在当前帧的M个第一点云块中确定X个第一点云块;所述X个第一点云块与X个参考点云块存在匹配关系,所述X个参考点云块包含在所述当前帧的参考帧中;其中,X小于或者等于M,且X和M均为正整数;
    获取模块,用于获取所述X个第一点云块的边信息和所述X个参考点云块的边信息;
    编码模块,用于根据所述X个第一点云块的边信息和所述X个参考点云块的边信息得到X组边信息差值,将所述X组边信息差值编码入码流。
  52. 根据权利要求51所述的编码装置,其特征在于,若X<M,所述获取模块还用于:
    获取所述M个第一点云块中剩余的Y个第一点云块的至少一种边信息,Y=M-X,Y为正整数;
    针对每种边信息,获取所述Y个第一点云块的该种边信息的最大值A;
    所述编码模块还用于:
    根据所述最大值A确定所述Y个第一点云块的该种边信息对应的第一编码比特数;
    将所述第一编码比特数编码入所述码流中;
    采用所述第一编码比特数将所述Y个第一点云块的该种边信息编码入所述码流中。
  53. 根据权利要求51所述的编码装置,其特征在于,若X<M,且所述边信息为Z种,Z≥1,所述获取模块还用于:
    获取所述M个第一点云块中剩余的Y个第一点云块的Z种边信息,Y=M-X,Y为正整数;
    获取所述X个第一点云块的第k种边信息的最大值Bk和所述Y个第一点云块的第k种边信息的最大值Ak,k=1,…,Z;
    所述编码模块还用于:
    若所述最大值Bk大于或者等于所述最大值Ak,或者,所述最大值Bk所需比特数大于或者等于所述最大值Ak所需比特数,则确定第一标识信息中与所述第k种边信息对应的比特位为第一符号;
    若所述最大值Bk小于所述最大值Ak,或者,所述最大值Bk所需比特数小于所述最大值Ak所需比特数,则确定所述第一标识信息中与所述第k种边信息对应的比特位为第二符号。
  54. 根据权利要求53所述的编码装置,其特征在于,所述编码模块还用于:
    若所述第一标识信息中每个比特位均为所述第一符号,则确定第二标识信息为第三符号,并将所述第二标识信息编码入所述码流中;
    根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息进行编码入所述码流中,k=1,…,Z。
  55. 根据权利要求53或54所述的编码装置,其特征在于,所述编码模块还用于:
    若所述第一标识信息中至少一个比特位为所述第二符号,则确定第二标识信息为第四符号,将所述第一标识信息和所述第二标识信息编码入所述码流中;
    若所述第一标识信息中与第k种边信息对应的比特位为所述第一符号,则根据所述最大值Bk确定所述Y个第一点云块的第k种边信息对应的第二编码比特数,并采用所述第二编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z;或者,
    若第一标识信息中与第k种边信息对应的比特位为所述第二符号,则根据所述最大值Ak确定所述Y个第一点云块的第k种边信息对应的第三编码比特数,将所述第三编码比特数编码入所述码流中,并采用所述第三编码比特数将所述Y个第一点云块的第k种边信息编码入所述码流中,k=1,…,Z。
  56. 根据权利要求55所述的编码装置,其特征在于,所述编码模块具体用于:
    将所述第三编码比特数与所述最大值Bk所需比特数之间的差值编码入所述码流中。
  57. 根据权利要求51-56任一项所述的编码装置,其特征在于,所述编码模块具体用 于:
    分别将所述X个第一点云块的边信息和与所述X个第一点云块对应匹配的X个参考点云块的边信息之间的差值确定为所述X组边信息差值。
  58. 根据权利要求51-57任一项所述的编码装置,其特征在于,所述获取模块还用于:
    获取匹配信息,所述匹配信息用于指示所述X个第一点云块与所述X个参考点云块之间的匹配关系;
    所述编码模块还用于,将所述匹配信息编码入所述码流中。
  59. 根据权利要求58所述的编码装置,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  60. 根据权利要求58所述的编码装置,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  61. 根据权利要求51-56任一项所述的编码装置,其特征在于,所述编码模块具体用于:
    按照所述X个第一点云块在所述当前帧中的排列顺序和所述X个参考点云块在所述参考帧中的排列顺序,将所述X个第一个点云块中第k个第一点云块的边信息与所述X个参考点云块中第k个参考点云块的边信息之间的差值,确定为所述X组边信息差值中的第k组边信息差值,k=1,…,X。
  62. 根据权利要求51-61任一项所述的编码装置,其特征在于,所述编码模块还用于:
    根据所述M确定第四编码比特数;
    采用所述第四编码比特数将所述X编码入所述码流中。
  63. 根据权利要求51-62任一项所述的编码装置,其特征在于,所述边信息差值包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的 Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
  64. 根据权利要求51-62任一项所述的编码装置,其特征在于,所述边信息包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
    所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
    所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
  65. 根据权利要求51-64任一项所述的编码装置,其特征在于,所述当前帧的参考帧包括所述当前帧的前一帧,或者,所述当前帧的后一帧。
  66. 一种点云数据的解码装置,其特征在于,包括:
    解码模块,用于解析码流,以获得X组边信息差值;其中,X表示当前帧中与参考点云块匹配的第一点云块的个数,X小于或者等于M,M表示当前帧中的第一点云块的个数,且X和M均为正整数;
    获取模块,用于获取X个参考点云块的边信息;所述参考点云块包含在所述当前帧的参考帧中;
    所述解码模块还用于,根据所述X组边信息差值和所述X个参考点云块的边信息获得所述当前帧中的X个第一点云块的边信息。
  67. 根据权利要求66所述的解码装置,其特征在于,若X<M,所述解码模块还用于:
    解析所述码流,以获得至少一个第一编码比特数;每个所述第一编码比特数为用于编码Y个第一点云块的至少一种边信息中与该第一编码比特数对应的一种边信息的最大值A 所需要的比特数,Y=M-X,Y为正整数;
    采用所述至少一个第一编码比特数从所述码流中获得所述Y个第一点云块的至少一种边信息。
  68. 根据权利要求66所述的解码装置,其特征在于,若X<M,且所述边信息为Z种,Z≥1,所述解码模块还用于:
    从所述码流中获得第二标识信息;
    若所述第二标识信息为第三符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,k=1,…,Z,Y=M-X,Y为正整数。
  69. 根据权利要求68所述的解码装置,其特征在于,所述解码模块还用于:
    若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
    若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,k=1,…,Z。
  70. 根据权利要求69所述的解码装置,其特征在于,所述解码模块还用于:
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z。
  71. 根据权利要求69所述的解码装置,其特征在于,所述解码模块还用于:
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为所述Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述最大值Bk所需比特数之间的差值,k=1,…,Z;
    根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z;
    采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息。
  72. 根据权利要求66-71任一项所述的解码装置,其特征在于,所述解码模块还用于:
    解析所述码流,以获得匹配信息;所述匹配信息用于指示所述X个第一点云块与所述X个参考点云块之间的匹配关系;
    所述获取模块具体用于:
    根据所述匹配信息,确定与X个第一点云块匹配对应的所述X个参考点云块;
    获得所述X个参考点云块的边信息。
  73. 根据权利要求72所述的解码装置,其特征在于,所述匹配信息包括下列中的任 意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  74. 根据权利要求72所述的解码装置,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  75. 根据权利要求66-74任一项所述的解码装置,其特征在于,所述解码模块还用于:
    根据所述M确定第四编码比特数;
    采用所述第四编码比特数解析所述码流以获得所述X。
  76. 根据权利要求66-75任一项所述的解码装置,其特征在于,所述边信息差值包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影方向在占用图中的X坐标最小值之间的差值,和
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值。
  77. 根据权利要求66-75任一项所述的解码装置,其特征在于,所述边信息包括下列中的至少一种:
    所述第一点云块在三维坐标系中的X坐标最小值与所述参考点云块在三维坐标系中的X坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Y坐标最小值与所述参考点云块在三维坐标系中的Y坐标最小值之间的差值,
    所述第一点云块在三维坐标系中的Z坐标最小值与所述参考点云块在三维坐标系中的Z坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的X坐标最小值与所述参考点云块根据投影 方向在占用图中的X坐标最小值之间的差值,
    所述第一点云块根据投影方向在占用图中的Y坐标最小值与所述参考点云块根据投影方向在占用图中的Y坐标最小值之间的差值,
    所述第一点云块在占用图中的高度与所述参考点云块在占用图中的高度之间的差值,和
    所述第一点云块在占用图中的宽度与所述参考点云块在占用图中的宽度之间的差值。
  78. 一种确定点云块之间匹配关系的装置,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序指令;
    所述处理器,用于:
    获取当前帧中的M个第一点云块以及所述当前帧的参考帧中的N个参考点云块;M和N均为正整数;
    根据所述M个第一点云块与所述N个参考点云块,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系;X小于或者等于M。
  79. 根据权利要求78所述的装置,其特征在于,所述处理器具体用于:
    根据所述M个第一点云块与所述N个参考点云块,获得所述M个第一点云块与所述N个参考点云块之间的关联值;
    根据所述M个第一点云块与所述N个参考点云块之间的关联值,确定X个所述第一点云块与X个所述参考点云块之间的匹配关系。
  80. 根据权利要求79所述的装置,其特征在于,所述处理器具体用于:
    对于所述N个参考点云块中的第i个参考点云块,i=1,…,N,获取所述第i个参考点云块与j个尚未匹配的第一点云块之间的关联值,并在j个关联值中确定出关联值最大的Qik;其中,所述j个尚未匹配的第一点云块包括:在所述当前帧中的M个第一点云块中与所述第i个参考点云块之前的i-1个参考点云块均不匹配,且投影方向与所述第i个参考点云块的投影方向相同的第一点云块;j小于或等于M,k小于或等于j,j、k和M均为正整数;
    若所述Qik大于预设阈值,则确定所述Qik对应的第k个第一点云块与所述第i个参考点云块匹配,其中,所述第k个第一点云块为所述j个尚未匹配的第一点云块中的一个。
  81. 根据权利要求79所述的装置,其特征在于,所述关联值为第一参考值与第二参考值的商;
    所述第一参考值为第一占用矩阵和第二占用矩阵的交集区域的面积,所述第二参考值为所述第一占用矩阵和所述第二占用矩阵的并集区域的面积;或者,
    所述第一参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的交集区域中包含的像素点个数,所述第二参考值为所述第一占用矩阵的有效区域和所述第二占用矩阵的有效区域的并集区域中包含的像素点个数;
    其中,所述第一占用矩阵的有效区域为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域,所述第二占用矩阵的有效区域为第i个第二点云块根据投影方向在 所述二维平面投影后实际占用的区域,所述第一占用矩阵为第j个第一点云块根据投影方向在二维平面投影后实际占用的区域对应的矩阵区域,所述第二占用矩阵为第i个第二点云块根据投影方向在所述二维平面投影后实际占用的区域对应的矩阵区域。
  82. 根据权利要求78所述的装置,其特征在于,所述处理器具体用于:
    按照所述N个参考点云块在所述参考帧中的排列顺序和所述M个第一点云块在所述当前帧中的排列顺序,确定X个第一点云块分别与所述X个参考点云块匹配。
  83. 根据权利要求78-82任一项所述的装置,其特征在于,所述处理器还用于:
    将所述当前帧中的所述X个第一点云块,按照与所述X个参考点云块的匹配顺序排序;
    将所述当前帧中除所述X个第一点云块之外的至少一个第一点云块,分别排列在所述X个第一点云块的后面。
  84. 一种编码装置,其特征在于,包括:
    获取模块,用于获取匹配信息,所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X个参考点云块包含在当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M为当前帧中的第一点云块的个数;
    编码模块,用于将所述匹配信息编入码流。
  85. 根据权利要求84所述的装置,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值,所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  86. 根据权利要求84所述的装置,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  87. 根据权利要求84-86任一项所述的装置,其特征在于,所述编码模块还用于:
    将X组边信息差值编码入所述码流,其中,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值。
  88. 根据权利要求84-87任一项所述的装置,其特征在于,
    所述编码模块还用于:将所述X编码入所述码流中;
    或者,
    所述编码模块还用于:根据所述M确定第四编码比特数;采用所述第四编码比特数将所述X编码入所述码流中。
  89. 一种解码装置,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序指令;
    所述处理器,用于:
    解析码流,以获得匹配信息;所述匹配信息用于指示X个第一点云块与X个参考点云块之间的匹配关系,所述X表示当前帧中与参考点云块匹配的第一点云块的个数,所述参考点云块包含在所述当前帧的参考帧中,X小于或者等于M,且X和M均为正整数,M表示所述当前帧中的第一点云块的数量;
    根据所述匹配信息,获得所述X个第一点云块的边信息。
  90. 根据权利要求89所述的装置,其特征在于,所述处理器具体用于:
    根据所述匹配信息,确定所述X个参考点云块;
    根据所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
  91. 根据权利要求89或90所述的装置,其特征在于,所述匹配信息包括下列中的任意一种:
    与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  92. 根据权利要求89或90所述的装置,其特征在于,所述匹配信息包括下列中的任意一种:
    所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值;
    所述X个第一点云块的索引值和与所述X个第一点云块分别对应的X个索引差值;所述X个索引差值为所述X个第一点云块的索引值和与所述X个第一点云块对应匹配的X个参考点云块的索引值之间的差值。
  93. 根据权利要求89-92任一项所述的装置,其特征在于,所述处理器还用于:
    解析所述码流,以得到X组边信息差值,所述X组边信息差值分别表示所述X个第一点云块的边信息和所述X个参考点云块的边信息之间的差值;
    所述处理器具体用于:
    根据所述匹配信息,确定所述X个参考点云块;
    根据所述X组边信息差值和所述X个参考点云块的边信息,获得所述X个第一点云块的边信息。
  94. 根据权利要求89-93任一项所述的装置,其特征在于,
    所述处理器还用于:解析所述码流,以得到所述X;
    或者,
    所述处理器还用于:根据所述M确定第四编码比特数;采用所述第四编码比特数解析所述码流以获得所述X。
  95. 一种解码装置,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序指令;
    所述处理器,用于:
    解析码流,以获得第二标识信息;
    若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得第三编码比特数,采用所述第三编码比特数从所述码流中获得Y个第一点云块的第k种边信息,所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数,k=1,…,Z,Z≥1,Y和Z均为正整数。
  96. 根据权利要求95所述的装置,其特征在于,所述处理器还用于:
    若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  97. 根据权利要求95或96所述的装置,其特征在于,所述处理器还用于:
    若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  98. 一种解码装置,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序指令;
    所述处理器,用于:
    解析码流,以获得第二标识信息;
    若所述第二标识信息为第四符号,则从所述码流中获得第一标识信息;
    若所述第一标识信息中与第k种边信息对应的比特位为第二符号,则从所述码流中获得差值;所述差值为当前帧中除X个第一点云块之外的Y个第一点云块的第k种边信息的最大值Ak所需比特数与所述当前帧中所述X个第一点云块的第k种边信息的最大值Bk所需比特数之间的差值;
    根据所述差值和所述最大值Bk所需比特数获得第三编码比特数;所述第三编码比特数为用于编码所述Y个第一点云块的第k种边信息的最大值Ak所需要的比特数;
    采用所述第三编码比特数从所述码流中获得所述Y个第一点云块的第k种边信息,k=1,…,Z,Z≥1,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  99. 根据权利要求98所述的装置,其特征在于,所述处理器还用于:
    若所述第二标识信息为第三符号,则根据当前帧中X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得所述当前帧中除所述X个第一点云块之外的所述Y个第一点云块的第k种边信息,Y=M-X,X、Y和M均为正整数,M表示当前帧的第一点云块的个数。
  100. 根据权利要求98或99所述的装置,其特征在于,所述处理器还用于:
    若所述第一标识信息中与第k种边信息对应的比特位为第一符号,则根据所述X个第一点云块的第k种边信息的最大值Bk确定第二编码比特数,采用所述第二编码比特数从所述码流中获得Y个第一点云块的第k种边信息。
PCT/CN2018/112215 2018-01-17 2018-10-26 编码方法、解码方法和装置 WO2019140973A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
KR1020207023576A KR102376114B1 (ko) 2018-01-17 2018-10-26 인코딩 방법, 디코딩 방법, 및 디바이스
JP2020539840A JP7127137B2 (ja) 2018-01-17 2018-10-26 符号化方法、復号方法、および装置
BR112020014511-4A BR112020014511A2 (pt) 2018-01-17 2018-10-26 Método de codificação, método de decodificação, e aparelho
CN201880002217.2A CN110278719B (zh) 2018-01-17 2018-10-26 编码方法、解码方法和装置
EP18901744.5A EP3737100A4 (en) 2018-01-17 2018-10-26 CODING PROCESS, DECODING PROCESS, AND DEVICE
US16/930,655 US11388446B2 (en) 2018-01-17 2020-07-16 Encoding method, decoding method, and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810045808.XA CN110049323B (zh) 2018-01-17 2018-01-17 编码方法、解码方法和装置
CN201810045808.X 2018-01-17

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/930,655 Continuation US11388446B2 (en) 2018-01-17 2020-07-16 Encoding method, decoding method, and apparatus

Publications (1)

Publication Number Publication Date
WO2019140973A1 true WO2019140973A1 (zh) 2019-07-25

Family

ID=67273545

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/112215 WO2019140973A1 (zh) 2018-01-17 2018-10-26 编码方法、解码方法和装置

Country Status (7)

Country Link
US (1) US11388446B2 (zh)
EP (1) EP3737100A4 (zh)
JP (1) JP7127137B2 (zh)
KR (1) KR102376114B1 (zh)
CN (2) CN110049323B (zh)
BR (1) BR112020014511A2 (zh)
WO (1) WO2019140973A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021165566A1 (en) * 2020-02-19 2021-08-26 Nokia Technologies Oy An apparatus, a method and a computer program for volumetric video

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11310518B2 (en) * 2018-04-11 2022-04-19 Sony Corporation Image processing apparatus and method
CN110944187B (zh) 2018-09-19 2022-05-10 华为技术有限公司 点云编码方法和编码器
CN110971912B (zh) 2018-09-30 2022-04-29 华为技术有限公司 点云编解码方法、编解码器、编解码装置和存储介质
CN114915791B (zh) * 2021-02-08 2023-10-20 荣耀终端有限公司 基于二维规则化平面投影的点云序列编解码方法及装置
EP4152264A1 (en) * 2021-09-17 2023-03-22 Beijing Xiaomi Mobile Software Co., Ltd. Method and apparatus of encoding/decoding point cloud geometry data sensed by at least one sensor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110205338A1 (en) * 2010-02-24 2011-08-25 Samsung Electronics Co., Ltd. Apparatus for estimating position of mobile robot and method thereof
US20160253807A1 (en) * 2015-02-26 2016-09-01 Mitsubishi Electric Research Laboratories, Inc. Method and System for Determining 3D Object Poses and Landmark Points using Surface Patches
CN107240129A (zh) * 2017-05-10 2017-10-10 同济大学 基于rgb‑d相机数据的物体及室内小场景恢复与建模方法
US20170347120A1 (en) * 2016-05-28 2017-11-30 Microsoft Technology Licensing, Llc Motion-compensated compression of dynamic voxelized point clouds

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7689051B2 (en) 2004-04-15 2010-03-30 Microsoft Corporation Predictive lossless coding of images and video
JP2012068881A (ja) 2010-09-22 2012-04-05 Univ Of Tokyo 3次元動画像の圧縮に用いる基本単位及び当該基本単位の生成方法、当該基本単位を用いた3次元動画像の圧縮方法
US10484697B2 (en) 2014-09-09 2019-11-19 Qualcomm Incorporated Simultaneous localization and mapping for video coding
US10694210B2 (en) * 2016-05-28 2020-06-23 Microsoft Technology Licensing, Llc Scalable point cloud compression with transform, and corresponding decompression
CN107230225B (zh) * 2017-04-25 2020-06-09 华为技术有限公司 三维重建的方法和装置
CN107481315A (zh) * 2017-06-29 2017-12-15 重庆邮电大学 一种基于Harris‑SIFT‑BRIEF算法的单目视觉三维环境重建方法
CN107403456B (zh) * 2017-07-28 2019-06-18 北京大学深圳研究生院 一种基于kd树和优化图变换的点云属性压缩方法
US10535161B2 (en) * 2017-11-09 2020-01-14 Samsung Electronics Co., Ltd. Point cloud compression using non-orthogonal projection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110205338A1 (en) * 2010-02-24 2011-08-25 Samsung Electronics Co., Ltd. Apparatus for estimating position of mobile robot and method thereof
US20160253807A1 (en) * 2015-02-26 2016-09-01 Mitsubishi Electric Research Laboratories, Inc. Method and System for Determining 3D Object Poses and Landmark Points using Surface Patches
US20170347120A1 (en) * 2016-05-28 2017-11-30 Microsoft Technology Licensing, Llc Motion-compensated compression of dynamic voxelized point clouds
CN107240129A (zh) * 2017-05-10 2017-10-10 同济大学 基于rgb‑d相机数据的物体及室内小场景恢复与建模方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3737100A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021165566A1 (en) * 2020-02-19 2021-08-26 Nokia Technologies Oy An apparatus, a method and a computer program for volumetric video

Also Published As

Publication number Publication date
EP3737100A1 (en) 2020-11-11
US11388446B2 (en) 2022-07-12
KR102376114B1 (ko) 2022-03-18
EP3737100A4 (en) 2020-12-30
KR20200108465A (ko) 2020-09-18
CN110049323A (zh) 2019-07-23
CN110278719B (zh) 2021-11-19
US20200351522A1 (en) 2020-11-05
CN110049323B (zh) 2021-09-07
BR112020014511A2 (pt) 2020-12-08
CN110278719A (zh) 2019-09-24
JP7127137B2 (ja) 2022-08-29
JP2021510987A (ja) 2021-04-30

Similar Documents

Publication Publication Date Title
WO2019140973A1 (zh) 编码方法、解码方法和装置
US20150379682A1 (en) Vertex attribute data compression with random access using hardware
CN101841730A (zh) 一种基于fpga的实时立体视觉实现方法
WO2010135082A1 (en) Localized weak bit assignment
CN101667843B (zh) 嵌入式系统的数据压缩、及解压缩方法与装置
US8098247B2 (en) Systems and methods for geometric data compression and encryption
US20230048381A1 (en) Context determination for planar mode in octree-based point cloud coding
CN110648348A (zh) 基于neqr表达的量子图像分割方法
WO2022217866A1 (zh) 信道编码中的数据处理方法、计算机设备及存储介质
US9898834B2 (en) Method and apparatus for generating a bitstream of repetitive structure discovery based 3D model compression
US20230086264A1 (en) Decoding method, encoding method, decoder, and encoder based on point cloud attribute prediction
US6771273B2 (en) Image display apparatus
CN103746702A (zh) 数据的无损压缩方法与装置
US20160079996A1 (en) Compression ratio for a compression engine
US20210082082A1 (en) Data processing method and processing circuit
Tan et al. Resource minimization in a real-time depth-map processing system on FPGA
CN111327905B (zh) 基于fpga实现相似图像压缩的预处理方法及系统
CN111047656A (zh) 一种动态参考点深度偏移z值压缩算法
CN117493386B (zh) 数据库访问方法及装置、存储介质和电子设备
WO2023169007A1 (zh) 点云预测处理方法、装置、计算机、存储介质
WO2021138785A1 (zh) 划分方法、编码器、解码器及计算机存储介质
WO2023133710A1 (zh) 编码方法、解码方法、编码器、解码器和编解码系统
Ergude et al. A study and implementation of the Huffman algorithm based on condensed Huffman table
CN116991910A (zh) 数据处理装置的控制方法与装置
TWI401614B (zh) 資料轉換方法及資料轉換裝置

Legal Events

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

Ref document number: 18901744

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020539840

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20207023576

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2018901744

Country of ref document: EP

Effective date: 20200806

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112020014511

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 112020014511

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20200716