Movatterモバイル変換


[0]ホーム

URL:


CN118743218A - Coding and decoding method, code stream, encoder, decoder and storage medium - Google Patents

Coding and decoding method, code stream, encoder, decoder and storage medium
Download PDF

Info

Publication number
CN118743218A
CN118743218ACN202280092172.9ACN202280092172ACN118743218ACN 118743218 ACN118743218 ACN 118743218ACN 202280092172 ACN202280092172 ACN 202280092172ACN 118743218 ACN118743218 ACN 118743218A
Authority
CN
China
Prior art keywords
current node
node
nodes
reference set
distance values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202280092172.9A
Other languages
Chinese (zh)
Other versions
CN118743218B (en
Inventor
魏红莲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN118743218ApublicationCriticalpatent/CN118743218A/en
Application grantedgrantedCritical
Publication of CN118743218BpublicationCriticalpatent/CN118743218B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例公开了一种编解码方法、码流、编码器、解码器以及存储介质,应用于解码器,该方法包括:确定当前节点对应的索引序号以及初始参考集合(S701);基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置(S702);根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合(S703)。这样,基于索引序号的奇偶特性构建包括当前节点在内的目标参考集合,利用该目标参考集合能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。

The embodiment of the present application discloses a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which are applied to a decoder. The method includes: determining the index number and the initial reference set corresponding to the current node (S701); determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number (S702); after decoding the current node according to the initial reference set, placing the current node at the target position to obtain a target reference set (S703). In this way, a target reference set including the current node is constructed based on the parity characteristic of the index number, and the target reference set can be used to improve the prediction accuracy of point cloud attributes and improve the coding and decoding performance of point cloud attributes.

Description

Translated fromChinese
编解码方法、码流、编码器、解码器以及存储介质Coding and decoding method, code stream, encoder, decoder and storage medium技术领域Technical Field

本申请实施例涉及点云压缩技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。The embodiments of the present application relate to the field of point cloud compression technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium.

背景技术Background Art

在基于音视频编码标准提供的点云压缩(Audio Video Standard-Point Cloud Compression,AVS-PCC)编解码框架中,点云的几何信息和属性信息是分开进行编码的。几何编码完成后,对几何信息进行重建,而属性信息的编码将依赖于重建的几何信息。其中,属性信息编码主要针对颜色信息的编码,将其转变成更符合人眼视觉特性的YUV色彩空间,然后对预处理后属性信息进行属性编码,最终生成二进制的属性码流。In the point cloud compression (AVS-PCC) codec framework based on the audio and video coding standard, the geometric information and attribute information of the point cloud are encoded separately. After the geometric encoding is completed, the geometric information is reconstructed, and the encoding of the attribute information will depend on the reconstructed geometric information. Among them, the attribute information encoding is mainly aimed at the encoding of color information, which is converted into a YUV color space that is more in line with the visual characteristics of the human eye, and then the attribute information after preprocessing is attribute encoded to finally generate a binary attribute code stream.

目前,点云压缩参考平台(Point Cloud Reference Model,PCRM)在属性编码过程中,主要是利用全局搜索方式或者空间关系搜索方式来实现对当前节点的属性预测。然而,已有的全局搜索方式和空间关系搜索方式均存在一些缺陷,导致用于确定预测节点的参考范围构建不准确,降低了属性预测的准确性。At present, the Point Cloud Reference Model (PCRM) mainly uses global search or spatial relationship search to predict the attributes of the current node during attribute encoding. However, the existing global search and spatial relationship search methods have some defects, which lead to inaccurate reference range construction for determining the predicted node, reducing the accuracy of attribute prediction.

发明内容Summary of the invention

本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。The embodiments of the present application provide a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium, which can improve the prediction accuracy of point cloud attributes and improve the coding and decoding performance of point cloud attributes.

本申请实施例的技术方案可以如下实现:The technical solution of the embodiment of the present application can be implemented as follows:

第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:

确定当前节点对应的索引序号以及初始参考集合;Determine the index number corresponding to the current node and the initial reference set;

基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;Based on the even-odd property of the index number, determine the target position corresponding to the current node in the initial reference set;

根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:In a second aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:

确定当前节点对应的索引序号以及初始参考集合;Determine the index number corresponding to the current node and the initial reference set;

基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;Based on the even-odd property of the index number, determine the target position corresponding to the current node in the initial reference set;

根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息至少包括:当前节点对应的属性残差值。In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least: an attribute residual value corresponding to the current node.

第四方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元和编码单元;其中,In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first determining unit and an encoding unit; wherein,

第一确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;A first determining unit is configured to determine an index number and an initial reference set corresponding to the current node; and determine a target position corresponding to the current node in the initial reference set based on an even-odd characteristic of the index number;

编码单元,配置为根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。The encoding unit is configured to place the current node at a target position after encoding the current node according to the initial reference set to obtain a target reference set.

第五方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein:

第一存储器,用于存储能够在第一处理器上运行的计算机程序;A first memory, for storing a computer program that can be run on the first processor;

第一处理器,用于在运行计算机程序时,执行如第二方面的方法。The first processor is used to execute the method of the second aspect when running a computer program.

第六方面,本申请实施例提供了一种解码器,该解码器包括第二确定单元和解码单元;其中,In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second determining unit and a decoding unit; wherein,

第二确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;A second determining unit is configured to determine an index number and an initial reference set corresponding to the current node; and determine a target position corresponding to the current node in the initial reference set based on an even-odd characteristic of the index number;

解码单元,配置为根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。The decoding unit is configured to place the current node at a target position after decoding the current node according to the initial reference set to obtain a target reference set.

第七方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:

第二存储器,用于存储能够在第二处理器上运行的计算机程序;A second memory for storing a computer program that can be run on a second processor;

第二处理器,用于在运行计算机程序时,执行如第一方面的方法。The second processor is used to execute the method of the first aspect when running the computer program.

第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,计算机程序被执行时实现如第一方面的方法、或者实现如第二方面的方法。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method of the first aspect, or implements the method of the second aspect.

本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在编码端,确定当前节点对应的索引序号以及初始参考集合;基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。在解码端,确定当前节点对应的索引序号以及初始参考集合;基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,基于索引序号的奇偶特性构建包括当前节点在内的目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. At the coding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after encoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set. At the decoding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after decoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set. In this way, a target reference set including the current node is constructed based on the parity characteristics of the index number, and the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the coding and decoding performance of the point cloud attributes.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1A为本申请实施例提供的一种三维点云图像示意图;FIG1A is a schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;

图1B为本申请实施例提供的一种三维点云图像的局部放大示意图;FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;

图2A为本申请实施例提供的一种不同观看角度下的点云图像示意图;FIG2A is a schematic diagram of a point cloud image at different viewing angles provided in an embodiment of the present application;

图2B为本申请实施例提供的一种图2A对应的数据存储格式示意图;FIG2B is a schematic diagram of a data storage format corresponding to FIG2A provided in an embodiment of the present application;

图3为本申请实施例提供的一种点云编解码的网络架构示意图;FIG3 is a schematic diagram of a network architecture of point cloud encoding and decoding provided in an embodiment of the present application;

图4为本申请实施例提供的一种点云编码器的组成结构示意图;FIG4 is a schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application;

图5为本申请实施例提供的一种点云解码器的组成结构示意图;FIG5 is a schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application;

图6A为本申请实施例提供的一种当前节点与共面节点的分布示意图;FIG6A is a schematic diagram of the distribution of a current node and coplanar nodes provided in an embodiment of the present application;

图6B为本申请实施例提供的一种当前节点与共线节点的分布示意图;FIG6B is a schematic diagram of the distribution of a current node and collinear nodes provided in an embodiment of the present application;

图6C为本申请实施例提供的一种当前节点与共点节点的分布示意图;FIG6C is a schematic diagram of the distribution of a current node and co-point nodes provided in an embodiment of the present application;

图7为本申请实施例提供的一种解码方法的流程示意图;FIG7 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

图8A~图8H为本申请实施例提供的一种当前节点方位对应的八种模式示意图;8A to 8H are schematic diagrams of eight modes corresponding to a current node orientation provided in an embodiment of the present application;

图9A~图9H为本申请实施例提供的一种当前节点在八种模式下对应的共面、共线、共点邻居块的分布示意图;9A to 9H are schematic diagrams of distribution of coplanar, colinear, and co-point neighbor blocks corresponding to a current node in eight modes provided by an embodiment of the present application;

图10为本申请实施例提供的一种编码方法的流程示意图;FIG10 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

图11为本申请实施例提供的一种参考范围确定的流程示意图;FIG11 is a schematic diagram of a process for determining a reference range provided in an embodiment of the present application;

图12为本申请实施例提供的一种编码器的组成结构示意图;FIG12 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

图13为本申请实施例提供的一种编码器的具体硬件结构示意图;FIG13 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

图14为本申请实施例提供的一种解码器的组成结构示意图;FIG14 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;

图15为本申请实施例提供的一种解码器的具体硬件结构示意图。FIG15 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

点云(Point Cloud)是物体表面的三维表现形式,通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云(数据)。Point Cloud is a three-dimensional representation of the surface of an object. Point Cloud (data) on the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.

点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集,图1A展示了三维点云图像和图1B展示了三维点云图像的局部放大图,可以看到点云表面是由分布稠密的点所组成的。A point cloud is a set of discrete points that are irregularly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene. FIG1A shows a three-dimensional point cloud image and FIG1B shows a partial magnified view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.

二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地 表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色信息以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。因此,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息(x,y,z)。点的位置信息也可称为点的几何信息。例如,点的属性信息可以包括颜色信息(三维颜色信息)和/或反射率(一维反射率信息r)等等。例如,颜色信息可以是任意一种色彩空间上的信息。例如,颜色信息可以是RGB信息。其中,R表示红色(Red,R),G表示绿色(Green,G),B表示蓝色(Blue,B)。再如,颜色信息可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色色差。Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information additionally; however, the distribution of points in point clouds in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space in order to fully express a point cloud. Similar to two-dimensional images, each position in the acquisition process has corresponding attribute information, usually RGB color values, and the color value reflects the color of the object; for point clouds, in addition to color information, the attribute information corresponding to each point is also commonly the reflectance value, which reflects the surface material of the object. Therefore, the points in the point cloud can include the location information of the point and the attribute information of the point. For example, the location information of the point can be the three-dimensional coordinate information (x, y, z) of the point. The location information of the point can also be called the geometric information of the point. For example, the attribute information of the point can include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r), etc. For example, the color information can be information on any color space. For example, the color information can be RGB information. Among them, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B). For another example, the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.

根据激光测量原理得到的点云,点云中的点可以包括点的三维坐标信息和点的反射率值。再如,根据摄影测量原理得到的点云,点云中的点可以可包括点的三维坐标信息和点的三维颜色信息。再如,结合激光测量和摄影测量原理得到点云,点云中的点可以可包括点的三维坐标信息、点的反射率值和点的三维颜色信息。For a point cloud obtained according to the principle of laser measurement, the points in the point cloud may include the three-dimensional coordinate information of the points and the reflectivity value of the points. For another example, for a point cloud obtained according to the principle of photogrammetry, the points in the point cloud may include the three-dimensional coordinate information of the points and the three-dimensional color information of the points. For another example, a point cloud obtained by combining the principles of laser measurement and photogrammetry may include the three-dimensional coordinate information of the points, the reflectivity value of the points and the three-dimensional color information of the points.

如图2A和图2B所示为一幅点云图像及其对应的数据存储格式。其中,图2A提供了点云图像的六个观看角度,图2B由文件头信息部分和数据部分组成,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容。例如,点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维坐标信息(x,y,z)和三维颜色信息(r,g,b)。As shown in Figures 2A and 2B, a point cloud image and its corresponding data storage format are shown. Figure 2A provides six viewing angles of the point cloud image, and Figure 2B consists of a file header information part and a data part. The header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud. For example, the point cloud is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).

点云可以按获取的途径分为:Point clouds can be divided into the following categories according to the way they are obtained:

静态点云:即物体是静止的,获取点云的设备也是静止的;Static point cloud: the object is stationary, and the device that obtains the point cloud is also stationary;

动态点云:物体是运动的,但获取点云的设备是静止的;Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;

动态获取点云:获取点云的设备是运动的。Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.

例如,按点云的用途分为两大类:For example, point clouds can be divided into two categories according to their usage:

类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;Category 1: Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, disaster relief robots, etc.

类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。Category 2: Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.

点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.

点云的采集主要有以下途径:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。Point clouds can be collected mainly through the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc. Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second. These technologies reduce the cost and time cycle of point cloud data acquisition and improve the accuracy of data. The change in the way point cloud data is acquired makes it possible to acquire a large amount of point cloud data. With the growth of application demand, the processing of massive 3D point cloud data encounters bottlenecks in storage space and transmission bandwidth.

示例性地,以帧率为30帧每秒(fps)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,其中,1Byte为8bit,而YUV采样格式为4:2:0,帧率为24fps的1280×720二维视频,其10s的数据量约为1280×720×12bit×24fps×10s≈0.33GB,10s的两视角三维视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。For example, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, the number of points in each point cloud frame is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar). Then the data volume of a 10s point cloud video is about 0.7 million × (4Byte × 3 + 1Byte × 3) × 30fps × 10s = 3.15GB, where 1Byte is 8bit, and the YUV sampling format is 4:2:0. The 1280 × 720 two-dimensional video with a frame rate of 24fps has a data volume of about 1280 × 720 × 12bit × 24fps × 10s ≈ 0.33GB for 10s, and a two-view three-dimensional video of 10s has a data volume of about 0.33 × 2 = 0.66GB. It can be seen that the data volume of a point cloud video far exceeds that of a two-dimensional video and a three-dimensional video of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.

也就是说,由于点云是海量点的集合,存储点云不仅会消耗大量的内存,而且不利于传输,也没有这么大的带宽可以支持将点云不经过压缩直接在网络层进行传输,因此,需要对点云进行压缩。That is to say, since the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but also be inconvenient for transmission. There is also not enough bandwidth to support direct transmission of the point cloud at the network layer without compression. Therefore, the point cloud needs to be compressed.

目前,可对点云进行压缩的点云编码框架可以是运动图像专家组(Moving Picture Experts Group,MPEG)提供的基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC)编解码框架或基于视频的点云压缩(Video-based Point Cloud Compression,V-PCC)编解码框架,也可以是AVS提供的AVS-PCC编解码框架。G-PCC编解码框架可用于针对第一类静态点云和第三类动态获取点云进行压缩,V-PCC编解码框架可用于针对第二类动态点云进行压缩。G-PCC编解码框架也称为点云编解码器TMC13,V-PCC编解码框架也称为点云编解码器TMC2。At present, the point cloud coding framework that can compress point clouds can be the geometry-based Point Cloud Compression (G-PCC) codec framework or the video-based Point Cloud Compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC codec framework provided by AVS. The G-PCC codec framework can be used to compress the first type of static point clouds and the third type of dynamically acquired point clouds, and the V-PCC codec framework can be used to compress the second type of dynamic point clouds. The G-PCC codec framework is also called the point cloud codec TMC13, and the V-PCC codec framework is also called the point cloud codec TMC2.

本申请实施例提供了一种包含解码方法和编码方法的点云编解码系统的网络架构,图3为本申请实 施例提供的一种点云编解码的网络架构示意图。如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有点云编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。The embodiment of the present application provides a network architecture of a point cloud encoding and decoding system including a decoding method and an encoding method. FIG3 is a schematic diagram of a network architecture of a point cloud encoding and decoding provided by the embodiment of the present application. As shown in FIG3, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During the implementation process, the electronic device can be various types of devices with point cloud encoding and decoding functions. For example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which is not limited by the embodiment of the present application. Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.

其中,本申请实施例中的电子设备具有点云编解码功能,一般包括点云编码器(即编码器)和点云解码器(即解码器)。Among them, the electronic device in the embodiment of the present application has a point cloud encoding and decoding function, generally including a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).

下面以AVS-PCC编解码框架为例进行点云压缩技术的说明。The following uses the AVS-PCC encoding and decoding framework as an example to illustrate the point cloud compression technology.

可以理解,点云压缩一般采用点云几何信息和属性信息分别压缩的方式,在编码端,首先在几何编码器中编码点云几何信息,然后将重建几何信息作为附加信息输入到属性编码器中,辅助点云属性的压缩;在解码端,首先在几何解码器中解码点云几何信息,然后将解码后的几何信息作为附加信息输入到属性解码器中,辅助点云属性的压缩。整个编解码器由预处理/后处理、几何编码/解码、属性编码/解码几部分组成。It can be understood that point cloud compression generally adopts the method of compressing point cloud geometry information and attribute information separately. At the encoding end, the point cloud geometry information is first encoded in the geometry encoder, and then the reconstructed geometry information is input into the attribute encoder as additional information to assist in the compression of point cloud attributes; at the decoding end, the point cloud geometry information is first decoded in the geometry decoder, and then the decoded geometry information is input into the attribute decoder as additional information to assist in the compression of point cloud attributes. The entire codec consists of pre-processing/post-processing, geometry encoding/decoding, and attribute encoding/decoding.

本申请实施例提供一种点云编码器,如图4所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云编码器11包括几何编码器:坐标平移单元111、坐标量化单元112、八叉树构建单元113、几何熵编码器114、几何重建单元115。属性编码器:属性重上色单元116、颜色空间变换单元117、第一属性预测单元118、量化单元119和属性熵编码器1110。The embodiment of the present application provides a point cloud encoder, as shown in FIG4 , which is a framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud encoder 11 includes a geometry encoder: a coordinate translation unit 111, a coordinate quantization unit 112, an octree construction unit 113, a geometry entropy encoder 114, and a geometry reconstruction unit 115. An attribute encoder: an attribute recoloring unit 116, a color space conversion unit 117, a first attribute prediction unit 118, a quantization unit 119, and an attribute entropy encoder 1110.

对于PCRM,在编码端的几何编码部分,首先对原始几何信息进行预处理,通过坐标平移单元111将几何原点归一化到点云空间中的最小值位置,通过坐标量化单元112将几何信息从浮点数转化为整形,便于后续的规则化处理;然后对规则化的几何信息进行几何编码,在八叉树构建单元113中采用八叉树结构对点云空间进行递归划分,每次将当前节点划分成八个相同大小的子块,并判断每个子块的占有码字情况,当子块内不包含点时记为空,否则记为非空,在递归划分的最后一层记录所有块的占有码字信息,并进行几何编码;通过八叉树结构表达的几何信息一方面输入到几何熵编码器114中形成几何码流,另一方面在几何重建单元115进行几何重建处理,重建后的几何信息作为附加信息输入到属性编码器中。For PCRM, in the geometric coding part of the encoding end, the original geometric information is first preprocessed, and the geometric origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111, and the geometric information is converted from floating point numbers to integers through the coordinate quantization unit 112 to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the point cloud space is recursively divided using an octree structure in the octree construction unit 113, and the current node is divided into eight sub-blocks of the same size each time, and the occupation codeword of each sub-block is judged. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupation codeword information of all blocks is recorded in the last layer of the recursive division, and geometric encoding is performed; the geometric information expressed by the octree structure is input into the geometric entropy encoder 114 to form a geometric code stream on the one hand, and geometric reconstruction processing is performed in the geometric reconstruction unit 115 on the other hand, and the reconstructed geometric information is input into the attribute encoder as additional information.

在属性编码部分,首先对原始的属性信息进行预处理,由于几何信息在几何编码之后有所异动,因此,通过属性重上色单元116为几何编码后的每一个点重新分配属性值,实现属性重上色。此外,如果处理的属性信息为颜色信息,还需要将原始的颜色信息通过颜色空间变换单元117进行颜色空间变换,将其转变成更符合人眼视觉特性的YUV色彩空间;然后通过第一属性预测单元118对预处理后属性信息进行属性编码,属性编码首先需要将点云进行重排序,重排序的方式是莫顿码,因此属性编码的遍历顺序为莫顿顺序。PCRM中的属性预测方法为基于莫顿顺序的单点预测,即按照莫顿顺序从当前待编码点(当前节点)向前回溯一个点,找到的节点为当前待编码点的预测参考点,然后将预测参考点的属性重建值作为属性预测值,属性残差值为当前待编码点的属性原始值与属性预测值之间的差值;最后通过量化单元119对属性残差值进行量化,将量化后的残差信息输入到属性熵编码器1110中形成属性码流。In the attribute encoding part, the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute value is reallocated to each point after geometric encoding through the attribute recoloring unit 116 to achieve attribute recoloring. In addition, if the processed attribute information is color information, the original color information needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye through the color space conversion unit 117; then the preprocessed attribute information is attribute encoded through the first attribute prediction unit 118. Attribute encoding first requires the point cloud to be reordered, and the reordering method is Morton code, so the traversal order of attribute encoding is Morton order. The attribute prediction method in PCRM is a single-point prediction based on the Morton order, that is, trace back one point from the current point to be encoded (current node) according to the Morton order, and the node found is the prediction reference point of the current point to be encoded, and then the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.

本申请实施例还提供一种点云解码器,如图5所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云解码器12包括几何解编码器:几何熵解码器121、八叉树重建单元122、坐标反量化单元123、坐标反平移单元124。属性解码器:属性熵解码器125、反量化单元126、第二属性预测单元127和颜色空间反变换单元128。The embodiment of the present application also provides a point cloud decoder, as shown in FIG5 , which is a framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud decoder 12 includes a geometric decoder: a geometric entropy decoder 121, an octree reconstruction unit 122, a coordinate inverse quantization unit 123, and a coordinate inverse translation unit 124. An attribute decoder: an attribute entropy decoder 125, an inverse quantization unit 126, a second attribute prediction unit 127, and a color space inverse transformation unit 128.

在解码端,同样采用几何和属性分别解码的方式。在几何解码部分,首先通过几何熵解码器121对几何码流进行熵解码,得到每个节点的几何信息,然后按照和几何编码相同的方式通过八叉树重建单元122构建八叉树结构,结合解码几何重建出坐标变换后的、通过八叉树结构表达的几何信息,一方面将该信息通过坐标反量化单元123进行坐标反量化和通过坐标反平移单元124进行反平移,得到解码几何信息。另一方面作为附加信息输入到属性解码器中。在属性解码部分,按照与编码端相同的方式构建莫顿顺序,先通过属性熵解码器125对属性码流进行熵解码,得到量化后的残差信息;然后通过反量化单元126进行反量化,得到属性残差值;类似的,按照与属性编码相同的方式,通过第二属性预测单元127获得当前待解码点的属性预测值,然后将属性预测值与属性残差值相加,可以恢复出当前待解码点的属性重建值(例如,YUV属性值);最后,经过颜色空间反变换单元128的颜色空间反变换得到解码属性信息。At the decoding end, the same method of separately decoding geometry and attributes is adopted. In the geometry decoding part, the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometry information of each node, and then the octree structure is constructed by the octree reconstruction unit 122 in the same way as the geometry encoding. The geometry information expressed by the octree structure after coordinate transformation is reconstructed in combination with the decoded geometry. On the one hand, the information is dequantized by the coordinate dequantization unit 123 and detranslated by the coordinate detranslation unit 124 to obtain the decoded geometry information. On the other hand, it is input into the attribute decoder as additional information. In the attribute decoding part, the Morton order is constructed in the same way as the encoding end. The attribute code stream is first entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information; then, the inverse quantization unit 126 performs inverse quantization to obtain the attribute residual value; similarly, in the same way as the attribute encoding, the attribute prediction value of the current point to be decoded is obtained by the second attribute prediction unit 127, and then the attribute prediction value is added to the attribute residual value to restore the attribute reconstruction value (for example, YUV attribute value) of the current point to be decoded; finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.

还可以理解,对于AVS-PCC编解码框架而言,通用测试条件如下:It can also be understood that for the AVS-PCC codec framework, the general test conditions are as follows:

(1)测试条件共4种:(1) There are 4 test conditions:

条件1:几何位置有限度有损、属性有损;Condition 1: The geometric position is limitedly lossy and the attributes are lossy;

条件2:几何位置无损、属性有损;Condition 2: The geometric position is lossless, but the attributes are lossy;

条件3:几何位置无损、属性有限度有损;Condition 3: The geometric position is lossless, and the attributes are limitedly lossy;

条件4:几何位置无损、属性无损。Condition 4: The geometric position and attributes are lossless.

(2)通用测试序列包括Cat1A,Cat1B,Cat1C,Cat2-frame和Cat3共五类。其中,Cat1A、Cat2-frame点云只包含反射率属性信息,Cat1B、Cat3点云只包含颜色属性信息,Cat1C点云同时包含颜色和反射率属性信息。(2) The general test sequence includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point cloud contains both color and reflectivity attribute information.

(3)实施方式:共2种,以属性压缩所采用的算法进行区分。(3) Implementation methods: There are two types, differentiated by the algorithm used for attribute compression.

实施方式1:预测分支,属性压缩采用基于预测的方法;Implementation 1: Prediction branch, attribute compression adopts prediction-based method;

实施方式2:变换分支,属性压缩采用基于变换的方法,共包含两种变换算法:一种是小波变换算法,一种是k元离散余弦变换(Discrete Cosine Transform,DCT)变换算法。Implementation method 2: transformation branch, attribute compression adopts a transformation-based method, which includes two transformation algorithms: one is a wavelet transformation algorithm, and the other is a k-ary discrete cosine transform (DCT) transformation algorithm.

(4)对于点云压缩中的属性编码部分,具体是指帧内预测部分,这里主要参考当前节点的相邻节点对当前节点进行预测,根据属性预测值与当前节点的属性原始值计算属性残差值后经量化、变换等过程,将属性残差值传输到解码端;解码端在接收并解析码流后,经反变换与反量化等步骤得到属性残差值,解码端以相同过程预测得到属性预测值,将属性预测值与属性残差值叠加后得到当前节点对应的属性重建值。(4) The attribute coding part in point cloud compression specifically refers to the intra-frame prediction part. Here, the current node is predicted mainly with reference to the adjacent nodes of the current node. The attribute residual value is calculated based on the attribute prediction value and the original attribute value of the current node, and then the attribute residual value is transmitted to the decoding end after quantization and transformation. After receiving and parsing the bitstream, the decoding end obtains the attribute residual value through inverse transformation and inverse quantization. The decoding end predicts the attribute prediction value through the same process, and superimposes the attribute prediction value and the attribute residual value to obtain the attribute reconstruction value corresponding to the current node.

其中,在编码端和解码端均实施相同的操作来确定属性预测值,具体的属性预测过程主要包括以下两种:The same operation is performed at both the encoding end and the decoding end to determine the attribute prediction value. The specific attribute prediction process mainly includes the following two types:

第一种为基于编解码顺序的全局搜索方式。假定当前节点为Pi,则已编码/解码的参考节点为(P0,P1,…,Pi-1)。The first is a global search method based on the encoding and decoding order. Assuming the current node is Pi, the encoded/decoded reference node is (P0, P1, ..., Pi-1).

如果i=0,那么无需查找,直接将{128,128,128}作为预测值;If i=0, then no need to search, directly use {128, 128, 128} as the predicted value;

如果i=1,那么P0作为预测节点;If i=1, then P0 is used as the prediction node;

如果i=2,那么P0、P1作为预测节点;If i=2, then P0 and P1 are used as prediction nodes;

如果i>=3,那么若i<maxNumOfNeighbours,则searchRange=i,否则searchRange=maxNumOfNeighbours(其中,maxNumOfNeighbours为一特定数值,例如128)。If i>=3, then if i<maxNumOfNeighbours, searchRange=i, otherwise searchRange=maxNumOfNeighbours (wherein maxNumOfNeighbours is a specific value, such as 128).

这样,在当前节点希尔伯特顺序之前的searchRange个点,例如(Pi-searchRange,…,Pi-2,Pi-1)中按照希尔伯特顺序逐一向前搜索,查找与当前节点距离最近的k个点作为当前节点的预测节点,具体过程如下:In this way, the searchRange points before the current node in the Hilbert order, for example (Pi-searchRange, ..., Pi-2, Pi-1), are searched forward one by one in the Hilbert order to find the k points closest to the current node as the predicted nodes of the current node. The specific process is as follows:

(a)当在处理当前节点在希尔伯特顺序下的首3个节点时,按照顺序将这3个节点插入预测点集合,且每插入一个节点之后,都要根据预测点集合中的点(xi-j,yi-j,zi-j)与当前节点(xi,yi,zi)之间的距离,对预测点集合中的点进行升序排序,使得排序之后的三个点的距离满足d1<=d2<=d3。其中,距离d的计算采用曼哈顿距离计算方法,定义为:(a) When processing the first three nodes of the current node in the Hilbert order, insert these three nodes into the prediction point set in order, and after each node is inserted, the points in the prediction point set are sorted in ascending order according to the distance between the point (xi-j, yi-j, zi-j) in the prediction point set and the current node (xi, yi, zi), so that the distances of the three points after sorting satisfy d1 <= d2 <= d3. The distance d is calculated using the Manhattan distance calculation method, which is defined as:

d=|xi-xi-j|+|yi-yi-j|+|zi-zi-j| (1)d=|xi-xi-j|+|yi-yi-j|+|zi-zi-j| (1)

(b)继续向前搜索第j点,当预测点集合中的点数等于3个时,若第j点与当前节点之间的距离dj=d3,则将第j点加入到等距离点集合中;(b) Continue searching forward for the jth point. When the number of points in the predicted point set is equal to 3, if the distance between the jth point and the current node is dj=d3, then add the jth point to the set of equidistant points.

若第j点与当前节点之间的距离dj<d3,则将d3对应的点移出预测点集合,并将j点加入预测点集合,加入新点后再次根据预测点集合中的点与当前节点之间的距离,对预测点集合中的点进行升序排序,然后将重排序后的d3与被移出点的距离dtemp进行比较,若dtemp=d3,则将被移出的点加入到等距离点集合中,否则将等距离点集合清空;If the distance dj between the jth point and the current node is less than d3, the point corresponding to d3 is removed from the prediction point set, and point j is added to the prediction point set. After the new point is added, the points in the prediction point set are sorted in ascending order again according to the distance between the point in the prediction point set and the current node. Then the reordered d3 is compared with the distance dtemp of the removed point. If dtemp = d3, the removed point is added to the equidistant point set, otherwise the equidistant point set is cleared.

(c)直到搜索到点Pi-searchRange,最终获得3个距离最近的点作为预测节点,以及最多13个等距离点。(c) Until the point Pi-searchRange is searched, the three closest points are finally obtained as prediction nodes, and up to 13 equidistant points are obtained.

第二种为基于空间关系的搜索方式。利用节点与节点之间的几何关系(即空间关系),以当前节点的几何共面、共线、共点节点作为预测节点,同时预测节点需要满足的条件是在当前节点之前已编码/解码完成,然后将权重值设为预测节点与当前节点的几何曼哈顿距离的倒数,即共面节点权重为1,共线节点权重为1/2,共点节点权重为1/3,计算所有预测节点的属性重建值的加权平均值为当前节点对应的属性预测值(特别的,对于编码的第一个节点,没有参考节点进行预测,其属性预测值可直接设置为0)。The second is a search method based on spatial relationships. Using the geometric relationship between nodes (i.e., spatial relationship), the geometric coplanar, colinear, and co-point nodes of the current node are used as prediction nodes. At the same time, the prediction node must meet the condition that it has been encoded/decoded before the current node. Then the weight value is set to the inverse of the geometric Manhattan distance between the prediction node and the current node, that is, the weight of the coplanar node is 1, the weight of the colinear node is 1/2, and the weight of the co-point node is 1/3. The weighted average of the attribute reconstruction values of all prediction nodes is calculated as the attribute prediction value corresponding to the current node (in particular, for the first node of the encoding, there is no reference node for prediction, and its attribute prediction value can be directly set to 0).

简单来说,需要满足的两个条件为:(a)与当前节点满足共面、共线、共点关系;(b)在当前节点之前已编码/解码完成。In simple terms, the two conditions that need to be met are: (a) the node is coplanar, colinear, or co-pointed with the current node; and (b) the node has been encoded/decoded before the current node.

示例性地,图6A示出了本申请实施例提供的一种当前节点与其共面节点的分布示意图,图6B示出了本申请实施例提供的一种当前节点与其共线节点的分布示意图,图6C示出了本申请实施例提供的一种当前节点与其共点节点的分布示意图。如图6A-图6C所示,假设当前节点O的序号为7,共有6个面,12条边,8个点。其中,在图6A中,共面节点有3、5、6、14、21、35;在图6B中,共线节点有1、2、4、10、12、17、20、28、33、34、42、49;在图6C中,共点节点有0、8、16、24、32、40、48、56。Exemplarily, FIG6A shows a distribution diagram of a current node and its coplanar nodes provided by an embodiment of the present application, FIG6B shows a distribution diagram of a current node and its colinear nodes provided by an embodiment of the present application, and FIG6C shows a distribution diagram of a current node and its co-point nodes provided by an embodiment of the present application. As shown in FIG6A-FIG6C, assuming that the sequence number of the current node O is 7, there are 6 faces, 12 edges, and 8 points. Among them, in FIG6A, the coplanar nodes are 3, 5, 6, 14, 21, and 35; in FIG6B, the colinear nodes are 1, 2, 4, 10, 12, 17, 20, 28, 33, 34, 42, and 49; in FIG6C, the co-point nodes are 0, 8, 16, 24, 32, 40, 48, and 56.

在所有这些共面节点、共线节点、共点节点中,无论当前节点的位置如何,可能满足“在当前节点之前已编码/解码完成”条件的节点包括:共面节点3、5、6,共线节点1、2、4、10、12、17、20、33、34,共点节点0、8、16、24、32、40、48;因此,预测节点将在共面节点3、5、6,共线节点1、2、4、10、12、17、20、33、34,共点节点0、8、16、24、32、40、48当中产生。Among all these coplanar nodes, colinear nodes, and co-point nodes, no matter what the position of the current node is, the nodes that may meet the condition of "encoding/decoding completed before the current node" include: coplanar nodes 3, 5, 6, colinear nodes 1, 2, 4, 10, 12, 17, 20, 33, 34, co-point nodes 0, 8, 16, 24, 32, 40, 48; therefore, the predicted nodes will be generated among the coplanar nodes 3, 5, 6, colinear nodes 1, 2, 4, 10, 12, 17, 20, 33, 34, and co-point nodes 0, 8, 16, 24, 32, 40, 48.

然而,基于空间关系的搜索方式虽然能较快定位到与当前节点附近的节点,但不一定能够找到距离当前节点最近的预测节点,因此不能最大化帧内预测的准确性。However, although the search method based on spatial relationships can quickly locate nodes near the current node, it may not be able to find the predicted node closest to the current node, and therefore cannot maximize the accuracy of intra-frame prediction.

基于此,本申请实施例提供了一种编解码方法,在编码端,确定当前节点对应的索引序号以及初始参考集合;基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。在解码端,确定当前节点对应的索引序号以及初始参考集合;基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,基于索引序号的奇偶特性构建包括当前节点在内的目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。Based on this, an embodiment of the present application provides a coding and decoding method. At the coding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set. At the decoding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set. In this way, a target reference set including the current node is constructed based on the parity characteristics of the index number, and the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the coding and decoding performance of the point cloud attributes.

下面将结合附图对本申请各实施例进行详细说明。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

在本申请的一实施例中,参见图7,其示出了本申请实施例提供的一种解码方法的流程示意图。如图7所示,该方法可以包括:In one embodiment of the present application, referring to FIG7 , a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG7 , the method may include:

S701:确定当前节点对应的索引序号以及初始参考集合。S701: Determine the index number corresponding to the current node and the initial reference set.

需要说明的是,本申请实施例所述的解码方法具体是指点云解码方法,更具体地是一种点云属性的帧内预测方法,用于构建确定预测节点的参考范围。该方法可以应用于点云解码器(也可简称为“解码器”)。It should be noted that the decoding method described in the embodiment of the present application specifically refers to a point cloud decoding method, more specifically, an intra-frame prediction method of point cloud attributes, which is used to construct a reference range for determining prediction nodes. The method can be applied to a point cloud decoder (also referred to as a "decoder").

还需要说明的是,在本申请实施例中,待处理点云包括至少一个节点。其中,对于待处理点云中的节点,在对该节点进行解码时,其可以作为待处理点云中的待解码节点,而且该节点的周围存在有多个已解码节点。在这里,当前节点即是这至少一个节点中当前需要解码的待解码节点。It should also be noted that, in the embodiment of the present application, the point cloud to be processed includes at least one node. Among them, for a node in the point cloud to be processed, when decoding the node, it can be used as a node to be decoded in the point cloud to be processed, and there are multiple decoded nodes around the node. Here, the current node is the node to be decoded that currently needs to be decoded in the at least one node.

进一步地,在本申请实施例中,对于待处理点云中的每一个节点,其对应一个几何信息和一个属性信息;其中,几何信息表征该点的空间关系,属性信息表征该点的属性信息。Furthermore, in an embodiment of the present application, for each node in the point cloud to be processed, it corresponds to a geometric information and an attribute information; wherein the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point.

在这里,属性信息可以为颜色分量,也可以是反射率或者其它属性,本申请实施例不作具体限定。其中,当属性信息为颜色分量时,具体可以为任意颜色空间的颜色信息。示例性地,属性信息可以为RGB空间的颜色信息,也可以为YUV空间的颜色信息,还可以为YCbCr空间的颜色信息等等,本申请实施例也不作具体限定。Here, the attribute information may be a color component, or a reflectivity or other attribute, which is not specifically limited in the embodiments of the present application. When the attribute information is a color component, it may be color information of any color space. Exemplarily, the attribute information may be color information of an RGB space, or color information of a YUV space, or color information of a YCbCr space, etc., which is not specifically limited in the embodiments of the present application.

还需要说明的是,在本申请实施例中,解码器可以按照预设解码顺序对这至少一个节点进行排列,以便确定每一节点对应的索引序号。这样,根据每一节点对应的索引序号,解码器能够按照预设解码顺序处理待处理点云中的每一节点。It should also be noted that, in the embodiment of the present application, the decoder can arrange the at least one node in a preset decoding order so as to determine the index number corresponding to each node. In this way, according to the index number corresponding to each node, the decoder can process each node in the point cloud to be processed in the preset decoding order.

在一些实施例中,预设解码顺序可以为下述其中之一:点云原始顺序、莫顿顺序、希尔伯特顺序等等,本申请实施例不作具体限定。In some embodiments, the preset decoding order may be one of the following: original order of point cloud, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of the present application.

可以理解地,初始参考集合表示每一个节点查找预测节点的初始参考范围,在该范围内的参考节点均为当前节点之前的已解码节点。具体地,假定当前节点的索引序号为i,那么索引序号为0~i-1的节点均为已解码节点,而且初始参考集合就是根据这些已解码节点确定的。It can be understood that the initial reference set represents the initial reference range for each node to search for a prediction node, and the reference nodes within this range are all decoded nodes before the current node. Specifically, assuming that the index number of the current node is i, then the nodes with index numbers 0 to i-1 are all decoded nodes, and the initial reference set is determined based on these decoded nodes.

在一些实施例中,初始参考集合是由N个已解码的参考节点组成;该方法还可以包括:In some embodiments, the initial reference set is composed of N decoded reference nodes; the method may also include:

若当前节点的索引序号大于或等于0且小于预设常数值,则确定N的取值等于当前节点的索引序号;If the index number of the current node is greater than or equal to 0 and less than a preset constant value, then determine that the value of N is equal to the index number of the current node;

若当前节点的索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。If the index number of the current node is greater than or equal to the preset constant value, it is determined that the value of N is equal to the preset constant value.

需要说明的是,在本申请实施例中,每一个节点查找预测节点的初始参考集合的最大值为一固定值,可以用预设常数值表示。换句话说,预设常数值表示初始参考集合包括参考节点个数的最大值。示例性地,预设常数值可以为128,但是并不作具体限定。It should be noted that, in the embodiment of the present application, the maximum value of the initial reference set for each node to search for a prediction node is a fixed value, which can be represented by a preset constant value. In other words, the preset constant value represents the maximum value of the number of reference nodes included in the initial reference set. Exemplarily, the preset constant value can be 128, but it is not specifically limited.

还需要说明的是,在本申请实施例中,N为大于或等于0且小于或等于预设常数值的整数。如果N等于0,那么初始参考集合为空集合;如果N不等于0,那么初始参考集合为非空集合。It should also be noted that, in the embodiment of the present application, N is an integer greater than or equal to 0 and less than or equal to a preset constant value. If N is equal to 0, then the initial reference set is an empty set; if N is not equal to 0, then the initial reference set is a non-empty set.

在一种具体的实施例中,假定预设常数值为128,初始参考集合是由N个已解码的参考节点组成,那么在当前节点为第0~127节点时,即当前节点的索引序号i=0~127,此时N=i;否则,N=128。In a specific embodiment, assuming that the preset constant value is 128, and the initial reference set is composed of N decoded reference nodes, then when the current node is the 0th to 127th node, that is, the index number of the current node i=0~127, then N=i; otherwise, N=128.

S702:基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置。S702: Determine the target position corresponding to the current node in the initial reference set based on the odd-even characteristic of the index number.

S703:根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。S703: After decoding the current node according to the initial reference set, the current node is placed at a target position to obtain a target reference set.

需要说明的是,在本申请实施例中,目标参考集合表示当前节点在预设解码顺序上的下一节点对应的初始参考集合。It should be noted that, in the embodiment of the present application, the target reference set represents the initial reference set corresponding to the next node of the current node in the preset decoding order.

还需要说明的是,在一些实施例中,在根据初始参考集合对当前节点进行解码处理之后,所述将当前节点放置于目标位置,可以包括:It should also be noted that, in some embodiments, after decoding the current node according to the initial reference set, placing the current node at the target position may include:

在当前节点的索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;When the index number of the current node is greater than or equal to 0 and less than a preset constant value, the current node is directly placed at the target position in the initial reference set;

在当前节点的索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。When the index number of the current node is greater than or equal to the preset constant value, the current node is used to replace the reference node at the target position.

在这里,在本申请实施例中,该方法还可以包括:在当前节点的索引序号大于或等于0且小于预设常数值的情况下,根据初始参考集合对当前节点进行解码处理之后,将当前节点按照预设解码顺序放置于初始参考集合中,得到目标参考集合。Here, in an embodiment of the present application, the method may further include: when the index number of the current node is greater than or equal to 0 and less than a preset constant value, after decoding the current node according to the initial reference set, the current node is placed in the initial reference set according to a preset decoding order to obtain a target reference set.

也就是说,对于当前节点的索引序号大于或等于0且小于预设常数值的情况,在完成对当前节点的解码处理之后,可以将当前节点按照预设解码顺序放置于初始参考集合中,或者也可以基于索引序号的奇偶特性确定出目标位置,然后将当前节点直接放置在初始参考集合中对应的目标位置,以得到目标参考集合;而对于当前节点的索引序号大于或等于预设常数值的情况,在完成对当前节点的解码处理之后,则是基于索引序号的奇偶特性确定当前节点在初始参考集合中对应的目标位置,然后利用当前节点替换目标位置处的参考节点,以得到目标参考集合。That is to say, for the case where the index number of the current node is greater than or equal to 0 and less than a preset constant value, after completing the decoding process of the current node, the current node can be placed in the initial reference set according to the preset decoding order, or the target position can be determined based on the parity characteristic of the index number, and then the current node is directly placed at the corresponding target position in the initial reference set to obtain the target reference set; and for the case where the index number of the current node is greater than or equal to the preset constant value, after completing the decoding process of the current node, the target position corresponding to the current node in the initial reference set is determined based on the parity characteristic of the index number, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

在一些实施例中,所述根据初始参考集合对当前节点进行解码处理,可以包括:In some embodiments, the decoding process of the current node according to the initial reference set may include:

解析码流,确定当前节点对应的属性残差值;Parse the code stream to determine the attribute residual value corresponding to the current node;

根据初始参考集合,确定当前节点对应的属性预测值;According to the initial reference set, determine the attribute prediction value corresponding to the current node;

根据属性残差值和属性预测值,确定当前节点对应的属性重建值。According to the attribute residual value and the attribute prediction value, the attribute reconstruction value corresponding to the current node is determined.

需要说明的是,在本申请实施例中,解码器在获取到码流之后,可以从码流中解析出当前节点对应的属性残差值。其中,码流中解析出的属性残差值为反变换与反量化后的残差值。It should be noted that in the embodiment of the present application, after the decoder obtains the bitstream, it can parse the attribute residual value corresponding to the current node from the bitstream, wherein the attribute residual value parsed from the bitstream is the residual value after inverse transformation and inverse quantization.

还需要说明的是,在本申请实施例中,所述根据属性残差值和属性预测值,确定当前节点对应的属性重建值,可以包括:对属性残差值和属性预测值进行加法计算,得到当前节点对应的属性重建值。It should also be noted that, in the embodiment of the present application, determining the attribute reconstruction value corresponding to the current node based on the attribute residual value and the attribute prediction value may include: adding the attribute residual value and the attribute prediction value to obtain the attribute reconstruction value corresponding to the current node.

还需要说明的是,在本申请实施例中,所述根据初始参考集合,确定当前节点对应的属性预测值,可以包括:若当前节点的索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若当前节点的索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。It should also be noted that, in the embodiment of the present application, determining the attribute prediction value corresponding to the current node based on the initial reference set may include: if the index number of the current node is equal to 0, determining the initial reference set to be an empty set, and directly determining the preset attribute value as the attribute prediction value corresponding to the current node; if the index number of the current node is not equal to 0, determining the initial reference set to be a non-empty set, determining at least one prediction node from the initial reference set, and determining the attribute prediction value corresponding to the current node based on the at least one prediction node.

也就是说,如果初始参考集合为空集合,这时候不存在预测节点,可以直接将当前节点对应的属性预测值设置为预设属性值。示例性地,对于颜色属性,预设属性值可以为(128,128,128);对于反射率属性,预设属性值可以为0;在完成对当前节点的解码处理之后,当前节点可以按照预设解码顺序放置于初始参考集合中的队首位置0;或者也可以根据索引序号的奇偶特性将当前节点放置于初始参考集合中的位置1。如果初始参考集合为非空集合,这时候根据初始参考集合可以得到至少一个预测节点,然后根据这至少一个预测节点确定当前节点对应的属性预测值。That is to say, if the initial reference set is an empty set, there is no prediction node at this time, and the attribute prediction value corresponding to the current node can be directly set to the preset attribute value. Exemplarily, for the color attribute, the preset attribute value can be (128, 128, 128); for the reflectivity attribute, the preset attribute value can be 0; after completing the decoding process of the current node, the current node can be placed at the head position 0 in the initial reference set according to the preset decoding order; or the current node can be placed at position 1 in the initial reference set according to the parity characteristic of the index number. If the initial reference set is a non-empty set, at this time, at least one prediction node can be obtained according to the initial reference set, and then the attribute prediction value corresponding to the current node is determined according to the at least one prediction node.

在一种具体的实施例中,在当前节点的索引序号不等于0的情况下,所述根据至少一个预测节点确定当前节点对应的属性预测值,可以包括:In a specific embodiment, when the index number of the current node is not equal to 0, determining the attribute prediction value corresponding to the current node according to at least one prediction node may include:

获取至少一个预测节点各自的属性重建值;Obtaining a respective attribute reconstruction value of at least one prediction node;

若至少一个预测节点仅包括一个预测节点,则将该预测节点的属性重建值直接确定为当前节点对应的属性预测值;If at least one prediction node includes only one prediction node, the attribute reconstruction value of the prediction node is directly determined as the attribute prediction value corresponding to the current node;

若至少一个预测节点包括至少两个预测节点,则对至少两个预测节点各自的属性重建值进行加权平均计算,得到当前节点对应的属性预测值。If the at least one prediction node includes at least two prediction nodes, a weighted average calculation is performed on the attribute reconstruction values of the at least two prediction nodes to obtain the attribute prediction value corresponding to the current node.

需要说明的是,对于加权平均计算而言,在一种可能的实现方式中,如果权重值均设置为1,那么对至少两个预测节点各自的属性重建值进行加权平均计算,即为对至少两个预测节点各自的属性重建值进行平均值计算。在另一种可能的实现方式中,如果在这至少两个预测节点中,假定第一类节点的权重值为1,第二类节点的权重值为1/2,第三类节点的权重值为1/3,那么可以根据这些权重值对这至少两个预测节点各自的属性重建值进行加权平均计算。It should be noted that, for weighted average calculation, in a possible implementation, if the weight values are all set to 1, then the weighted average calculation is performed on the attribute reconstruction values of the at least two prediction nodes, that is, the average value of the attribute reconstruction values of the at least two prediction nodes is calculated. In another possible implementation, if in the at least two prediction nodes, it is assumed that the weight value of the first type of node is 1, the weight value of the second type of node is 1/2, and the weight value of the third type of node is 1/3, then the weighted average calculation can be performed on the attribute reconstruction values of the at least two prediction nodes according to these weight values.

在一种具体的实施例中,在当前节点的索引序号不等于0的情况下,所述从初始参考集合中确定至少一个预测节点,可以包括:In a specific embodiment, when the index number of the current node is not equal to 0, determining at least one prediction node from the initial reference set may include:

若当前节点的索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;If the index number of the current node is equal to 1, a reference node included in the initial reference set is determined as at least one prediction node;

若当前节点的索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;If the index number of the current node is equal to 2, two reference nodes included in the initial reference set are determined as at least one prediction node;

若当前节点的索引序号大于或等于3,则从初始参考集合中获取与当前节点之间的距离值相对较小的预设数量个参考节点,将预设数量个参考节点确定为至少一个预测节点。If the index number of the current node is greater than or equal to 3, a preset number of reference nodes having relatively small distance values to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as at least one prediction node.

需要说明的是,预设数量可以设置为k;其中,k可以为一固定值(例如,3),也可以为一范围(例如,3~16),本申请实施例并不作具体限定。It should be noted that the preset number can be set to k; wherein k can be a fixed value (for example, 3) or a range (for example, 3 to 16), and the embodiment of the present application does not make any specific limitation.

还需要说明的是,在本申请实施例中,对于当前节点的索引序号大于或等于3的情况,在一种具体的实现方式中,还可以分为两种情况:It should also be noted that in the embodiment of the present application, for the case where the index number of the current node is greater than or equal to 3, in a specific implementation, it can also be divided into two cases:

若当前节点的索引序号大于或等于3且小于或等于预设常数值,则从初始参考集合中获取当前节点在预设解码顺序上的前m个参考节点,将m个参考节点确定为至少一个预测节点;If the index number of the current node is greater than or equal to 3 and less than or equal to a preset constant value, then obtaining the first m reference nodes of the current node in a preset decoding order from the initial reference set, and determining the m reference nodes as at least one prediction node;

若当前节点的索引序号大于预设常数值,则从初始参考集合中获取与当前节点之间的距离值相对较小的k个参考节点,将k个参考节点确定为至少一个预测节点。If the index number of the current node is greater than a preset constant value, k reference nodes with relatively small distance values to the current node are obtained from the initial reference set, and the k reference nodes are determined as at least one prediction node.

在这里,m为大于零的整数。通常情况下,m的取值等于3,但是并不作具体限定。Here, m is an integer greater than 0. Usually, the value of m is equal to 3, but it is not specifically limited.

在一种具体的实现方式中,假定i表示当前节点的索引序号,那么对于预测节点而言,若i=0,则不存在预测节点;若i=1,则初始参考集合中包括第0节点,可以将第0节点直接确定为预测节点;若i=2,则初始参考集合中包括第0节点和第1节点,可以将第0节点和第1节点直接确定为预测节点;若i>=3且i<=128,则从初始参考集合中获取当前节点在预设解码顺序上的前3个参考节点,将这3个参考节点确定为预测节点;若i>128,则从初始参考集合中获取与当前节点之间的距离值相对较小的k个参考节点,将k个参考节点确定为预测节点。在另一种具体的实现方式中,i<3的情况与前述实现方式相同;若i>=3,则从初始参考集合中获取与当前节点之间的距离值相对较小的k个参考节点,将k个参考节点确定为预测节点。In a specific implementation, assuming that i represents the index number of the current node, then for the prediction node, if i=0, there is no prediction node; if i=1, the initial reference set includes the 0th node, and the 0th node can be directly determined as the prediction node; if i=2, the initial reference set includes the 0th node and the 1st node, and the 0th node and the 1st node can be directly determined as the prediction node; if i>=3 and i<=128, the first three reference nodes of the current node in the preset decoding order are obtained from the initial reference set, and these three reference nodes are determined as the prediction nodes; if i>128, k reference nodes with relatively small distance values from the current node are obtained from the initial reference set, and the k reference nodes are determined as the prediction nodes. In another specific implementation, the case of i<3 is the same as the above implementation; if i>=3, k reference nodes with relatively small distance values from the current node are obtained from the initial reference set, and the k reference nodes are determined as the prediction nodes.

进一步地,在一些实施例中,在当前节点的索引序号大于预设常数值的情况下,所述从初始参考集合中获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:Further, in some embodiments, when the index number of the current node is greater than a preset constant value, acquiring a preset number of reference nodes having relatively small distance values to the current node from the initial reference set may include:

从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained by global search; or,

从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,From the initial reference set, a preset number of reference nodes with relatively small distance values from the current node are obtained by using a spatial relationship search method; or,

从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点。From the initial reference set, a preset number of reference nodes with relatively small distance values to the current node are obtained by using a spatial relationship depth-first search method.

也就是说,在本申请实施例中,对于预设数量个参考节点的确定,可以利用全局搜索方式在初始参考集合中搜索得到,也可以利用空间关系搜索方式在初始参考集合中搜索得到,还可以利用空间关系深度优先搜索方式在初始参考集合中搜索得到,甚至还可以利用其他搜索方式在初始参考集合中搜索得到等等,这里并不作具体限定。That is to say, in the embodiment of the present application, the preset number of reference nodes can be determined by searching in the initial reference set using a global search method, or by searching in the initial reference set using a spatial relationship search method, or by searching in the initial reference set using a spatial relationship depth-first search method, or even by searching in the initial reference set using other search methods, etc., which are not specifically limited here.

在一种可能的实现方式中,所述利用全局搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:In a possible implementation, the acquiring a preset number of reference nodes having relatively small distances to the current node by using a global search method may include:

计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的预设数量个距离值;Calculate the distance value between each reference node in the initial reference set and the current node, and select a preset number of distance values with relatively small distance values from the obtained N distance values;

根据预设数量个距离值,确定预设数量个参考节点。According to a preset number of distance values, a preset number of reference nodes is determined.

需要说明的是,在本申请实施例中,计算初始参考集合中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。It should be noted that in the embodiment of the present application, the distance value between each reference node in the initial reference set and the current node can be calculated by using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application.

还需要说明的是,预设数量用k表示。这样,由于初始参考集合包括N个参考节点,那么可以计算得到N个距离值;从这N个距离值中选取距离值最小的k个距离值,进而根据这k个距离值确定的参考节点即为与当前节点距离最近的k个参考节点,以作为k个预测节点。It should also be noted that the preset number is represented by k. In this way, since the initial reference set includes N reference nodes, N distance values can be calculated; k distance values with the smallest distance values are selected from these N distance values, and the reference nodes determined according to these k distance values are the k reference nodes closest to the current node, which are used as k prediction nodes.

在另一种可能的实现方式中,所述利用空间关系搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:In another possible implementation, the acquiring a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship search method may include:

基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;Based on the spatial relationship between nodes, search for reference nodes that meet the preset conditions from the initial reference set to obtain M reference nodes;

计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;Calculate the distance value between each reference node in the M reference nodes and the current node, select K distance values with relatively small distance values from the obtained M distance values, and determine K reference nodes according to the K distance values;

若K等于预设数量,则将K个参考节点作为预设数量个参考节点。If K is equal to a preset number, K reference nodes are used as the preset number of reference nodes.

在本申请实施例中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。In an embodiment of the present application, the reference nodes that meet the preset conditions include at least: child nodes in the upper layer block of the current node, child nodes in the neighboring block that is coplanar with the upper layer block of the current node, child nodes in the neighboring block that is colinear with the upper layer block of the current node, and child nodes in the neighboring block that is co-pointed with the upper layer block of the current node.

还需要说明的是,在本申请实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。It should also be noted that, in the embodiment of the present application, the upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.

还需要说明的是,在本申请实施例中,计算M个参考节点中每一个参考节点与当前节点之间的距 离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。另外,M为大于或等于0的整数,K为大于或等于0且小于或等于M的整数。It should also be noted that, in the embodiment of the present application, the distance value between each reference node in the M reference nodes and the current node can be calculated by using a Manhattan distance calculation method, a Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application. In addition, M is an integer greater than or equal to 0, and K is an integer greater than or equal to 0 and less than or equal to M.

这样,基于节点与节点之间的空间关系,可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)自身以及与当前节点的父块(或者,当前节点的祖父块等)共面、共线、共点的邻居块内的子节点,得到M个参考节点;然后从这M个参考节点中确定与当前节点距离最近的k个参考节点,以作为k个预测节点。In this way, based on the spatial relationship between nodes, the parent block of the current node (or the grandparent block of the current node, etc.) itself and the child nodes in the neighboring blocks that are coplanar, colinear, and co-point with the parent block of the current node (or the grandparent block of the current node, etc.) can be searched from the initial reference set to obtain M reference nodes; then, the k reference nodes closest to the current node are determined from these M reference nodes as k prediction nodes.

进一步地,如果待处理点云属于稀疏点云,从这M个参考节点中无法确定出k个预测节点,那么还需要进入全局搜索方式继续搜索参考节点,以便补齐k个预测节点。因此,在一些实施例中,该方法还可以包括:Furthermore, if the point cloud to be processed is a sparse point cloud, and k prediction nodes cannot be determined from the M reference nodes, then it is necessary to enter the global search mode to continue searching for reference nodes in order to complete the k prediction nodes. Therefore, in some embodiments, the method may further include:

若K小于预设数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据预设数量个距离值确定预设数量个参考节点。If K is less than a preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

需要说明的是,在利用空间关系搜索方式确定出M个参考节点之后,如果从M个参考节点中只能选取距离值相对较小的K个参考节点,而且K小于第二数量即没有满足k个预测节点,那么还需要进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,并根据所计算得到的距离值与K个距离值的比较结果来确定距离值相对较小的预设数量个参考节点,从而能够补齐k个预测节点。It should be noted that after determining M reference nodes using the spatial relationship search method, if only K reference nodes with relatively small distance values can be selected from the M reference nodes, and K is less than the second number, that is, the k prediction nodes are not met, then it is necessary to enter the global search method, by calculating the distance value between the reference node in the initial reference set and the current node, and determining a preset number of reference nodes with relatively small distance values based on the comparison result of the calculated distance value and the K distance values, so as to complete the k prediction nodes.

在又一种可能的实现方式中,所述利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:In another possible implementation, the acquiring a preset number of reference nodes having relatively small distance values from the current node by using a spatial relationship depth-first search method may include:

基于节点与节点之间的空间关系,从初始参考集合中搜索当前节点的上层块内的子节点,得到K1个参考节点;Based on the spatial relationship between nodes, search for child nodes in the upper block of the current node from the initial reference set to obtain K1 reference nodes;

计算K1个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值,并根据K2个距离值确定K2个参考节点;Calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values;

若K2等于预设数量,则将K2个参考节点作为预设数量个参考节点;If K2 is equal to the preset number, K2 reference nodes are used as the preset number of reference nodes;

若K2小于预设数量,则继续从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;If K2 is less than the preset number, continue to search for child nodes in neighboring blocks that are coplanar with the upper layer block of the current node from the initial reference set to obtain K3 reference nodes;

计算K3个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K3个距离值和K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据K4个距离值确定K4个参考节点;Calculate the distance value between each reference node in the K3 reference nodes and the current node, and determine K4 distance values with relatively smaller distance values according to the comparison result of the obtained K3 distance values and the K2 distance values, and determine the K4 reference node according to the K4 distance values;

若K4等于预设数量,则将K4个参考节点作为预设数量个参考节点;If K4 is equal to the preset number, K4 reference nodes are used as the preset number of reference nodes;

若K4小于预设数量,则继续从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;If K4 is less than the preset number, continue to search for child nodes in neighboring blocks that are colinear with the upper layer block of the current node from the initial reference set to obtain K5 reference nodes;

计算K5个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K5个距离值和K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据K6个距离值确定K6个参考节点;Calculate the distance value between each reference node in the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values according to the comparison result of the obtained K5 distance values and the K4 distance values, and determine the K6 reference nodes according to the K6 distance values;

若K6等于预设数量,则将K6个参考节点作为预设数量个参考节点;If K6 is equal to the preset number, K6 reference nodes are used as the preset number of reference nodes;

若K6小于预设数量,则继续从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;If K6 is less than the preset number, continue to search for child nodes in neighboring blocks that have common points with the upper layer block of the current node from the initial reference set to obtain K7 reference nodes;

计算K7个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K7个距离值和K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据K8个距离值确定K8个参考节点;Calculate the distance value between each of the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values according to the comparison results of the obtained K7 distance values and the K6 distance values, and determine the K8 reference node according to the K8 distance values;

若K8等于预设数量,则将K8个参考节点作为预设数量个参考节点;If K8 is equal to the preset number, K8 reference nodes are used as the preset number of reference nodes;

若K8小于预设数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K8个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据预设数量个距离值确定预设数量个参考节点。If K8 is less than a preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K8 distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

需要说明的是,在本申请实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。It should be noted that, in the embodiment of the present application, the upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.

还需要说明的是,在本申请实施例中,计算M个参考节点中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。It should also be noted that in the embodiment of the present application, the distance value between each of the M reference nodes and the current node can be calculated by using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application.

还需要说明的是,在本申请实施例中,从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,如果这里存在有多个共面的邻近块,那么这多个共面的邻居块可以一次性进行搜索,也可以依次进行搜索。例如,在依次搜索时,可以先在第一个共面的邻居块内搜索,如果搜索补齐了k个参考节点,那么将不再进行搜索;如果没有补齐k个参考节点,那么再在第二个共面的邻居块内搜索,如果搜索补齐了k个参考节点,那么将不再进行搜索;否则继续在第三个共面的邻居块内搜索等等。同理,对于从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点、从初始参考集合中搜索与当 前节点的上层块共点的邻居块内的子节点也可以如此操作;这里对此不作任何限定。It should also be noted that in the embodiment of the present application, when searching for subnodes in neighbor blocks coplanar with the upper block of the current node from the initial reference set, if there are multiple coplanar neighbor blocks, then these multiple coplanar neighbor blocks can be searched at once or in sequence. For example, when searching in sequence, you can first search in the first coplanar neighbor block. If the search completes k reference nodes, then the search will not be performed; if the k reference nodes are not completed, then search in the second coplanar neighbor block. If the search completes k reference nodes, then the search will not be performed; otherwise, continue to search in the third coplanar neighbor block, and so on. Similarly, the same operation can be performed for searching for subnodes in neighbor blocks colinear with the upper block of the current node from the initial reference set, and for searching for subnodes in neighbor blocks co-pointed with the upper block of the current node from the initial reference set; no limitation is made here.

这样,在空间关系深度优先搜索方式中,基于节点与节点之间的空间关系,第一步可以先从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)内的子节点,如果没有满足k个预测节点,那么第二步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共面的邻居块内的子节点,如果仍然没有满足k个预测节点,那么第三步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共线的邻居块内的子节点,如果仍然没有满足k个预测节点,那么第四步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共点的邻居块内的子节点,如果前面四步之和都没有满足k个预测节点,那么第五步再进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,以便补齐k个预测节点。In this way, in the spatial relationship depth-first search method, based on the spatial relationship between nodes, the first step is to search the child nodes in the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are not met, then the second step is to search the child nodes in the neighboring blocks coplanar with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the third step is to search the child nodes in the neighboring blocks colinear with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the fourth step is to search the child nodes in the neighboring blocks co-pointed with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the sum of the previous four steps does not meet the k predicted nodes, then the fifth step enters the global search method again, by calculating the distance value between the reference node in the initial reference set and the current node, so as to complete the k predicted nodes.

可以理解地,在本申请实施例中,无论是空间关系搜索方式还是空间关系深度优先搜索方式,基于空间关系的搜索过程描述如下:It can be understood that in the embodiments of the present application, whether it is a spatial relationship search method or a spatial relationship depth-first search method, the search process based on spatial relationship is described as follows:

(a)首先依据当前节点在父块(或祖父块等)中所处的方位,确定与其父块(或祖父块等)共面、共线、共点的邻居块。如图8A~图8H所示,当前节点的方位共有八种模式,具体包括:图8A所示的当前节点处于后侧右上的模式、图8B所示的当前节点处于后侧右下的模式、图8C所示的当前节点处于后侧左上的模式、图8D所示的当前节点处于后侧左下的模式、图8E所示的当前节点处于前侧右上的模式、图8F所示的当前节点处于前侧右下的模式、图8G所示的当前节点处于前侧左上的模式、图8H所示的当前节点处于前侧左下的模式等。针对这八种模式,图9A~图9H分别示出了在每一种模式下对应的共面邻居块、共线邻居块、共点邻居块。其中,在图9A~图9H中,当前节点的父块(或祖父块等)用加粗框且白色填充表示,共面邻居块用网格线填充,共线邻居块用斜线填充,共点邻居块用点填充。(a) First, according to the position of the current node in the parent block (or grandparent block, etc.), determine the neighbor blocks that are coplanar, colinear, and co-point with its parent block (or grandparent block, etc.). As shown in Figures 8A to 8H, there are eight modes for the position of the current node, including: the mode in which the current node is in the upper right of the rear side as shown in Figure 8A, the mode in which the current node is in the lower right of the rear side as shown in Figure 8B, the mode in which the current node is in the upper left of the rear side as shown in Figure 8C, the mode in which the current node is in the lower left of the rear side as shown in Figure 8D, the mode in which the current node is in the upper right of the front side as shown in Figure 8E, the mode in which the current node is in the lower right of the front side as shown in Figure 8F, the mode in which the current node is in the upper left of the front side as shown in Figure 8G, and the mode in which the current node is in the lower left of the front side as shown in Figure 8H. For these eight modes, Figures 9A to 9H respectively show the corresponding coplanar neighbor blocks, colinear neighbor blocks, and co-point neighbor blocks in each mode. Among them, in Figures 9A to 9H, the parent block (or grandparent block, etc.) of the current node is represented by a bold frame and filled with white, the coplanar neighbor blocks are filled with grid lines, the colinear neighbor blocks are filled with oblique lines, and the co-point neighbor blocks are filled with dots.

示例性地,以希尔伯特码(也可以是莫顿码等)为例,通过当前节点的父块(或祖父块等)的几何坐标,再加上一定的偏移量,可以计算出邻居块的几何坐标,通过几何坐标可计算出相应的希尔伯特码,八种模式所对应的偏移量分别为:For example, taking Hilbert code (or Morton code, etc.) as an example, the geometric coordinates of the parent block (or grandparent block, etc.) of the current node, plus a certain offset, can be used to calculate the geometric coordinates of the neighbor block. The corresponding Hilbert code can be calculated through the geometric coordinates. The offsets corresponding to the eight modes are:

hilbertShift[8][7][3]={hilbertShift[8][7][3]={

{{0,-1,0},{-1,0,0},{0,0,-1},{-1,-1,0},{-1,0,-1},{0,-1,-1},{-1,-1,-1}},{{0,-1,0},{-1,0,0},{0,0,-1},{-1,-1,0},{-1,0,-1},{0 ,-1,-1},{-1,-1,-1}},

{{0,-1,0},{-1,0,0},{0,0,1},{-1,-1,0},{-1,0,1},{0,-1,1},{-1,-1,1}},{{0,-1,0},{-1,0,0},{0,0,1},{-1,-1,0},{-1,0,1},{0,- 1,1},{-1,-1,1}},

{{0,1,0},{-1,0,0},{0,0,-1},{-1,1,0},{-1,0,-1},{0,1,-1},{-1,1,-1}},{{0,1,0},{-1,0,0},{0,0,-1},{-1,1,0},{-1,0,-1},{0,1 ,-1},{-1,1,-1}},

{{0,1,0},{-1,0,0},{0,0,1},{-1,1,0},{-1,0,1},{0,1,1},{-1,1,1}},{{0,1,0},{-1,0,0},{0,0,1},{-1,1,0},{-1,0,1},{0,1,1 },{-1,1,1}},

{{0,-1,0},{1,0,0},{0,0,-1},{1,-1,0},{1,0,-1},{0,-1,-1},{1,-1,-1}},{{0,-1,0},{1,0,0},{0,0,-1},{1,-1,0},{1,0,-1},{0,-1 ,-1},{1,-1,-1}},

{{0,-1,0},{1,0,0},{0,0,1},{1,-1,0},{1,0,1},{0,-1,1},{1,-1,1}},{{0,-1,0},{1,0,0},{0,0,1},{1,-1,0},{1,0,1},{0,-1,1 },{1,-1,1}},

{{0,1,0},{1,0,0},{0,0,-1},{-1,1,0},{1,0,-1},{0,1,-1},{1,1,-1}},{{0,1,0},{1,0,0},{0,0,-1},{-1,1,0},{1,0,-1},{0,1,- 1},{1,1,-1}},

{{0,1,0},{1,0,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,1,1}}{{0,1,0},{1,0,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{ 1,1,1}}

}}

(b)通过比较初始参考集合内参考节点的希尔伯特码与邻居块的希尔伯特码,即可确定该参考节点是否满足共面、共线、共点的条件。(b) By comparing the Hilbert code of the reference node in the initial reference set with the Hilbert code of the neighboring block, it can be determined whether the reference node meets the conditions of coplanarity, colinearity, and co-pointness.

还可以理解地,在本申请实施例中,需要根据索引序号的奇偶特性来确定当前节点在所述初始参考集合中对应的目标位置,以便在完成对当前节点的解码处理之后,可以利用当前节点替换目标位置处的参考节点。It can also be understood that in an embodiment of the present application, it is necessary to determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number, so that after the decoding process of the current node is completed, the current node can be used to replace the reference node at the target position.

在一些实施例中,所述基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置,可以包括:从初始参考集合中确定与索引序号的奇偶特性相反且最早放置于初始参考集合中的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining from the initial reference set a target reference node that has the opposite parity characteristic of the index number and is placed earliest in the initial reference set, and determining the position corresponding to the target reference node as the target position.

需要说明的是,以预设常数值为128为例,如果当前节点的索引序号i为偶数,那么目标位置的取值可以等于i与128的余数再加上1;如果当前节点的索引序号i为奇数,那么目标位置的取值可以等于i与128的余数再减去1。示例性地,如果当前节点的索引序号为128,那么目标位置为1;如果当前节点的索引序号为129,那么目标位置为0;如果当前节点的索引序号为130,那么目标位置为3;如果当前节点的索引序号为131,那么目标位置为2;等等。It should be noted that, taking the preset constant value of 128 as an example, if the index number i of the current node is an even number, the value of the target position can be equal to the remainder of i and 128 plus 1; if the index number i of the current node is an odd number, the value of the target position can be equal to the remainder of i and 128 minus 1. For example, if the index number of the current node is 128, the target position is 1; if the index number of the current node is 129, the target position is 0; if the index number of the current node is 130, the target position is 3; if the index number of the current node is 131, the target position is 2; and so on.

在一些实施例中,所述基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置,可以包括:在初始参考集合中,根据预设步长确定最早放置的一组候选参考节点;从一组候选参考节点中确定与索引序号的奇偶特性相反的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining a group of candidate reference nodes that are placed earliest in the initial reference set according to a preset step size; determining a target reference node that has the opposite parity characteristic of the index number from a group of candidate reference nodes, and determining the position corresponding to the target reference node as the target position.

需要说明的是,在本申请实施例中,预设步长是用于确定奇偶特性时所用的步长。预设步长的取值可以变化,例如预设步长可以设置为2,也可以设置为4、8等等,这里不作具体限定。It should be noted that in the embodiment of the present application, the preset step length is the step length used to determine the parity characteristic. The value of the preset step length can be varied, for example, the preset step length can be set to 2, 4, 8, etc., which is not specifically limited here.

示例性地,当预设步长等于4时,以循环缓存为例:For example, when the preset step size is equal to 4, taking the circular cache as an example:

若当前节点为第128个节点(即索引序号为128),则将其放置在初始参考集合中的位置3;If the current node is the 128th node (i.e., the index number is 128), it is placed at position 3 in the initial reference set;

若当前节点为第129个节点(即索引序号为129),则将其放置在初始参考集合中的位置2;If the current node is the 129th node (i.e., the index number is 129), it is placed at position 2 in the initial reference set;

若当前节点为第130个节点(即索引序号为130),则将其放置在初始参考集合中的位置1;If the current node is the 130th node (i.e., the index number is 130), then place it at position 1 in the initial reference set;

若当前节点为第131个节点(即索引序号为131),则将其放置在初始参考集合中的位置0;If the current node is the 131st node (i.e., the index number is 131), place it at position 0 in the initial reference set;

若当前节点为第132个节点(即索引序号为132),则将其放置在初始参考集合中的位置7;If the current node is the 132nd node (i.e., the index number is 132), then place it at position 7 in the initial reference set;

若当前节点为第133个节点(即索引序号为133),则将其放置在初始参考集合中的位置6;If the current node is the 133rd node (i.e., the index number is 133), then place it at position 6 in the initial reference set;

若当前节点为第134个节点(即索引序号为134),则将其放置在初始参考集合中的位置5;If the current node is the 134th node (i.e., the index number is 134), then place it at position 5 in the initial reference set;

若当前节点为第135个节点(即索引序号为135),则将其放置在初始参考集合中的位置4;If the current node is the 135th node (i.e., the index number is 135), then place it at position 4 in the initial reference set;

以此类推,直到最后一个节点。其中,先进先出可同理类推。And so on until the last node. The same applies to the first-in-first-out.

还需要说明的是,在本申请实施例中,还可以改变在一个预设步长内的放置方式。示例性地,当预设步长等于4时,以循环缓存为例:It should also be noted that in the embodiment of the present application, the placement method within a preset step size can also be changed. For example, when the preset step size is equal to 4, taking the circular cache as an example:

若当前节点为第128个节点(即索引序号为128),则将其放置在初始参考集合中的位置3;If the current node is the 128th node (i.e., the index number is 128), it is placed at position 3 in the initial reference set;

若当前节点为第129个节点(即索引序号为129),则将其放置在初始参考集合中的位置0;If the current node is the 129th node (i.e., the index number is 129), place it at position 0 in the initial reference set;

若当前节点为第130个节点(即索引序号为130),则将其放置在初始参考集合中的位置1;If the current node is the 130th node (i.e., the index number is 130), then place it at position 1 in the initial reference set;

若当前节点为第131个节点(即索引序号为131),则将其放置在初始参考集合中的位置2;If the current node is the 131st node (i.e., the index number is 131), then place it at position 2 in the initial reference set;

若当前节点为第132个节点(即索引序号为132),则将其放置在初始参考集合中的位置7;If the current node is the 132nd node (i.e., the index number is 132), then place it at position 7 in the initial reference set;

若当前节点为第133个节点(即索引序号为133),则将其放置在初始参考集合中的位置4;If the current node is the 133rd node (i.e., the index number is 133), then place it at position 4 in the initial reference set;

若当前节点为第134个节点(即索引序号为134),则将其放置在初始参考集合中的位置5;If the current node is the 134th node (i.e., the index number is 134), then place it at position 5 in the initial reference set;

若当前节点为第135个节点(即索引序号为135),则将其放置在初始参考集合中的位置6;If the current node is the 135th node (i.e., the index number is 135), then place it at position 6 in the initial reference set;

以此类推,直到最后一个节点。其中,先进先出可同理类推。And so on until the last node. The same applies to the first-in-first-out.

在一些实施例中,该方法还可以包括:在索引序号大于或等于预设常数值的情况下,将初始参考集合的队尾位置确定为当前节点在所述初始参考集合中对应的目标位置;In some embodiments, the method may further include: when the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set;

根据初始参考集合对当前节点进行解码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。After decoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.

需要说明的是,在本申请实施例中,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的解码处理之后,可以剔除初始参考集合内队首位置的点,将当前节点加入初始参考集合的队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点,以得到目标参考集合。It should be noted that, in the embodiment of the present application, the head position represents the position in the initial reference set corresponding to the value obtained by performing a modulo operation between the index number of the current node and a preset constant value; the tail position represents the position where the current node is to be placed; therefore, after completing the decoding process of the current node, the point at the head position in the initial reference set can be removed, and the current node can be added to the tail position of the initial reference set; it can also be regarded as replacing the reference node at the head position with the current node to obtain the target reference set.

在一种具体的实施例中,如果基于空间关系搜索到了k个预测节点,那么对当前节点进行解码处理,然后剔除初始参考集合内队首位置的点,将当前节点加入初始参考集合的队尾位置;只有当进入到全局搜索时,才会基于索引序号的奇偶特性在初始参考集合中确定目标位置,然后利用当前节点替换目标位置处的参考节点,以得到目标参考集合。In a specific embodiment, if k predicted nodes are searched based on the spatial relationship, the current node is decoded, and then the point at the head of the initial reference set is removed, and the current node is added to the tail of the initial reference set; only when entering the global search, the target position is determined in the initial reference set based on the parity characteristic of the index number, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

在一些实施例中,初始参考集合可以包括第一初始参考集合和第二初始参考集合;该方法还可以包括:In some embodiments, the initial reference set may include a first initial reference set and a second initial reference set; the method may further include:

根据第一初始参考集合对当前节点进行解码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或After decoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and/or

根据第二初始参考集合对当前节点进行解码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。After decoding the current node according to the second initial reference set, a second target reference set is obtained; wherein the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

在一种具体的实施例中,该方法还可以包括:若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行解码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行解码处理。In a specific embodiment, the method may also include: if the current node uses a spatial relationship search method or a spatial relationship depth-first search method, decoding the current node according to a second initial reference set; if the current node uses a global search method, decoding the current node according to a first initial reference set.

需要说明的是,第一目标参考集合为当前节点在预设解码顺序上的下一节点的第一初始参考集合,可以看做参考范围1;第二目标参考集合为当前节点在预设解码顺序上的下一节点的第二初始参考集合,可以看做参考范围2。也就是说,本申请实施例可以维持两个参考范围,而且参考范围1和参考范围2中的内容一致,但顺序不一致。在这里,参考范围1是基于索引序号的奇偶特性确定目标位置,并利用当前节点替换目标位置处的参考节点来维持的,而参考范围2是基于删除目标位置处的点,并将当前节点放置于队尾位置来维持的;这样能保证参考范围2中的参考节点按照希尔伯特顺序排列,能够加速基于空间关系的查找;因此,在基于空间关系来确定预测节点时,在参考范围2中进行查找;进入全局搜索来确定预测节点时,则在参考范围1中进行查找。It should be noted that the first target reference set is the first initial reference set of the next node of the current node in the preset decoding order, which can be regarded as reference range 1; the second target reference set is the second initial reference set of the next node of the current node in the preset decoding order, which can be regarded as reference range 2. In other words, the embodiment of the present application can maintain two reference ranges, and the contents in reference range 1 and reference range 2 are consistent, but the order is inconsistent. Here, reference range 1 is based on the parity characteristics of the index number to determine the target position, and the current node is used to replace the reference node at the target position to maintain it, while reference range 2 is based on deleting the point at the target position and placing the current node at the end of the queue to maintain it; this ensures that the reference nodes in reference range 2 are arranged in Hilbert order, which can accelerate the search based on spatial relationships; therefore, when determining the predicted node based on the spatial relationship, search in reference range 2; when entering the global search to determine the predicted node, search in reference range 1.

除此之外,在一些实施例中,在对当前节点进行解码处理之后,该方法还可以包括:In addition, in some embodiments, after decoding the current node, the method may further include:

若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置处的参考节点、将当前节点放置于队尾位置的方式维持;If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue;

若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节 点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。If the current node uses a global search method, the first target reference set is determined to be maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.

需要说明的是,本申请实施例可以维持两个参考范围。如果基于空间关系找到了k个预测节点,那么对当前节点进行解码处理,然后参考范围1和参考范围2都是剔除队首位置处的点,将当前节点加入队尾位置来维持的;当进入到全局搜索时,这时候参考范围1是通过索引序号的奇偶特性确定目标位置,并利用当前节点替换目标位置处的参考节点来维持的,而参考范围2则是通过剔除目标位置处的点、将当前节点加入队尾位置来维持的。It should be noted that the embodiment of the present application can maintain two reference ranges. If k predicted nodes are found based on the spatial relationship, the current node is decoded, and then reference range 1 and reference range 2 are maintained by removing the points at the head of the team and adding the current node to the tail of the team; when entering the global search, at this time, reference range 1 determines the target position by the parity of the index number, and uses the current node to replace the reference node at the target position to maintain, while reference range 2 is maintained by removing the points at the target position and adding the current node to the tail of the team.

还需要说明的是,在本申请实施例中,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的解码处理之后,可以剔除队首位置的点,将当前节点加入队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点。It should also be noted that, in the embodiment of the present application, the head position represents the position in the initial reference set corresponding to the value obtained by performing a modulo operation on the index number of the current node and a preset constant value; the tail position represents the position where the current node is to be placed; therefore, after completing the decoding process of the current node, the point at the head position can be removed and the current node can be added to the tail position; it can also be regarded as replacing the reference node at the head position with the current node.

本实施例提供了一种解码方法,通过该解码方法可以实现参考范围的确定,具体地,通过当前节点对应的索引序号的奇偶性来构建参考范围,并在此参考范围内查找预测节点以进行点云属性的帧内预测,既能通过基于空间关系降低编解码效率,又能通过全局搜索提高帧内预测准确性,在编码效率和性能之间取得良好的折中,从而提高点云属性的编解码性能。This embodiment provides a decoding method, through which the reference range can be determined. Specifically, the reference range is constructed by the parity of the index number corresponding to the current node, and the prediction node is searched within the reference range to perform intra-frame prediction of the point cloud attributes. This method can reduce the encoding and decoding efficiency based on spatial relationships and improve the intra-frame prediction accuracy through global search, thereby achieving a good compromise between encoding efficiency and performance, thereby improving the encoding and decoding performance of the point cloud attributes.

在本申请的另一实施例中,参见图10,其示出了本申请实施例提供的一种编码方法的流程示意图。如图10所示,该方法可以包括:In another embodiment of the present application, referring to FIG10 , a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG10 , the method may include:

S1001:确定当前节点对应的索引序号以及初始参考集合。S1001: Determine the index number and initial reference set corresponding to the current node.

需要说明的是,本申请实施例所述的编码方法具体是指点云编码方法,更具体地是一种点云属性的帧内预测方法,用于构建确定预测节点的参考范围。该方法可以应用于点云编码器(也可简称为“编码器”)。It should be noted that the encoding method described in the embodiment of the present application specifically refers to a point cloud encoding method, more specifically, an intra-frame prediction method of a point cloud attribute, which is used to construct a reference range for determining a prediction node. The method can be applied to a point cloud encoder (also referred to as an "encoder").

还需要说明的是,在本申请实施例中,待处理点云包括至少一个节点。其中,对于待处理点云中的节点,在对该节点进行编码时,其可以作为待处理点云中的待编码节点,而且该节点的周围存在有多个已编码节点。在这里,当前节点即是这至少一个节点中当前需要编码的待编码节点。It should also be noted that, in the embodiment of the present application, the point cloud to be processed includes at least one node. Among them, for a node in the point cloud to be processed, when encoding the node, it can be used as a node to be encoded in the point cloud to be processed, and there are multiple encoded nodes around the node. Here, the current node is the node to be encoded that currently needs to be encoded in the at least one node.

进一步地,在本申请实施例中,对于待处理点云中的每一个节点,其对应一个几何信息和一个属性信息;其中,几何信息表征该点的空间关系,属性信息表征该点的属性信息。在这里,属性信息可以为颜色分量,也可以是反射率或者其它属性,本申请实施例不作具体限定。Furthermore, in the embodiment of the present application, for each node in the point cloud to be processed, it corresponds to a geometric information and an attribute information; wherein the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point. Here, the attribute information can be a color component, or a reflectivity or other attribute, which is not specifically limited in the embodiment of the present application.

还需要说明的是,在本申请实施例中,编码器可以按照预设编码顺序对这至少一个节点进行排列,以便确定每一节点对应的索引序号。这样,根据每一节点对应的索引序号,编码器能够按照预设编码顺序处理待处理点云中的每一节点。It should also be noted that, in the embodiment of the present application, the encoder can arrange the at least one node according to a preset coding order so as to determine the index number corresponding to each node. In this way, according to the index number corresponding to each node, the encoder can process each node in the point cloud to be processed according to the preset coding order.

在一些实施例中,预设编码顺序可以为下述其中之一:点云原始顺序、莫顿顺序、希尔伯特顺序等等,本申请实施例不作具体限定。In some embodiments, the preset encoding order may be one of the following: original order of point cloud, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of the present application.

可以理解地,初始参考集合表示每一个节点查找预测节点的初始参考范围,在该范围内的参考节点均为当前节点之前的已编码节点。具体地,假定当前节点的索引序号为i,那么索引序号为0~i-1的节点均为已编码节点,而且初始参考集合就是根据这些已编码节点确定的。It can be understood that the initial reference set represents the initial reference range for each node to search for a prediction node, and the reference nodes within this range are all coded nodes before the current node. Specifically, assuming that the index number of the current node is i, then the nodes with index numbers 0 to i-1 are all coded nodes, and the initial reference set is determined based on these coded nodes.

在一些实施例中,初始参考集合是由N个已编码的参考节点组成;该方法还可以包括:In some embodiments, the initial reference set is composed of N encoded reference nodes; the method may also include:

若当前节点的索引序号大于或等于0且小于预设常数值,则确定N的取值等于当前节点的索引序号;If the index number of the current node is greater than or equal to 0 and less than a preset constant value, then determine that the value of N is equal to the index number of the current node;

若当前节点的索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。If the index number of the current node is greater than or equal to the preset constant value, it is determined that the value of N is equal to the preset constant value.

需要说明的是,在本申请实施例中,每一个节点查找预测节点的初始参考集合的最大值为一固定值,可以用预设常数值表示。换句话说,预设常数值表示初始参考集合包括参考节点个数的最大值。示例性地,预设常数值可以为128,但是并不作具体限定。It should be noted that, in the embodiment of the present application, the maximum value of the initial reference set for each node to search for a prediction node is a fixed value, which can be represented by a preset constant value. In other words, the preset constant value represents the maximum value of the number of reference nodes included in the initial reference set. Exemplarily, the preset constant value can be 128, but it is not specifically limited.

还需要说明的是,在本申请实施例中,N为大于或等于0且小于或等于预设常数值的整数。如果N等于0,那么初始参考集合为空集合;如果N不等于0,那么初始参考集合为非空集合。It should also be noted that, in the embodiment of the present application, N is an integer greater than or equal to 0 and less than or equal to a preset constant value. If N is equal to 0, then the initial reference set is an empty set; if N is not equal to 0, then the initial reference set is a non-empty set.

在一种具体的实施例中,假定预设常数值为128,初始参考集合是由N个已编码的参考节点组成,那么在当前节点为第0~127节点时,即当前节点的索引序号i=0~127,此时N=i;否则,N=128。In a specific embodiment, assuming that the preset constant value is 128, and the initial reference set is composed of N encoded reference nodes, then when the current node is the 0th to 127th node, that is, the index number of the current node i=0~127, then N=i; otherwise, N=128.

S1002:基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置。S1002: Based on the even-odd characteristic of the index number, determine the target position corresponding to the current node in the initial reference set.

S1003:根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。S1003: After encoding the current node according to the initial reference set, the current node is placed at a target position to obtain a target reference set.

需要说明的是,在本申请实施例中,目标参考集合表示当前节点在预设编码顺序上的下一节点对应的初始参考集合。It should be noted that, in the embodiment of the present application, the target reference set represents the initial reference set corresponding to the next node of the current node in the preset coding order.

还需要说明的是,在一些实施例中,在根据初始参考集合对当前节点进行解码处理之后,所述将当前节点放置于目标位置,可以包括:It should also be noted that, in some embodiments, after decoding the current node according to the initial reference set, placing the current node at the target position may include:

在当前节点的索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;When the index number of the current node is greater than or equal to 0 and less than a preset constant value, the current node is directly placed at the target position in the initial reference set;

在当前节点的索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。When the index number of the current node is greater than or equal to the preset constant value, the current node is used to replace the reference node at the target position.

在这里,在本申请实施例中,该方法还可以包括:在当前节点的索引序号大于或等于0且小于预设常数值的情况下,根据初始参考集合对当前节点进行编码处理之后,将当前节点按照预设编码顺序放置于初始参考集合中,得到目标参考集合。Here, in an embodiment of the present application, the method may further include: when the index number of the current node is greater than or equal to 0 and less than a preset constant value, after encoding the current node according to the initial reference set, the current node is placed in the initial reference set according to a preset coding order to obtain a target reference set.

在一些实施例中,所述根据初始参考集合对当前节点进行编码处理,可以包括:In some embodiments, encoding the current node according to the initial reference set may include:

获取当前节点对应的属性原始值;Get the original value of the attribute corresponding to the current node;

根据初始参考集合,确定当前节点对应的属性预测值;According to the initial reference set, determine the attribute prediction value corresponding to the current node;

根据属性原始值和属性预测值,确定当前节点对应的属性残差值;According to the original value of the attribute and the predicted value of the attribute, determine the attribute residual value corresponding to the current node;

对属性残差值进行编码处理,将得到的编码比特写入码流。The attribute residual value is encoded, and the obtained encoded bits are written into the bitstream.

在一种具体的实施例中,所述根据属性原始值和属性预测值,确定当前节点对应的属性残差值,可以包括:对属性原始值和属性预测值进行减法计算,得到当前节点对应的属性残差值。In a specific embodiment, determining the attribute residual value corresponding to the current node according to the attribute original value and the attribute predicted value may include: performing a subtraction calculation on the attribute original value and the attribute predicted value to obtain the attribute residual value corresponding to the current node.

需要说明的是,在本申请实施例中,写入码流中的属性残差值为变换与量化后的残差值。也就是说,对属性残差值进行编码处理,包括对属性残差值进行变换与量化处理,然后再将其按照编码比特写入码流。It should be noted that in the embodiment of the present application, the attribute residual value written into the bitstream is the residual value after transformation and quantization. That is, the attribute residual value is encoded, including transforming and quantizing the attribute residual value, and then writing it into the bitstream according to the encoding bit.

在一些实施例中,所述根据初始参考集合,确定当前节点对应的属性预测值,可以包括:若索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。In some embodiments, determining the attribute prediction value corresponding to the current node based on the initial reference set may include: if the index number is equal to 0, determining that the initial reference set is an empty set, and directly determining the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not equal to 0, determining that the initial reference set is a non-empty set, determining at least one prediction node from the initial reference set, and determining the attribute prediction value corresponding to the current node based on the at least one prediction node.

需要说明的是,当索引序号等于0时,意味着初始参考集合为空集合,这时候不存在预测节点,可以直接将当前节点对应的属性预测值设置为预设属性值。例如,对于颜色属性,预设属性值可以为(128,128,128);对于反射率属性,预设属性值可以为0;在完成对当前节点的编码处理之后,当前节点可以按照预设编码顺序放置于初始参考集合中的队首位置0;或者也可以根据索引序号的奇偶特性将当前节点放置于初始参考集合中的位置1。It should be noted that when the index number is equal to 0, it means that the initial reference set is an empty set. At this time, there is no prediction node, and the attribute prediction value corresponding to the current node can be directly set to the preset attribute value. For example, for the color attribute, the preset attribute value can be (128,128,128); for the reflectivity attribute, the preset attribute value can be 0; after completing the encoding process of the current node, the current node can be placed at the head position 0 in the initial reference set according to the preset encoding order; or the current node can be placed at position 1 in the initial reference set according to the parity characteristic of the index number.

还需要说明的是,当所述索引序号不等于0时,所述从初始参考集合中确定至少一个预测节点,可以包括:It should also be noted that, when the index number is not equal to 0, determining at least one prediction node from the initial reference set may include:

若索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;If the index number is equal to 1, a reference node included in the initial reference set is determined as at least one prediction node;

若索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;If the index number is equal to 2, two reference nodes included in the initial reference set are determined as at least one prediction node;

若当前节点的索引序号大于或等于3,则从初始参考集合中获取与当前节点之间的距离值相对较小的预设数量个参考节点,将预设数量个参考节点确定为至少一个预测节点。If the index number of the current node is greater than or equal to 3, a preset number of reference nodes having relatively small distance values to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as at least one prediction node.

需要说明的是,预设数量可以设置为k;其中,k可以为一固定值(例如,3),也可以为一范围(例如,3~16),本申请实施例并不作具体限定。It should be noted that the preset number can be set to k; wherein k can be a fixed value (for example, 3) or a range (for example, 3 to 16), and the embodiment of the present application does not make any specific limitation.

还需要说明的是,在本申请实施例中,对于当前节点的索引序号大于或等于3的情况,在一种具体的实现方式中,还可以分为两种情况:It should also be noted that in the embodiment of the present application, for the case where the index number of the current node is greater than or equal to 3, in a specific implementation, it can also be divided into two cases:

若索引序号大于或等于3且小于或等于预设常数值,则从初始参考集合中获取当前节点在预设编码顺序上的前m个参考节点,将m个参考节点确定为至少一个预测节点;If the index number is greater than or equal to 3 and less than or equal to a preset constant value, the first m reference nodes of the current node in a preset coding order are obtained from the initial reference set, and the m reference nodes are determined as at least one prediction node;

若索引序号大于预设常数值,则从初始参考集合中获取与当前节点之间的距离值相对较小的k个参考节点,将k个参考节点确定为至少一个预测节点。If the index number is greater than a preset constant value, k reference nodes having relatively small distance values to the current node are obtained from the initial reference set, and the k reference nodes are determined as at least one prediction node.

在这里,m为大于零的整数。通常情况下,m的取值等于3,但是并不作具体限定。Here, m is an integer greater than 0. Usually, the value of m is equal to 3, but it is not specifically limited.

在本申请实施例中,在确定出至少一个预测节点之后,所述根据至少一个预测节点确定当前节点对应的属性预测值,可以包括:In the embodiment of the present application, after determining at least one prediction node, determining the attribute prediction value corresponding to the current node according to the at least one prediction node may include:

获取至少一个预测节点各自的属性重建值;Obtaining a respective attribute reconstruction value of at least one prediction node;

若至少一个预测节点仅包括一个预测节点,则将该预测节点的属性重建值直接确定为当前节点对应的属性预测值;If at least one prediction node includes only one prediction node, the attribute reconstruction value of the prediction node is directly determined as the attribute prediction value corresponding to the current node;

若至少一个预测节点包括至少两个预测节点,则对至少两个预测节点各自的属性重建值进行加权平均计算,得到当前节点对应的属性预测值。If the at least one prediction node includes at least two prediction nodes, a weighted average calculation is performed on the attribute reconstruction values of the at least two prediction nodes to obtain the attribute prediction value corresponding to the current node.

在这里,对于加权平均计算而言,在一种可能的实现方式中,如果权重值均设置为1,那么对至少两个预测节点各自的属性重建值进行加权平均计算,即为对至少两个预测节点各自的属性重建值进行平均值计算。Here, for the weighted average calculation, in a possible implementation, if the weight values are all set to 1, then a weighted average calculation is performed on the attribute reconstruction values of at least two prediction nodes, that is, the average value of the attribute reconstruction values of at least two prediction nodes is calculated.

进一步地,在一些实施例中,在当前节点的索引序号大于预设常数值的情况下,所述从初始参考集合中获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:Further, in some embodiments, when the index number of the current node is greater than a preset constant value, acquiring a preset number of reference nodes having relatively small distance values to the current node from the initial reference set may include:

从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained by global search; or,

从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,From the initial reference set, a preset number of reference nodes with relatively small distance values from the current node are obtained by using a spatial relationship search method; or,

从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点。From the initial reference set, a preset number of reference nodes with relatively small distance values to the current node are obtained by using a spatial relationship depth-first search method.

在一种可能的实现方式中,所述利用全局搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:In a possible implementation, the acquiring a preset number of reference nodes having relatively small distances to the current node by using a global search method may include:

计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的预设数量个距离值;Calculate the distance value between each reference node in the initial reference set and the current node, and select a preset number of distance values with relatively small distance values from the obtained N distance values;

根据预设数量个距离值,确定预设数量个参考节点。According to a preset number of distance values, a preset number of reference nodes is determined.

在一种可能的实现方式中,所述利用空间关系搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:In a possible implementation, the acquiring a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship search method may include:

基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;Based on the spatial relationship between nodes, search for reference nodes that meet the preset conditions from the initial reference set to obtain M reference nodes;

计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;Calculate the distance value between each reference node in the M reference nodes and the current node, select K distance values with relatively small distance values from the obtained M distance values, and determine K reference nodes according to the K distance values;

若K等于预设数量,则将K个参考节点作为预设数量个参考节点。If K is equal to a preset number, K reference nodes are used as the preset number of reference nodes.

在本申请实施例中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。In an embodiment of the present application, the reference nodes that meet the preset conditions include at least: child nodes in the upper layer block of the current node, child nodes in the neighboring block that is coplanar with the upper layer block of the current node, child nodes in the neighboring block that is colinear with the upper layer block of the current node, and child nodes in the neighboring block that is co-pointed with the upper layer block of the current node.

在本申请实施例中,M为大于或等于0的整数,K为大于或等于0且小于或等于M的整数。In the embodiment of the present application, M is an integer greater than or equal to 0, and K is an integer greater than or equal to 0 and less than or equal to M.

这样,基于节点与节点之间的空间关系,可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)自身以及与当前节点的父块(或者,当前节点的祖父块等)共面、共线、共点的邻居块内的子节点,得到M个参考节点;然后从这M个参考节点中确定与当前节点距离最近的k个参考节点,以作为k个预测节点。In this way, based on the spatial relationship between nodes, the parent block of the current node (or the grandparent block of the current node, etc.) itself and the child nodes in the neighboring blocks that are coplanar, colinear, and co-point with the parent block of the current node (or the grandparent block of the current node, etc.) can be searched from the initial reference set to obtain M reference nodes; then, the k reference nodes closest to the current node are determined from these M reference nodes as k prediction nodes.

进一步地,如果待处理点云属于稀疏点云,从这M个参考节点中无法确定出k个预测节点,那么还需要进入全局搜索方式继续搜索参考节点,以便补齐k个预测节点。因此,在一些实施例中,该方法还可以包括:Furthermore, if the point cloud to be processed is a sparse point cloud, and k prediction nodes cannot be determined from the M reference nodes, then it is necessary to enter the global search mode to continue searching for reference nodes in order to complete the k prediction nodes. Therefore, in some embodiments, the method may further include:

若K小于预设数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据预设数量个距离值确定预设数量个参考节点。If K is less than a preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

需要说明的是,在利用空间关系搜索方式确定出M个参考节点之后,如果从M个参考节点中只能选取距离值相对较小的K个参考节点,而且K小于第二数量即没有满足k个预测节点,那么还需要进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,并根据所计算得到的距离值与K个距离值的比较结果来确定距离值相对较小的预设数量个参考节点,从而能够补齐k个预测节点。It should be noted that after determining M reference nodes using the spatial relationship search method, if only K reference nodes with relatively small distance values can be selected from the M reference nodes, and K is less than the second number, that is, the k prediction nodes are not met, then it is necessary to enter the global search method, by calculating the distance value between the reference node in the initial reference set and the current node, and determining a preset number of reference nodes with relatively small distance values based on the comparison result of the calculated distance value and the K distance values, so as to complete the k prediction nodes.

在又一种可能的实现方式中,所述利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点,可以包括:In another possible implementation, the acquiring a preset number of reference nodes having relatively small distance values from the current node by using a spatial relationship depth-first search method may include:

基于节点与节点之间的空间关系,从初始参考集合中搜索当前节点的上层块内的子节点,得到K1个参考节点;Based on the spatial relationship between nodes, search for child nodes in the upper block of the current node from the initial reference set to obtain K1 reference nodes;

计算K1个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值,并根据K2个距离值确定K2个参考节点;Calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values;

若K2等于预设数量,则将K2个参考节点作为预设数量个参考节点;If K2 is equal to the preset number, K2 reference nodes are used as the preset number of reference nodes;

若K2小于预设数量,则继续从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;If K2 is less than the preset number, continue to search for child nodes in neighboring blocks that are coplanar with the upper layer block of the current node from the initial reference set to obtain K3 reference nodes;

计算K3个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K3个距离值和K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据K4个距离值确定K4个参考节点;Calculate the distance value between each reference node in the K3 reference nodes and the current node, and determine K4 distance values with relatively smaller distance values according to the comparison result of the obtained K3 distance values and the K2 distance values, and determine the K4 reference node according to the K4 distance values;

若K4等于预设数量,则将K4个参考节点作为预设数量个参考节点;If K4 is equal to the preset number, K4 reference nodes are used as the preset number of reference nodes;

若K4小于预设数量,则继续从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点, 得到K5个参考节点;If K4 is less than the preset number, continue to search for child nodes in neighboring blocks that are colinear with the upper layer block of the current node from the initial reference set to obtain K5 reference nodes;

计算K5个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K5个距离值和K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据K6个距离值确定K6个参考节点;Calculate the distance value between each reference node in the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values according to the comparison result of the obtained K5 distance values and the K4 distance values, and determine the K6 reference nodes according to the K6 distance values;

若K6等于预设数量,则将K6个参考节点作为预设数量个参考节点;If K6 is equal to the preset number, K6 reference nodes are used as the preset number of reference nodes;

若K6小于预设数量,则继续从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;If K6 is less than the preset number, continue to search for child nodes in neighboring blocks that have common points with the upper layer block of the current node from the initial reference set to obtain K7 reference nodes;

计算K7个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K7个距离值和K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据K8个距离值确定K8个参考节点;Calculate the distance value between each of the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values according to the comparison results of the obtained K7 distance values and the K6 distance values, and determine the K8 reference node according to the K8 distance values;

若K8等于预设数量,则将K8个参考节点作为预设数量个参考节点;If K8 is equal to the preset number, K8 reference nodes are used as the preset number of reference nodes;

若K8小于预设数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K8个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据预设数量个距离值确定预设数量个参考节点。If K8 is less than a preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K8 distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

需要说明的是,在本申请实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。It should be noted that, in the embodiment of the present application, the upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.

还需要说明的是,在本申请实施例中,计算M个参考节点中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。It should also be noted that in the embodiment of the present application, the distance value between each of the M reference nodes and the current node can be calculated by using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application.

还需要说明的是,在本申请实施例中,从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,如果这里存在有多个共面的邻近块,那么这多个共面的邻居块可以一次性进行搜索,也可以依次进行搜索。例如,在依次搜索时,可以先在第一个共面的邻居块内搜索,如果搜索补齐了k个参考节点,那么将不再进行搜索;如果没有补齐k个参考节点,那么再在第二个共面的邻居块内搜索,如果搜索补齐了k个参考节点,那么将不再进行搜索;否则继续在第三个共面的邻居块内搜索等等。同理,对于从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点、从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点也可以如此操作;这里对此不作任何限定。It should also be noted that in the embodiment of the present application, when searching for subnodes in neighbor blocks coplanar with the upper block of the current node from the initial reference set, if there are multiple coplanar neighbor blocks, then these multiple coplanar neighbor blocks can be searched at once or in sequence. For example, when searching in sequence, you can first search in the first coplanar neighbor block. If the search completes k reference nodes, then the search will not be performed; if the k reference nodes are not completed, then search in the second coplanar neighbor block. If the search completes k reference nodes, then the search will not be performed; otherwise, continue to search in the third coplanar neighbor block, and so on. Similarly, the same operation can be applied to searching for subnodes in neighbor blocks colinear with the upper block of the current node from the initial reference set and searching for subnodes in neighbor blocks co-pointed with the upper block of the current node from the initial reference set; no limitation is made here.

这样,在空间关系深度优先搜索方式中,基于节点与节点之间的空间关系,第一步可以先从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)内的子节点,如果没有满足k个预测节点,那么第二步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共面的邻居块内的子节点,如果仍然没有满足k个预测节点,那么第三步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共线的邻居块内的子节点,如果仍然没有满足k个预测节点,那么第四步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共点的邻居块内的子节点,如果前面四步之和都没有满足k个预测节点,那么第五步再进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,以便补齐k个预测节点。In this way, in the spatial relationship depth-first search method, based on the spatial relationship between nodes, the first step is to search the child nodes in the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are not met, then the second step is to search the child nodes in the neighboring blocks coplanar with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the third step is to search the child nodes in the neighboring blocks colinear with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the fourth step is to search the child nodes in the neighboring blocks co-pointed with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the sum of the previous four steps does not meet the k predicted nodes, then the fifth step enters the global search method again, by calculating the distance value between the reference node in the initial reference set and the current node, so as to complete the k predicted nodes.

还可以理解地,在本申请实施例中,需要根据索引序号的奇偶特性来确定当前节点在所述初始参考集合中对应的目标位置,以便在完成对当前节点的编码处理之后,可以利用当前节点替换目标位置处的参考节点。It can also be understood that in an embodiment of the present application, it is necessary to determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number, so that after the encoding processing of the current node is completed, the current node can be used to replace the reference node at the target position.

在一些实施例中,所述基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置,可以包括:从初始参考集合中确定与索引序号的奇偶特性相反且最早放置于初始参考集合中的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining from the initial reference set a target reference node that has the opposite parity characteristic of the index number and is placed earliest in the initial reference set, and determining the position corresponding to the target reference node as the target position.

需要说明的是,以预设常数值为128为例,如果当前节点的索引序号i为偶数,那么目标位置的取值可以等于i与128的余数再加上1;如果当前节点的索引序号i为奇数,那么目标位置的取值可以等于i与128的余数再减去1。示例性地,如果当前节点的索引序号为128,那么目标位置为1;如果当前节点的索引序号为129,那么目标位置为0;等等。It should be noted that, taking the preset constant value of 128 as an example, if the index number i of the current node is an even number, the value of the target position can be equal to the remainder of i and 128 plus 1; if the index number i of the current node is an odd number, the value of the target position can be equal to the remainder of i and 128 minus 1. For example, if the index number of the current node is 128, the target position is 1; if the index number of the current node is 129, the target position is 0; and so on.

在一些实施例中,所述基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置,可以包括:在初始参考集合中,根据预设步长确定最早放置的一组候选参考节点;从一组候选参考节点中确定与索引序号的奇偶特性相反的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining a group of candidate reference nodes that are placed earliest in the initial reference set according to a preset step size; determining a target reference node that has the opposite parity characteristic of the index number from a group of candidate reference nodes, and determining the position corresponding to the target reference node as the target position.

需要说明的是,在本申请实施例中,预设步长是用于确定奇偶特性时所用的步长。预设步长的取值可以变化,例如预设步长可以设置为2,也可以设置为4、8等等,这里不作具体限定。另外,在本申请实施例中,在一个预设步长内,还可以改变在一个预设步长内的放置方式,例如,当预设步长等于4时,若当前节点的索引序号为128、129、130、131,则将其放置在初始参考集合中的位置3、2、1、0;或者也可以将其放置在初始参考集合中的位置3、0、1、2等等,这里也不作具体限定。It should be noted that, in the embodiment of the present application, the preset step size is the step size used to determine the parity characteristic. The value of the preset step size can be changed. For example, the preset step size can be set to 2, or it can be set to 4, 8, etc., which is not specifically limited here. In addition, in the embodiment of the present application, within a preset step size, the placement method within a preset step size can also be changed. For example, when the preset step size is equal to 4, if the index number of the current node is 128, 129, 130, 131, it is placed at position 3, 2, 1, 0 in the initial reference set; or it can also be placed at position 3, 0, 1, 2, etc. in the initial reference set, which is not specifically limited here.

在一些实施例中,该方法还可以包括:在索引序号大于或等于预设常数值的情况下,将初始参考集合的队尾位置确定为当前节点在所述初始参考集合中对应的目标位置;In some embodiments, the method may further include: when the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set;

根据初始参考集合对当前节点进行编码处理之后,删除初始参考集合中队首位置处的参考节点,并 将当前节点放置于目标位置,得到目标参考集合。After encoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.

在一种具体的实施例中,如果基于空间关系搜索到了k个预测节点,那么对当前节点进行编码处理,然后剔除初始参考集合内队首位置的点,将当前节点加入初始参考集合的队尾位置;只有当进入到全局搜索时,才会基于索引序号的奇偶特性在初始参考集合中确定目标位置,然后利用当前节点替换目标位置处的参考节点,以得到目标参考集合。In a specific embodiment, if k prediction nodes are searched based on the spatial relationship, the current node is encoded, and then the point at the head of the initial reference set is removed, and the current node is added to the tail of the initial reference set; only when entering the global search, the target position is determined in the initial reference set based on the parity characteristic of the index number, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

在这里,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的解码处理之后,可以剔除初始参考集合内队首位置的点,将当前节点加入初始参考集合的队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点,以得到目标参考集合。Here, the head position indicates the position in the initial reference set corresponding to the value obtained by performing a modulo operation between the index number of the current node and a preset constant value; the tail position indicates the position where the current node is to be placed; therefore, after the decoding process of the current node is completed, the point at the head position in the initial reference set can be removed, and the current node can be added to the tail position of the initial reference set; it can also be regarded as replacing the reference node at the head position with the current node to obtain the target reference set.

在一些实施例中,初始参考集合包括第一初始参考集合和第二初始参考集合;该方法还可以包括:In some embodiments, the initial reference set includes a first initial reference set and a second initial reference set; the method may further include:

根据第一初始参考集合对当前节点进行编码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或After encoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and/or

根据第二初始参考集合对当前节点进行解码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。After decoding the current node according to the second initial reference set, a second target reference set is obtained; wherein the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

在一种具体的实施例中,该方法还可以包括:若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行编码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行编码处理。In a specific embodiment, the method may also include: if the current node uses a spatial relationship search method or a spatial relationship depth-first search method, encoding the current node according to a second initial reference set; if the current node uses a global search method, encoding the current node according to a first initial reference set.

需要说明的是,第一目标参考集合为当前节点在预设编码顺序上的下一节点的第一初始参考集合,可以看做参考范围1;第二目标参考集合为当前节点在预设编码顺序上的下一节点的第二初始参考集合,可以看做参考范围2。也就是说,本申请实施例可以维持两个参考范围,而且参考范围1和参考范围2中的内容一致,但顺序不一致。在这里,参考范围1是基于索引序号的奇偶特性确定目标位置,并利用当前节点替换目标位置处的参考节点来维持的,而参考范围2是基于删除目标位置处的点,并将当前节点放置于队尾位置来维持的;这样能保证参考范围2中的参考节点按照希尔伯特顺序排列,能够加速基于空间关系的查找;因此,在基于空间关系来确定预测节点时,在参考范围2中进行查找;进入全局搜索来确定预测节点时,则在参考范围1中进行查找。It should be noted that the first target reference set is the first initial reference set of the next node of the current node in the preset coding order, which can be regarded as reference range 1; the second target reference set is the second initial reference set of the next node of the current node in the preset coding order, which can be regarded as reference range 2. In other words, the embodiment of the present application can maintain two reference ranges, and the contents in reference range 1 and reference range 2 are consistent, but the order is inconsistent. Here, reference range 1 is based on the parity characteristics of the index number to determine the target position, and the current node is used to replace the reference node at the target position to maintain it, while reference range 2 is based on deleting the point at the target position and placing the current node at the end of the queue to maintain it; this ensures that the reference nodes in reference range 2 are arranged in Hilbert order, which can accelerate the search based on spatial relationships; therefore, when determining the predicted node based on the spatial relationship, the search is performed in reference range 2; when entering the global search to determine the predicted node, the search is performed in reference range 1.

除此之外,在一些实施例中,在对当前节点进行编码处理之后,该方法还可以包括:In addition, in some embodiments, after encoding the current node, the method may further include:

若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置处的参考节点、将当前节点放置于队尾位置的方式维持;If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue;

若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。If the current node uses a global search method, the first target reference set is maintained by replacing the reference node at the target position with the current node, and the second target reference set is maintained by deleting the reference node at the target position and placing the current node at the end of the queue.

需要说明的是,本申请实施例可以维持两个参考范围。如果基于空间关系找到了k个预测节点,那么对当前节点进行编码处理,然后参考范围1和参考范围2都是剔除队首位置处的点,将当前节点加入队尾位置来维持的;当进入到全局搜索时,这时候参考范围1是通过索引序号的奇偶特性确定目标位置,并利用当前节点替换目标位置处的参考节点来维持的,而参考范围2则是通过剔除目标位置处的点、将当前节点加入队尾位置来维持的。It should be noted that the embodiment of the present application can maintain two reference ranges. If k prediction nodes are found based on the spatial relationship, the current node is encoded, and then reference range 1 and reference range 2 are maintained by removing the points at the head of the team and adding the current node to the tail of the team; when entering the global search, at this time, reference range 1 determines the target position by the parity of the index number, and uses the current node to replace the reference node at the target position to maintain, while reference range 2 is maintained by removing the points at the target position and adding the current node to the tail of the team.

还需要说明的是,在本申请实施例中,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的编码处理之后,可以剔除队首位置的点,将当前节点加入队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点。It should also be noted that, in the embodiment of the present application, the head position represents the position in the initial reference set corresponding to the value obtained by performing a modulo operation between the index number of the current node and a preset constant value; the tail position represents the position where the current node is to be placed; therefore, after completing the encoding processing of the current node, the point at the head position can be removed and the current node can be added to the tail position; it can also be regarded as replacing the reference node at the head position with the current node.

本实施例提供了一种编码方法,通过该编码方法可以实现参考范围的确定,具体地,通过当前节点对应的索引序号的奇偶性来构建参考范围,并在此参考范围内查找预测节点以进行点云属性的帧内预测,既能通过基于空间关系降低编解码效率,又能通过全局搜索提高帧内预测准确性,在编码效率和性能之间取得良好的折中,从而提高点云属性的编解码性能。This embodiment provides a coding method, through which a reference range can be determined. Specifically, a reference range is constructed by the parity of the index number corresponding to the current node, and a prediction node is searched within the reference range to perform intra-frame prediction of point cloud attributes. This method can reduce the encoding and decoding efficiency based on spatial relationships and improve the intra-frame prediction accuracy through global search, thereby achieving a good compromise between coding efficiency and performance, thereby improving the encoding and decoding performance of point cloud attributes.

在本申请的又一实施例中,参见图11,其示出了本申请实施例提供的一种参考范围确定的流程示意图。如图11所示,该流程可以包括:In another embodiment of the present application, referring to FIG11 , a schematic diagram of a process for determining a reference range provided in an embodiment of the present application is shown. As shown in FIG11 , the process may include:

S1101:确定当前节点对应的索引序号以及初始参考集合。S1101: Determine the index number and initial reference set corresponding to the current node.

S1102:根据初始参考集合确定至少一个预测节点,同时确定当前节点放置到初始参考集合内的目标位置。S1102: Determine at least one prediction node according to the initial reference set, and simultaneously determine a target position in which the current node is placed within the initial reference set.

S1103:根据至少一个预测节点对当前节点进行预测,在完成对当前节点的编码/解码处理之后,将当前节点放置于所述确定的目标位置,以得到目标参考集合。S1103: predicting the current node according to at least one prediction node, and after completing the encoding/decoding process of the current node, placing the current node at the determined target position to obtain a target reference set.

需要说明的是,在本申请实施例中,初始参考集合中不包括当前节点,目标参考集合中包括当前节点,而且目标参考集合表示当前节点在预设编码/解码顺序上的下一节点对应的初始参考集合。也就是说,这里的初始参考集合/目标参考集合是用于表征确定预测节点的参考范围,该参考范围是随着当前节点的变化而不断更新的。It should be noted that, in the embodiment of the present application, the initial reference set does not include the current node, the target reference set includes the current node, and the target reference set represents the initial reference set corresponding to the next node of the current node in the preset encoding/decoding order. In other words, the initial reference set/target reference set here is used to characterize the reference range for determining the prediction node, and the reference range is continuously updated as the current node changes.

还需要说明的是,图11所示的参考范围确定流程,既可以应用于编码端,也可以应用于解码端。本申请实施例是在编解码端按照固定的编码/解码顺序(例如,点云原始顺序、莫顿顺序、希尔伯特顺序等)处理点云中的每一个节点,具体实施步骤如下:It should also be noted that the reference range determination process shown in FIG11 can be applied to both the encoding end and the decoding end. In the embodiment of the present application, each node in the point cloud is processed according to a fixed encoding/decoding order (for example, the original order of the point cloud, the Morton order, the Hilbert order, etc.) at the encoding and decoding end. The specific implementation steps are as follows:

步骤1,假定每一个节点搜索预测节点的参考范围最大值为一固定值,例如128,这个参考范围可以是由N个在当前节点之前已编码/解码的参考节点组成,若当前节点为第0~127节点(即其索引序号i=0~127时),则N=i;否则,N=128;Step 1, assuming that the maximum value of the reference range for each node to search for a prediction node is a fixed value, such as 128. This reference range may be composed of N reference nodes that have been encoded/decoded before the current node. If the current node is the 0th to 127th node (i.e., its index number i=0-127), then N=i; otherwise, N=128;

步骤2,在确定参考范围之后,当前节点需要在该参考范围内确定预测节点,与此同时确定当前节点放置到参考范围内的目标位置;Step 2: After determining the reference range, the current node needs to determine the predicted node within the reference range, and at the same time determine the target position where the current node is placed within the reference range;

步骤3,根据预测节点的属性重建值对当前节点进行预测,完成对当前节点的编码/解码,然后将编码/解码后的当前节点放置在步骤2中所确定的参考范围内的目标位置。Step 3: predict the current node according to the attribute reconstruction value of the predicted node, complete the encoding/decoding of the current node, and then place the encoded/decoded current node at the target position within the reference range determined in step 2.

对于步骤2,本申请实施例可以有多种实施方式,下面以三种实施方式为例进行详细描述。For step 2, there may be multiple implementations of the present application embodiment, and three implementations are described in detail below as examples.

第一种实施方式:全局搜索(即全局搜索方式)。The first implementation method: global search (ie, global search method).

假定当前节点为Pi,已编码/解码的参考节点为(P0,P1,…,Pi-1)。Assume that the current node is Pi and the encoded/decoded reference node is (P0, P1, …, Pi-1).

如果i=0,那么参考范围为空,可直接将当前节点的属性预测值设置为固定值(例如,对于颜色属性,可设置为(128,128,128);对于反射率属性,可设置为0),完成编码/解码后,将当前节点加入参考范围的位置1;If i=0, the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128,128,128); for the reflectivity attribute, it can be set to 0). After encoding/decoding is completed, the current node is added to position 1 of the reference range;

如果i=1,参考范围内包含第0节点P0,则直接确定P0为预测节点,完成编码/解码后,将当前节点加入参考范围的位置0;If i=1, the reference range contains the 0th node P0, then P0 is directly determined as the predicted node, and after encoding/decoding is completed, the current node is added to position 0 of the reference range;

如果i=2,参考范围内包含P0和P1,直接确定P0、P1为预测节点,完成编码/解码后,将当前节点加入参考范围的位置3;If i=2, P0 and P1 are included in the reference range, P0 and P1 are directly determined as prediction nodes, and after encoding/decoding is completed, the current node is added to position 3 of the reference range;

如果i>=3,则在参考范围内按照索引序号从大到小(或从小到大)的顺序比较,确定参考范围内的所有节点中与当前节点距离(曼哈顿距离、欧式距离等)最近的k个节点(k可以是固定值3,也可以是一个范围3~16),将这k个点作为当前节点的预测节点,完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作。If i>=3, then compare in order of index numbers from large to small (or small to large) within the reference range to determine the k nodes (k can be a fixed value of 3 or a range of 3 to 16) closest to the current node among all nodes within the reference range. Use these k points as prediction nodes for the current node. After encoding/decoding, if the index number of the current node is less than 128, add the current node to the reference range based on the parity. If the index number of the current node is greater than or equal to 128, replace the earliest node that enters the reference range with an index number that has an opposite parity to the current node with the current node, thereby completing the operation of adding the current node to the reference range.

第二种实施方式:基于空间关系的搜索(即空间关系搜索方式)。The second implementation method: search based on spatial relations (ie spatial relation search method).

假定当前节点为Pi,已编码/解码的参考节点为(P0,P1,…,Pi-1)。Assume that the current node is Pi and the encoded/decoded reference node is (P0, P1, …, Pi-1).

如果i=0,那么参考范围为空,可直接将当前节点的属性预测值设置为固定值(例如,对于颜色属性,可设置为(128,128,128);对于反射率属性,可设置为0),完成编码/解码后,将当前节点加入参考范围的位置1;If i=0, the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128,128,128); for the reflectivity attribute, it can be set to 0). After encoding/decoding is completed, the current node is added to position 1 of the reference range;

如果i=1,参考范围内包含第0节点P0,则直接确定P0为预测节点,完成编码/解码后,将当前节点加入参考范围的位置0;If i=1, the reference range contains the 0th node P0, then P0 is directly determined as the predicted node, and after encoding/decoding is completed, the current node is added to position 0 of the reference range;

如果i=2,参考范围内包含P0和P1,直接确定P0、P1为预测节点,完成编码/解码后,将当前节点加入参考范围的位置3;If i=2, P0 and P1 are included in the reference range, P0 and P1 are directly determined as prediction nodes, and after encoding/decoding is completed, the current node is added to position 3 of the reference range;

如果i>=3,则在参考范围内基于空间关系首先查找当前节点的父块(或当前节点的祖父块等)、以及与当前节点的父块(或当前节点的祖父块等)共面、共线、共点的邻居块内的子节点,在这些子节点内确定与当前节点距离(曼哈顿距离、欧式距离等)最近的k个节点(k可以是固定值3,也可以是一个范围3~16),如果找到k个预测节点,则通过这些预测节点完成编码/解码后,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前点加入参考范围的操作;如果没有找够k个预测节点时,则进入全局搜索的方式,补齐3~16个预测节点,通过这些预测节点完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作。If i>=3, then first search for the parent block of the current node (or the grandparent block of the current node, etc.) and the child nodes in the neighbor blocks that are coplanar, colinear, and co-point with the parent block of the current node (or the grandparent block of the current node, etc.) based on the spatial relationship within the reference range, and determine the k nodes (k can be a fixed value of 3 or a range of 3 to 16) closest to the current node in these child nodes. If k predicted nodes are found, after encoding/decoding is completed through these predicted nodes, the current node is used to replace the parity of the index sequence number with the current node. The node that enters the reference range earliest with the opposite index parity is used, that is, the operation of adding the current point to the reference range is completed; if k prediction nodes are not found, the global search method is entered to fill 3 to 16 prediction nodes. After the encoding/decoding is completed through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity; if the index number of the current node is greater than or equal to 128, the current node is used to replace the node that enters the reference range earliest with the opposite index parity of the current node, that is, the operation of adding the current node to the reference range is completed.

第三种实施方式:基于空间关系的深度优先搜索(即空间关系深度优先搜索方式)。The third implementation method: depth-first search based on spatial relationships (ie, spatial relationship depth-first search method).

假定当前节点为Pi,已编码/解码的参考节点为(P0,P1,…,Pi-1)。Assume that the current node is Pi and the encoded/decoded reference node is (P0, P1, …, Pi-1).

如果i=0,那么参考范围为空,可直接将当前节点的属性预测值设置为固定值(例如,对于颜色属性,可设置为(128,128,128);对于反射率属性,可设置为0),完成编码/解码后,将当前节点加入 参考范围的位置1;If i=0, the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128,128,128); for the reflectivity attribute, it can be set to 0). After encoding/decoding is completed, the current node is added to position 1 of the reference range;

如果i=1,参考范围内包含第0节点P0,则直接确定P0为预测节点,完成编码/解码后,将当前节点加入参考范围的位置0;If i=1, the reference range contains the 0th node P0, then P0 is directly determined as the predicted node, and after encoding/decoding is completed, the current node is added to position 0 of the reference range;

如果i=2,参考范围内包含P0和P1,直接确定P0、P1为预测节点,完成编码/解码后,将当前节点加入参考范围的位置3;If i=2, P0 and P1 are included in the reference range, P0 and P1 are directly determined as prediction nodes, and after encoding/decoding is completed, the current node is added to position 3 of the reference range;

如果i>=3,则在参考范围内基于空间关系首先查找当前节点的父块(或当前节点的祖父块等)内的子节点,在这些子节点内确定与当前节点距离(曼哈顿距离、欧式距离等)最近的k个节点(k可以是固定值3,也可以是一个范围3~16),如果找到k个预测节点,则通过这些预测节点完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作;如果没有找够k个预测节点时,则再在参考范围内基于空间关系查找与当前节点的父块(或当前节点的祖父块等)共面的邻居块内的子节点,补齐3~16个预测节点,通过这些预测节点完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作;如果仍没有找够k个预测节点时,则再在参考范围内基于空间关系查找与当前节点的父块(或当前节点的祖父块等)共线的邻居块内的子节点,补齐3~16个预测节点,通过这些预测节点完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作;如果前三步加起来都没有找够k个预测节点,则再在参考范围内基于空间关系查找与当前节点的父块(或当前节点的祖父块等)共点的邻居块内的子节点,补齐3~16个预测节点,通过这些预测节点完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作;如果前四步加起来都没有找够k个预测节点,则进入全局搜索的方式,补齐3~16个预测节点,通过这些预测节点完成编码/解码后,如果当前节点的索引序号小于128,则根据奇偶性将当前节点加入参考范围中,如果当前节点的索引序号大于或等于128,用当前节点替换与当前节点的索引序号奇偶性相反的最早进入参考范围的节点,即完成将当前节点加入参考范围的操作。If i>=3, then first search for child nodes in the parent block of the current node (or the grandparent block of the current node, etc.) based on the spatial relationship within the reference range, and determine the k nodes (k can be a fixed value of 3 or a range of 3 to 16) closest to the current node in these child nodes. If k predicted nodes are found, after encoding/decoding is completed through these predicted nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is replaced with the node that enters the reference range earliest and has the opposite parity to the index number of the current node, thus completing the operation of adding the current node to the reference range. If not enough k nodes are found, When predicting a node, the child nodes in the neighboring blocks that are coplanar with the parent block of the current node (or the grandparent block of the current node, etc.) are searched based on the spatial relationship within the reference range to fill in 3 to 16 prediction nodes. After encoding/decoding is completed through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is used to replace the node that enters the reference range earliest with the opposite parity of the index number of the current node, that is, the operation of adding the current node to the reference range is completed; if k prediction nodes are still not found, the child nodes in the neighboring blocks that are colinear with the parent block of the current node (or the grandparent block of the current node, etc.) are searched based on the spatial relationship within the reference range to fill in the 3 to 16 prediction nodes. 3 to 16 prediction nodes are collected. After encoding/decoding is completed through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is used to replace the node that enters the reference range earliest with the opposite parity of the index number of the current node, that is, the operation of adding the current node to the reference range is completed; if the first three steps combined do not find enough k prediction nodes, then search for child nodes in neighboring blocks that have common points with the parent block of the current node (or the grandparent block of the current node, etc.) based on spatial relationships within the reference range, and fill in 3 to 16 prediction nodes. After encoding/decoding is completed through these prediction nodes, if the index number of the current node is less than 128, then according to the parity The current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is used to replace the node that enters the reference range earliest and has the opposite parity to the index number of the current node, and the operation of adding the current node to the reference range is completed; if the first four steps combined do not find enough k prediction nodes, enter the global search method to fill 3 to 16 prediction nodes. After encoding/decoding is completed through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is used to replace the node that enters the reference range earliest and has the opposite parity to the index number of the current node, and the operation of adding the current node to the reference range is completed.

需要说明的是,在第二种实施方式和第三种实施方式中,具体的基于空间关系的查找方式描述如下:It should be noted that in the second and third implementations, the specific search method based on spatial relationship is described as follows:

(a)首先依据当前节点在父块(或祖父块等)中所处的方位,确定与其父块(或祖父块等)共面、共线、共点的邻居块,如图8A~图8H示出了当前节点的方位共有八种模式,图9A~图9H示出了在每一种模式下对应的共面、共线、共点的邻居块分布。以希尔伯特码(也可以是莫顿码等)为例,通过当前节点的父块(或祖父块等)的几何坐标,加上一定的偏移量,可以计算出邻居块的几何坐标,通过几何坐标可计算出相应的希尔伯特码,八种模式所对应的偏移量详见前述内容。(a) First, according to the position of the current node in the parent block (or grandparent block, etc.), determine the neighbor blocks that are coplanar, colinear, and co-point with its parent block (or grandparent block, etc.). As shown in Figures 8A to 8H, there are eight modes of the position of the current node, and Figures 9A to 9H show the distribution of coplanar, colinear, and co-point neighbor blocks corresponding to each mode. Taking the Hilbert code (or Morton code, etc.) as an example, the geometric coordinates of the parent block (or grandparent block, etc.) of the current node, plus a certain offset, can be used to calculate the geometric coordinates of the neighbor block, and the corresponding Hilbert code can be calculated through the geometric coordinates. The offsets corresponding to the eight modes are detailed in the above content.

(b)通过比较参考范围内节点的希尔伯特码与邻居块的希尔伯特码,即可确定该节点是否满足共面、共线、共点的条件。(b) By comparing the Hilbert code of the node in the reference range with the Hilbert code of the neighboring block, it can be determined whether the node meets the conditions of coplanarity, colinearity, and copointness.

还需要说明的是,在编码端,根据至少一个预测节点对当前节点进行预测,得到当前节点对应的属性预测值之后,还可以根据属性预测值与当前节点对应的属性原始值计算得到属性残差值,然后需要将属性残差值写入码流以传输到解码端。因此,本申请实施例还提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息至少包括:当前节点对应的属性残差值。It should also be noted that, at the encoding end, after predicting the current node according to at least one prediction node and obtaining the attribute prediction value corresponding to the current node, the attribute residual value can also be calculated according to the attribute prediction value and the attribute original value corresponding to the current node, and then the attribute residual value needs to be written into the bitstream for transmission to the decoding end. Therefore, the embodiment of the present application also provides a bitstream, which is generated by bit encoding according to the information to be encoded; wherein the information to be encoded at least includes: the attribute residual value corresponding to the current node.

这样,属性残差值写入码流由编码端传输到解码端之后,解码端接收码流并解析码流后,可以得到属性残差值;然后解码端以相同过程预测得到属性预测值,将属性预测值与属性残差值相加之后即可得到当前节点对应的属性重建值。In this way, after the attribute residual value is written into the bitstream and transmitted from the encoder to the decoder, the decoder receives and parses the bitstream to obtain the attribute residual value; then the decoder predicts the attribute prediction value using the same process, and adds the attribute prediction value to the attribute residual value to obtain the attribute reconstruction value corresponding to the current node.

通过上述实施例对前述实施例的具体实现进行详细阐述,根据前述实施例的技术方案,从中可以看出,本技术方案提供了一种参考范围的确定方法,基于索引序号的奇偶特性构建包括当前节点在内的目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。The specific implementation of the aforementioned embodiment is elaborated in detail through the above-mentioned embodiment. According to the technical scheme of the aforementioned embodiment, it can be seen that the present technical scheme provides a method for determining a reference range, constructs a target reference set including the current node based on the parity characteristic of the index number, and uses the target reference set to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图12,其示出了本申请实施例提供的一种编码器120的组成结构示意图。如图12所示,该编码器120可以包括:第一确定单元1201和编码单元1202;其中,In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, see FIG12, which shows a schematic diagram of the composition structure of an encoder 120 provided in an embodiment of the present application. As shown in FIG12, the encoder 120 may include: a first determining unit 1201 and an encoding unit 1202; wherein,

第一确定单元1201,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于索引序号 的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;The first determining unit 1201 is configured to determine the index number and the initial reference set corresponding to the current node; and determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number;

编码单元1202,配置为根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。The encoding unit 1202 is configured to place the current node at a target position after encoding the current node according to the initial reference set to obtain a target reference set.

在一些实施例中,第一确定单元1201,还配置为在索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;在索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。In some embodiments, the first determination unit 1201 is also configured to directly place the current node at the target position in the initial reference set when the index number is greater than or equal to 0 and less than a preset constant value; and to use the current node to replace the reference node at the target position when the index number is greater than or equal to a preset constant value.

在一些实施例中,预设常数值表示初始参考集合包括参考节点个数的最大值,目标参考集合表示当前节点在预设编码顺序上的下一节点对应的初始参考集合。In some embodiments, the preset constant value indicates the maximum number of reference nodes included in the initial reference set, and the target reference set indicates the initial reference set corresponding to the next node of the current node in the preset coding order.

在一些实施例中,初始参考集合是由N个已编码的参考节点组成;相应地,第一确定单元1201,还配置为若索引序号大于或等于0且小于预设常数值,则确定N的取值等于索引序号;若索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。In some embodiments, the initial reference set is composed of N encoded reference nodes; accordingly, the first determination unit 1201 is also configured to determine that the value of N is equal to the index number if the index number is greater than or equal to 0 and less than a preset constant value; if the index number is greater than or equal to the preset constant value, determine that the value of N is equal to the preset constant value.

在一些实施例中,参见图12,编码器120还可以包括第一预测单元1203,配置为获取当前节点对应的属性原始值;以及根据初始参考集合,确定当前节点对应的属性预测值;In some embodiments, referring to FIG. 12 , the encoder 120 may further include a first prediction unit 1203 configured to obtain an original value of an attribute corresponding to the current node; and determine a predicted value of an attribute corresponding to the current node according to the initial reference set;

第一确定单元1201,还配置为根据属性原始值和属性预测值,确定当前节点对应的属性残差值;The first determining unit 1201 is further configured to determine the attribute residual value corresponding to the current node according to the attribute original value and the attribute predicted value;

编码单元1202,还配置为对属性残差值进行编码处理,将得到的编码比特写入码流。The encoding unit 1202 is further configured to perform encoding processing on the attribute residual value and write the obtained encoding bits into the bitstream.

在一些实施例中,第一确定单元1201,还配置为对属性原始值和属性预测值进行减法计算,得到当前节点对应的属性残差值。In some embodiments, the first determining unit 1201 is further configured to perform a subtraction calculation on the original value of the attribute and the predicted value of the attribute to obtain the residual value of the attribute corresponding to the current node.

在一些实施例中,第一预测单元1203,还配置为若索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。In some embodiments, the first prediction unit 1203 is further configured to, if the index number is equal to 0, determine that the initial reference set is an empty set, and directly determine the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not equal to 0, determine that the initial reference set is a non-empty set, determine at least one prediction node from the initial reference set, and determine the attribute prediction value corresponding to the current node based on the at least one prediction node.

在一些实施例中,第一确定单元1201,还配置为若索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;若索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;若索引序号大于或等于3,则从初始参考集合中获取与当前节点之间的距离值相对较小的预设数量个参考节点,将预设数量个参考节点确定为至少一个预测节点。In some embodiments, the first determination unit 1201 is further configured to, if the index number is equal to 1, determine a reference node included in the initial reference set as at least one prediction node; if the index number is equal to 2, determine two reference nodes included in the initial reference set as at least one prediction node; if the index number is greater than or equal to 3, obtain a preset number of reference nodes with relatively small distance values from the current node from the initial reference set, and determine the preset number of reference nodes as at least one prediction node.

在一些实施例中,参见图12,编码器120还可以包括第一搜索单元1204,配置为从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点。In some embodiments, referring to FIG. 12 , the encoder 120 may further include a first search unit 1204, configured to obtain a preset number of reference nodes having relatively small distance values from a current node from an initial reference set using a global search method; or, to obtain a preset number of reference nodes having relatively small distance values from a current node from an initial reference set using a spatial relationship search method; or, to obtain a preset number of reference nodes having relatively small distance values from a current node from an initial reference set using a spatial relationship depth-first search method.

在一些实施例中,第一搜索单元1204,还配置为计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的预设数量个距离值;以及根据预设数量个距离值,确定预设数量个参考节点。In some embodiments, the first search unit 1204 is also configured to calculate the distance value between each reference node in the initial reference set and the current node, select a preset number of distance values with relatively small distance values from the obtained N distance values; and determine a preset number of reference nodes based on the preset number of distance values.

在一些实施例中,第一搜索单元1204,还配置为基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;以及计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;以及若K等于预设数量,则将K个参考节点作为预设数量个参考节点;其中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。In some embodiments, the first search unit 1204 is further configured to search for reference nodes that meet preset conditions from an initial reference set based on the spatial relationship between nodes to obtain M reference nodes; and calculate the distance value between each of the M reference nodes and the current node, select K distance values with relatively small distance values from the obtained M distance values, and determine K reference nodes based on the K distance values; and if K is equal to a preset number, use the K reference nodes as the preset number of reference nodes; wherein the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in neighboring blocks that are coplanar with the upper block of the current node, child nodes in neighboring blocks that are colinear with the upper block of the current node, and child nodes in neighboring blocks that are co-pointed with the upper block of the current node.

在一些实施例中,第一搜索单元1204,还配置为若K小于预设数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据预设数量个距离值确定预设数量个参考节点。In some embodiments, the first search unit 1204 is also configured to calculate the distance value between the reference node in the initial reference set and the current node using a global search method if K is less than a preset number, and determine a preset number of distance values with relatively small distance values based on the comparison result between the distance value and the K distance values, and determine a preset number of reference nodes based on the preset number of distance values.

在一些实施例中,第一搜索单元1204,还配置为基于节点与节点之间的空间关系,从所述初始参考集合中搜索所述当前节点的上层块内的子节点,得到K1个参考节点;以及计算所述K1个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值,并根据所述K2个距离值确定所述K2个参考节点;若所述K2等于所述预设数量,则将所述K2个参考节点作为所述预设数量个参考节点;若所述K2小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;以及计算所述K3个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K3个距离值和所述K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据所述K4个距离值确定K4个参考节点;若所述K4等于所述预设数量,则将所述K4个参考节点作为所述预设数量个参考节点;若所述 K4小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;以及计算所述K5个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K5个距离值和所述K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据所述K6个距离值确定K6个参考节点;若所述K6等于所述预设数量,则将所述K6个参考节点作为所述预设数量个参考节点;若所述K6小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;以及计算所述K7个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K7个距离值和所述K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据所述K8个距离值确定K8个参考节点;若所述K8等于所述预设数量,则将所述K8个参考节点作为所述预设数量个参考节点;若所述K8小于所述预设数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K8个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据所述预设数量个距离值确定所述预设数量个参考节点。In some embodiments, the first search unit 1204 is further configured to search for child nodes in the upper layer block of the current node from the initial reference set based on the spatial relationship between nodes to obtain K1 reference nodes; and calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values; if the K2 is equal to the preset number, use the K2 reference nodes as the preset number of reference nodes; If the K2 is less than the preset number, continue to search for child nodes in neighboring blocks coplanar with the upper block of the current node from the initial reference set to obtain K3 reference nodes; and calculate the distance value between each of the K3 reference nodes and the current node, and determine K4 distance values with relatively small distance values based on the comparison results of the obtained K3 distance values and the K2 distance values, and determine K4 reference nodes based on the K4 distance values; if the K4 is equal to the preset number, use the K4 reference nodes as the preset number of reference nodes; if the If K4 is less than the preset number, continue to search for child nodes in neighboring blocks that are colinear with the upper block of the current node from the initial reference set to obtain K5 reference nodes; and calculate the distance value between each of the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values based on the comparison results of the obtained K5 distance values and the K4 distance values, and determine K6 reference nodes based on the K6 distance values; if K6 is equal to the preset number, use the K6 reference nodes as the preset number of reference nodes; if K6 is less than the preset number, continue to search for child nodes in neighboring blocks that are colinear with the upper block of the current node from the initial reference set to obtain K7 reference nodes. point; and calculate the distance value between each reference node in the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values based on the comparison results of the obtained K7 distance values and the K6 distance values, and determine K8 reference nodes based on the K8 distance values; if the K8 is equal to the preset number, then use the K8 reference nodes as the preset number of reference nodes; if the K8 is less than the preset number, calculate the distance value between the reference nodes in the initial reference set and the current node by a global search method, and determine a preset number of distance values with relatively small distance values based on the comparison results of the distance values and the K8 distance values, and determine the preset number of reference nodes based on the preset number of distance values.

在一些实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。In some embodiments, the upper block of the current node includes at least one of the following: the parent block of the current node, the grandparent block of the current node.

在一些实施例中,第一确定单元1201,还配置为从初始参考集合中确定与索引序号的奇偶特性相反且最早放置于初始参考集合中的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, the first determination unit 1201 is further configured to determine from the initial reference set a target reference node that has an opposite parity characteristic to the index number and is placed earliest in the initial reference set, and determine a position corresponding to the target reference node as the target position.

在一些实施例中,第一确定单元1201,还配置为在初始参考集合中,根据预设步长确定最早放置的一组候选参考节点;以及从一组候选参考节点中确定与索引序号的奇偶特性相反的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, the first determination unit 1201 is also configured to determine a group of candidate reference nodes that are placed earliest in the initial reference set according to a preset step size; and determine a target reference node that has an opposite parity characteristic to the index number from a group of candidate reference nodes, and determine the position corresponding to the target reference node as the target position.

在一些实施例中,第一确定单元1201,还配置为在索引序号大于或等于预设常数值的情况下,将初始参考集合的队尾位置确定为当前节点在初始参考集合中对应的目标位置;In some embodiments, the first determining unit 1201 is further configured to determine the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set when the index number is greater than or equal to a preset constant value;

编码单元1202,还配置为根据初始参考集合对当前节点进行编码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。The encoding unit 1202 is further configured to, after encoding the current node according to the initial reference set, delete the reference node at the first position in the initial reference set, and place the current node at the target position to obtain a target reference set.

在一些实施例中,初始参考集合包括第一初始参考集合和第二初始参考集合;相应地,编码单元1202,还配置为根据第一初始参考集合对当前节点进行编码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或,根据第二初始参考集合对当前节点进行编码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。In some embodiments, the initial reference set includes a first initial reference set and a second initial reference set; accordingly, the encoding unit 1202 is also configured to obtain a first target reference set after encoding the current node according to the first initial reference set; wherein the first target reference set is obtained based on replacing the reference node at the target position in the first initial reference set with the current node; and/or, after encoding the current node according to the second initial reference set, the second target reference set is obtained; wherein the second target reference set is obtained based on deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

在一些实施例中,编码单元1202,还配置为若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行编码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行编码处理。In some embodiments, the encoding unit 1202 is further configured to encode the current node according to the second initial reference set if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, the current node is encoded according to the first initial reference set.

在一些实施例中,第一确定单元1201,还配置为在根据第一初始参考集合和/或第二初始参考集合对当前节点进行编码处理之后,若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置处的参考节点、将当前节点放置于队尾位置的方式维持;若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。In some embodiments, the first determination unit 1201 is further configured to, after encoding the current node according to the first initial reference set and/or the second initial reference set, determine that the first target reference set and the second target reference set are both maintained based on deleting the reference node at the head of the queue and placing the current node at the tail of the queue if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, determine that the first target reference set is maintained based on replacing the reference node at the target position with the current node, and that the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the tail of the queue.

可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.

所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器120,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 120. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.

基于上述编码器120的组成以及计算机可读存储介质,参见图13,其示出了本申请实施例提供的编码器120的具体硬件结构示意图。如图13所示,编码器120可以包括:第一通信接口1301、第一存储器1302和第一处理器1303;各个组件通过第一总线系统1304耦合在一起。可理解,第一总线系统 1304用于实现这些组件之间的连接通信。第一总线系统1304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为第一总线系统1304。其中,Based on the composition of the above-mentioned encoder 120 and the computer-readable storage medium, refer to Figure 13, which shows a specific hardware structure diagram of the encoder 120 provided in an embodiment of the present application. As shown in Figure 13, the encoder 120 may include: a first communication interface 1301, a first memory 1302 and a first processor 1303; each component is coupled together through a first bus system 1304. It can be understood that the first bus system 1304 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 1304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the first bus system 1304 in Figure 13. Among them,

第一通信接口1301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 1301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

第一存储器1302,用于存储能够在第一处理器1303上运行的计算机程序;A first memory 1302, used to store a computer program that can be run on the first processor 1303;

第一处理器1303,用于在运行所述计算机程序时,执行:The first processor 1303 is configured to execute, when running the computer program:

确定当前节点对应的索引序号以及初始参考集合;Determine the index number corresponding to the current node and the initial reference set;

基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;Based on the even-odd property of the index number, determine the target position corresponding to the current node in the initial reference set;

根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

可以理解,本申请实施例中的第一存储器1302可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1302旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the first memory 1302 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The first memory 1302 of the system and method described in the present application is intended to include, but is not limited to, these and any other suitable types of memory.

而第一处理器1303可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1303中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1303可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1302,第一处理器1303读取第一存储器1302中的信息,结合其硬件完成上述方法的步骤。The first processor 1303 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 1303. The above-mentioned first processor 1303 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 1302, and the first processor 1303 reads the information in the first memory 1302 and completes the steps of the above method in combination with its hardware.

可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be implemented by a module (such as a process, function, etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in a processor or outside a processor.

可选地,作为另一个实施例,第一处理器1303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the first processor 1303 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

本实施例提供了一种编码器,在该编码器中,基于索引序号的奇偶特性构建目标参考集合,然后利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。This embodiment provides an encoder, in which a target reference set is constructed based on the parity characteristics of index numbers, and then the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图14,其示出了本申请实施例提供的一种解码器140的组成结构示意图。如图14所示,该解码器140可以包括:第二确定单元1401和解码单元1402;其中,In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, refer to FIG14, which shows a schematic diagram of the composition structure of a decoder 140 provided in the embodiment of the present application. As shown in FIG14, the decoder 140 may include: a second determination unit 1401 and a decoding unit 1402; wherein,

第二确定单元1401,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;The second determining unit 1401 is configured to determine the index number and the initial reference set corresponding to the current node; and determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number;

解码单元1402,配置为根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。The decoding unit 1402 is configured to place the current node at a target position after decoding the current node according to the initial reference set to obtain a target reference set.

在一些实施例中,第二确定单元1401,还配置为在索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;在索引序号大于或等于预设常数值的情况下, 利用当前节点替换目标位置处的参考节点。In some embodiments, the second determination unit 1401 is further configured to directly place the current node at the target position in the initial reference set when the index number is greater than or equal to 0 and less than a preset constant value; and to replace the reference node at the target position with the current node when the index number is greater than or equal to a preset constant value.

在一些实施例中,预设常数值表示初始参考集合包括参考节点个数的最大值,目标参考集合表示当前节点在预设解码顺序上的下一节点对应的初始参考集合。In some embodiments, the preset constant value indicates the maximum number of reference nodes included in the initial reference set, and the target reference set indicates the initial reference set corresponding to the next node of the current node in the preset decoding order.

在一些实施例中,初始参考集合是由N个已解码的参考节点组成;方相应地,第二确定单元1401,还配置为若索引序号大于或等于0且小于预设常数值,则确定N的取值等于索引序号;若索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。In some embodiments, the initial reference set consists of N decoded reference nodes; accordingly, the second determination unit 1401 is also configured to determine that the value of N is equal to the index number if the index number is greater than or equal to 0 and less than a preset constant value; if the index number is greater than or equal to the preset constant value, determine that the value of N is equal to the preset constant value.

在一些实施例中,参见图14,解码器140还可以包括第二预测单元1403,配置为根据初始参考集合,确定当前节点对应的属性预测值;In some embodiments, referring to FIG. 14 , the decoder 140 may further include a second prediction unit 1403 configured to determine a predicted attribute value corresponding to the current node according to the initial reference set;

解码单元1402,还配置为解析码流,确定当前节点对应的属性残差值;The decoding unit 1402 is further configured to parse the code stream to determine the attribute residual value corresponding to the current node;

第二确定单元1401,还配置为根据属性残差值和属性预测值,确定当前节点对应的属性重建值。The second determining unit 1401 is further configured to determine the attribute reconstruction value corresponding to the current node according to the attribute residual value and the attribute prediction value.

在一些实施例中,第二确定单元1401,还配置为对属性残差值和属性预测值进行加法计算,得到当前节点对应的属性重建值。In some embodiments, the second determining unit 1401 is further configured to perform addition calculation on the attribute residual value and the attribute prediction value to obtain the attribute reconstruction value corresponding to the current node.

在一些实施例中,第二预测单元1403,还配置为若索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。In some embodiments, the second prediction unit 1403 is further configured to, if the index number is equal to 0, determine that the initial reference set is an empty set, and directly determine the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not equal to 0, determine that the initial reference set is a non-empty set, determine at least one prediction node from the initial reference set, and determine the attribute prediction value corresponding to the current node based on the at least one prediction node.

在一些实施例中,第二确定单元1401,还配置为若索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;若索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;若索引序号大于或等于3,则从初始参考集合中获取与当前节点之间的距离值相对较小的预设数量个参考节点,将预设数量个参考节点确定为至少一个预测节点。In some embodiments, the second determination unit 1401 is further configured to, if the index number is equal to 1, determine a reference node included in the initial reference set as at least one predicted node; if the index number is equal to 2, determine two reference nodes included in the initial reference set as at least one predicted node; if the index number is greater than or equal to 3, obtain a preset number of reference nodes with relatively small distance values from the current node from the initial reference set, and determine the preset number of reference nodes as at least one predicted node.

在一些实施例中,参见图14,解码器140还可以包括第二搜索单元1404,配置为从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点;或者,从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的预设数量个参考节点。In some embodiments, referring to FIG. 14 , the decoder 140 may further include a second search unit 1404, configured to obtain a preset number of reference nodes having relatively small distance values from the current node from the initial reference set using a global search method; or, to obtain a preset number of reference nodes having relatively small distance values from the current node from the initial reference set using a spatial relationship search method; or, to obtain a preset number of reference nodes having relatively small distance values from the current node from the initial reference set using a spatial relationship depth-first search method.

在一些实施例中,第二搜索单元1404,还配置为计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的预设数量个距离值;以及根据预设数量个距离值,确定预设数量个参考节点。In some embodiments, the second search unit 1404 is further configured to calculate the distance value between each reference node in the initial reference set and the current node, select a preset number of distance values with relatively small distance values from the obtained N distance values; and determine a preset number of reference nodes based on the preset number of distance values.

在一些实施例中,第二搜索单元1404,还配置为基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;以及计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;以及若K等于预设数量,则将K个参考节点作为预设数量个参考节点;其中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。In some embodiments, the second search unit 1404 is further configured to search for reference nodes that meet preset conditions from an initial reference set based on the spatial relationship between nodes to obtain M reference nodes; and calculate the distance value between each of the M reference nodes and the current node, select K distance values with relatively small distance values from the obtained M distance values, and determine K reference nodes based on the K distance values; and if K is equal to a preset number, use the K reference nodes as the preset number of reference nodes; wherein the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in neighboring blocks that are coplanar with the upper block of the current node, child nodes in neighboring blocks that are colinear with the upper block of the current node, and child nodes in neighboring blocks that are co-pointed with the upper block of the current node.

在一些实施例中,第二搜索单元1404,还配置为若K小于预设数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据预设数量个距离值确定预设数量个参考节点。In some embodiments, the second search unit 1404 is further configured to calculate the distance value between the reference node in the initial reference set and the current node using a global search method if K is less than a preset number, and determine a preset number of distance values with relatively small distance values based on the comparison result between the distance value and the K distance values, and determine a preset number of reference nodes based on the preset number of distance values.

在一些实施例中,第二搜索单元1404,还配置为基于节点与节点之间的空间关系,从所述初始参考集合中搜索所述当前节点的上层块内的子节点,得到K1个参考节点;以及计算所述K1个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值,并根据所述K2个距离值确定所述K2个参考节点;若所述K2等于所述预设数量,则将所述K2个参考节点作为所述预设数量个参考节点;若所述K2小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;以及计算所述K3个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K3个距离值和所述K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据所述K4个距离值确定K4个参考节点;若所述K4等于所述预设数量,则将所述K4个参考节点作为所述预设数量个参考节点;若所述K4小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;以及计算所述K5个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K5个距离值和所述K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据所述K6个距离值确定K6个参考节点;若所述K6等于所述预设数量,则将所述K6个参考节点作为所述预设数量个参考节点;若所述K6小于所述预设数量,则继续从所述初始参考集合中搜索 与所述当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;以及计算所述K7个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K7个距离值和所述K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据所述K8个距离值确定K8个参考节点;若所述K8等于所述预设数量,则将所述K8个参考节点作为所述预设数量个参考节点;若所述K8小于所述预设数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K8个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据所述预设数量个距离值确定所述预设数量个参考节点。In some embodiments, the second search unit 1404 is further configured to search for child nodes in the upper block of the current node from the initial reference set based on the spatial relationship between nodes to obtain K1 reference nodes; and calculate the distance value between each of the K1 reference nodes and the current node, select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values; if the K2 is equal to the preset number, use the K2 reference nodes as the preset number of reference nodes; if the K2 is less than the preset number, continue to search for child nodes in neighboring blocks coplanar with the upper block of the current node from the initial reference set to obtain K3 reference nodes; and calculate the distance value between each of the K3 reference nodes and the current node, and select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values; The comparison result of K2 distance values determines K4 distance values with relatively small distance values, and K4 reference nodes are determined according to the K4 distance values; if K4 is equal to the preset number, the K4 reference nodes are used as the preset number of reference nodes; if K4 is less than the preset number, the child nodes in the neighboring blocks that are collinear with the upper block of the current node are continued to be searched from the initial reference set to obtain K5 reference nodes; and the distance value between each of the K5 reference nodes and the current node is calculated, and K6 distance values with relatively small distance values are determined according to the comparison result of the obtained K5 distance values and the K4 distance values, and K6 reference nodes are determined according to the K6 distance values; if K6 is equal to the preset number, the K6 reference nodes are used as the preset number of reference nodes; if K6 is less than the preset number, the search from the initial reference set is continued. K7 reference nodes are obtained by using the child nodes in the neighboring blocks that have common points with the upper block of the current node; and the distance value between each of the K7 reference nodes and the current node is calculated, and K8 distance values with relatively small distance values are determined based on the comparison results of the obtained K7 distance values and the K6 distance values, and the K8 reference nodes are determined based on the K8 distance values; if the K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes; if the K8 is less than the preset number, the distance values between the reference nodes in the initial reference set and the current node are calculated using a global search method, and a preset number of distance values with relatively small distance values are determined based on the comparison results of the distance values and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

在一些实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。In some embodiments, the upper block of the current node includes at least one of the following: the parent block of the current node, and the grandparent block of the current node.

在一些实施例中,第二确定单元1401,还配置为从初始参考集合中确定与索引序号的奇偶特性相反且最早放置于初始参考集合中的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, the second determination unit 1401 is further configured to determine from the initial reference set a target reference node that has an opposite parity characteristic to the index number and is placed earliest in the initial reference set, and determine a position corresponding to the target reference node as the target position.

在一些实施例中,第二确定单元1401,还配置为在初始参考集合中,根据预设步长确定最早放置的一组候选参考节点;以及从一组候选参考节点中确定与索引序号的奇偶特性相反的目标参考节点,将目标参考节点对应的位置确定为目标位置。In some embodiments, the second determination unit 1401 is further configured to determine a group of candidate reference nodes that are placed earliest in the initial reference set according to a preset step size; and determine a target reference node that has an opposite parity characteristic to the index number from a group of candidate reference nodes, and determine the position corresponding to the target reference node as the target position.

在一些实施例中,第二确定单元1401,还配置为在索引序号大于或等于预设常数值的情况下,将初始参考集合的队尾位置确定为当前节点在初始参考集合中对应的目标位置;In some embodiments, the second determining unit 1401 is further configured to determine the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set when the index number is greater than or equal to a preset constant value;

解码单元1402,还配置为根据初始参考集合对当前节点进行解码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。The decoding unit 1402 is further configured to, after decoding the current node according to the initial reference set, delete the reference node at the first position in the initial reference set, and place the current node at the target position to obtain the target reference set.

在一些实施例中,初始参考集合包括第一初始参考集合和第二初始参考集合;相应地,解码单元1402,还配置为根据第一初始参考集合对当前节点进行解码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或,根据第二初始参考集合对当前节点进行解码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。In some embodiments, the initial reference set includes a first initial reference set and a second initial reference set; accordingly, the decoding unit 1402 is also configured to obtain a first target reference set after decoding the current node according to the first initial reference set; wherein the first target reference set is obtained based on replacing the reference node at the target position in the first initial reference set with the current node; and/or, after decoding the current node according to the second initial reference set, the second target reference set is obtained; wherein the second target reference set is obtained based on deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

在一些实施例中,解码单元1402,还配置为若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行解码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行解码处理。In some embodiments, the decoding unit 1402 is further configured to decode the current node according to the second initial reference set if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, then the current node is decoded according to the first initial reference set.

在一些实施例中,第二确定单元1401,还配置为在根据第一初始参考集合和/或第二初始参考集合对当前节点进行解码处理之后,若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置处的参考节点、将当前节点放置于队尾位置的方式维持;若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。In some embodiments, the second determination unit 1401 is further configured to, after decoding the current node according to the first initial reference set and/or the second initial reference set, determine that the first target reference set and the second target reference set are both maintained based on deleting the reference node at the head of the queue and placing the current node at the tail of the queue if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, determine that the first target reference set is maintained based on replacing the reference node at the target position with the current node, and that the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the tail of the queue.

可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.

所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器140,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 140, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.

基于上述解码器140的组成以及计算机可读存储介质,参见图15,其示出了本申请实施例提供的解码器140的具体硬件结构示意图。如图15所示,解码器140可以包括:第二通信接口1501、第二存储器1502和第二处理器1503;各个组件通过第二总线系统1504耦合在一起。可理解,第二总线系统1504用于实现这些组件之间的连接通信。第二总线系统1504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图15中将各种总线都标为第二总线系统1504。其中,Based on the composition of the above-mentioned decoder 140 and the computer-readable storage medium, refer to Figure 15, which shows a specific hardware structure diagram of the decoder 140 provided in an embodiment of the present application. As shown in Figure 15, the decoder 140 may include: a second communication interface 1501, a second memory 1502 and a second processor 1503; each component is coupled together through a second bus system 1504. It can be understood that the second bus system 1504 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 1504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the second bus system 1504 in Figure 15. Among them,

第二通信接口1501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The second communication interface 1501 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

第二存储器1502,用于存储能够在第二处理器1503上运行的计算机程序;The second memory 1502 is used to store a computer program that can be run on the second processor 1503;

第二处理器1503,用于在运行所述计算机程序时,执行:The second processor 1503 is configured to, when running the computer program, execute:

确定当前节点对应的索引序号以及初始参考集合;Determine the index number corresponding to the current node and the initial reference set;

基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;Based on the even-odd property of the index number, determine the target position corresponding to the current node in the initial reference set;

根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

可选地,作为另一个实施例,第二处理器1503还配置为在运行所述计算机程序时,执行前述实施 例中任一项所述的方法。Optionally, as another embodiment, the second processor 1503 is also configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

可以理解,第二存储器1502与第一存储器1302的硬件功能类似,第二处理器1503与第一处理器1303的硬件功能类似;这里不再详述。It can be understood that the hardware functions of the second memory 1502 and the first memory 1302 are similar, and the hardware functions of the second processor 1503 and the first processor 1303 are similar; they will not be described in detail here.

本实施例提供了一种解码器,在该解码器中,基于索引序号的奇偶特性构建目标参考集合,然后利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。This embodiment provides a decoder, in which a target reference set is constructed based on the parity characteristics of the index sequence number, and then the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

工业实用性Industrial Applicability

本申请实施例中,在编码端或解码端,确定当前节点对应的索引序号以及初始参考集合;基于索引序号的奇偶特性,确定当前节点在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行编码/解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,基于索引序号的奇偶特性构建包括当前节点在内的目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。In an embodiment of the present application, at the encoding end or the decoding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after encoding/decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set. In this way, a target reference set including the current node is constructed based on the parity characteristics of the index number, and the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

Claims (46)

Translated fromChinese
一种解码方法,应用于解码器,所述方法包括:A decoding method, applied to a decoder, comprising:确定当前节点对应的索引序号以及初始参考集合;Determine the index number and initial reference set corresponding to the current node;基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置;Based on the parity characteristic of the index sequence number, determining the target position corresponding to the current node in the initial reference set;根据所述初始参考集合对所述当前节点进行解码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set.根据权利要求1所述的方法,其中,根据所述初始参考集合对所述当前节点进行解码处理之后,所述将所述当前节点放置于所述目标位置,包括:The method according to claim 1, wherein after decoding the current node according to the initial reference set, placing the current node at the target position comprises:在所述索引序号大于或等于0且小于预设常数值的情况下,直接将所述当前节点放置于所述初始参考集合中的所述目标位置;When the index number is greater than or equal to 0 and less than a preset constant value, directly placing the current node at the target position in the initial reference set;在所述索引序号大于或等于预设常数值的情况下,利用所述当前节点替换所述目标位置处的参考节点。When the index number is greater than or equal to a preset constant value, the reference node at the target position is replaced by the current node.根据权利要求2所述的方法,其中,所述预设常数值表示所述初始参考集合包括参考节点个数的最大值,所述目标参考集合表示所述当前节点在预设解码顺序上的下一节点对应的初始参考集合。The method according to claim 2, wherein the preset constant value represents the maximum value of the number of reference nodes included in the initial reference set, and the target reference set represents the initial reference set corresponding to the next node of the current node in a preset decoding order.根据权利要求2所述的方法,其中,所述初始参考集合是由N个已解码的参考节点组成;所述方法还包括:The method according to claim 2, wherein the initial reference set consists of N decoded reference nodes; the method further comprising:若所述索引序号大于或等于0且小于预设常数值,则确定N的取值等于所述索引序号;If the index number is greater than or equal to 0 and less than a preset constant value, determine that the value of N is equal to the index number;若所述索引序号大于或等于预设常数值,则确定N的取值等于所述预设常数值。If the index number is greater than or equal to a preset constant value, it is determined that the value of N is equal to the preset constant value.根据权利要求4所述的方法,其中,所述根据所述初始参考集合对所述当前节点进行解码处理,包括:The method according to claim 4, wherein the decoding process of the current node according to the initial reference set comprises:解析码流,确定所述当前节点对应的属性残差值;Parse the code stream to determine the attribute residual value corresponding to the current node;根据所述初始参考集合,确定所述当前节点对应的属性预测值;Determining, according to the initial reference set, a predicted attribute value corresponding to the current node;根据所述属性残差值和所述属性预测值,确定所述当前节点对应的属性重建值。The attribute reconstruction value corresponding to the current node is determined according to the attribute residual value and the attribute prediction value.根据权利要求5所述的方法,其中,所述根据所述属性残差值和所述属性预测值,确定所述当前节点对应的属性重建值,包括:The method according to claim 5, wherein determining the attribute reconstruction value corresponding to the current node according to the attribute residual value and the attribute prediction value comprises:对所述属性残差值和所述属性预测值进行加法计算,得到所述当前节点对应的属性重建值。The attribute residual value and the attribute prediction value are added to obtain the attribute reconstruction value corresponding to the current node.根据权利要求5所述的方法,其中,所述根据所述初始参考集合,确定所述当前节点对应的属性预测值,包括:The method according to claim 5, wherein determining the attribute prediction value corresponding to the current node according to the initial reference set comprises:若所述索引序号等于0,则确定所述初始参考集合为空集合,将预设属性值直接确定为所述当前节点对应的属性预测值;If the index number is equal to 0, the initial reference set is determined to be an empty set, and the preset attribute value is directly determined as the attribute prediction value corresponding to the current node;若所述索引序号不等于0,则确定所述初始参考集合为非空集合,从所述初始参考集合中确定至少一个预测节点,根据所述至少一个预测节点确定所述当前节点对应的属性预测值。If the index number is not equal to 0, the initial reference set is determined to be a non-empty set, at least one prediction node is determined from the initial reference set, and the attribute prediction value corresponding to the current node is determined according to the at least one prediction node.根据权利要求7所述的方法,其中,当所述索引序号不等于0时,所述从所述初始参考集合中确定至少一个预测节点,包括:The method according to claim 7, wherein when the index number is not equal to 0, determining at least one prediction node from the initial reference set comprises:若所述索引序号等于1,则将所述初始参考集合中包括的一个参考节点确定为所述至少一个预测节点;If the index number is equal to 1, a reference node included in the initial reference set is determined as the at least one prediction node;若所述索引序号等于2,则将所述初始参考集合中包括的两个参考节点确定为所述至少一个预测节点;If the index number is equal to 2, two reference nodes included in the initial reference set are determined as the at least one prediction node;若所述索引序号大于或等于3,则从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,将所述预设数量个参考节点确定为所述至少一个预测节点。If the index number is greater than or equal to 3, a preset number of reference nodes having relatively small distance values to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as the at least one prediction node.根据权利要求8所述的方法,其中,所述从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 8, wherein the obtaining, from the initial reference set, a preset number of reference nodes having relatively small distance values to the current node comprises:从所述初始参考集合中,利用全局搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点;或者,A preset number of reference nodes having relatively small distances to the current node are obtained from the initial reference set by using a global search method; or,从所述初始参考集合中,利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点;或者,From the initial reference set, a preset number of reference nodes having relatively small distance values from the current node are obtained by using a spatial relationship search method; or,从所述初始参考集合中,利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点。A preset number of reference nodes having relatively small distance values to the current node are acquired from the initial reference set by using a spatial relationship depth-first search method.根据权利要求9所述的方法,其中,所述利用全局搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 9, wherein the step of obtaining a preset number of reference nodes having relatively small distance values from the current node by using a global search method comprises:计算所述初始参考集合中每一个参考节点与所述当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的预设数量个距离值;Calculating the distance value between each reference node in the initial reference set and the current node, and selecting a preset number of distance values with relatively small distance values from the obtained N distance values;根据所述预设数量个距离值,确定所述预设数量个参考节点。The preset number of reference nodes is determined according to the preset number of distance values.根据权利要求9所述的方法,其中,所述利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 9, wherein the step of obtaining a preset number of reference nodes having relatively small distance values from the current node by using a spatial relationship search method comprises:基于节点与节点之间的空间关系,从所述初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;Based on the spatial relationship between nodes, searching for reference nodes that meet preset conditions from the initial reference set to obtain M reference nodes;计算所述M个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据所述K个距离值确定K个参考节点;Calculating the distance value between each reference node in the M reference nodes and the current node, selecting K distance values with relatively small distance values from the obtained M distance values, and determining K reference nodes according to the K distance values;若所述K等于所述预设数量,则将所述K个参考节点作为所述预设数量个参考节点;If K is equal to the preset number, the K reference nodes are used as the preset number of reference nodes;其中,所述符合预设条件的参考节点,至少包括:所述当前节点的上层块内的子节点、与所述当前节点的上层块共面的邻居块内的子节点、与所述当前节点的上层块共线的邻居块内的子节点和与所述当前节点的上层块共点的邻居块内的子节点。Among them, the reference nodes that meet the preset conditions include at least: child nodes in the upper layer block of the current node, child nodes in the neighboring block coplanar with the upper layer block of the current node, child nodes in the neighboring block colinear with the upper layer block of the current node, and child nodes in the neighboring block copoint with the upper layer block of the current node.根据权利要求11所述的方法,其中,所述方法还包括:The method according to claim 11, wherein the method further comprises:若所述K小于所述预设数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据所述预设数量个距离值确定所述预设数量个参考节点。If K is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K distance values, and the preset number of reference nodes are determined based on the preset number of distance values.根据权利要求9所述的方法,其中,所述利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 9, wherein the step of acquiring a preset number of reference nodes having relatively small distance values from the current node by using a spatial relationship depth-first search method comprises:基于节点与节点之间的空间关系,从所述初始参考集合中搜索所述当前节点的上层块内的子节点,得到K1个参考节点;Based on the spatial relationship between nodes, searching for child nodes in the upper layer block of the current node from the initial reference set to obtain K1 reference nodes;计算所述K1个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值,并根据所述K2个距离值确定所述K2个参考节点;Calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values;若所述K2等于所述预设数量,则将所述K2个参考节点作为所述预设数量个参考节点;If K2 is equal to the preset number, the K2 reference nodes are used as the preset number of reference nodes;若所述K2小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;If K2 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks coplanar with the upper layer block of the current node to obtain K3 reference nodes;计算所述K3个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K3个距离值和所述K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据所述K4个距离值确定K4个参考节点;Calculate the distance value between each of the K3 reference nodes and the current node, and determine K4 distance values with relatively small distance values according to the comparison result of the obtained K3 distance values and the K2 distance values, and determine the K4 reference node according to the K4 distance values;若所述K4等于所述预设数量,则将所述K4个参考节点作为所述预设数量个参考节点;If the K4 is equal to the preset number, the K4 reference nodes are used as the preset number of reference nodes;若所述K4小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;If the K4 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are colinear with the upper layer block of the current node to obtain K5 reference nodes;计算所述K5个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K5个距离值和所述K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据所述K6个距离值确定K6个参考节点;Calculate the distance value between each of the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values according to the comparison result of the obtained K5 distance values and the K4 distance values, and determine K6 reference nodes according to the K6 distance values;若所述K6等于所述预设数量,则将所述K6个参考节点作为所述预设数量个参考节点;If the K6 is equal to the preset number, the K6 reference nodes are used as the preset number of reference nodes;若所述K6小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;If the K6 is less than the preset number, continue to search the initial reference set for child nodes in neighboring blocks that have common points with the upper layer block of the current node to obtain K7 reference nodes;计算所述K7个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K7个距离值和所述K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据所述K8个距离值确定K8个参考节点;Calculate the distance value between each of the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values according to the comparison result of the obtained K7 distance values and the K6 distance values, and determine the K8 reference node according to the K8 distance values;若所述K8等于所述预设数量,则将所述K8个参考节点作为所述预设数量个参考节点;If the K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes;若所述K8小于所述预设数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K8个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据所述预设数量个距离值确定所述预设数量个参考节点。If the K8 is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.根据权利要求11至13任一项所述的方法,其中,所述当前节点的上层块至少包括下述其中之一:所述当前节点的父块、所述当前节点的祖父块。The method according to any one of claims 11 to 13, wherein the upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.根据权利要求1所述的方法,其中,所述基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置,包括:The method according to claim 1, wherein determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index sequence number comprises:从所述初始参考集合中确定与所述索引序号的奇偶特性相反且最早放置于所述初始参考集合中的目标参考节点,将所述目标参考节点对应的位置确定为所述目标位置。A target reference node which has an odd-even characteristic opposite to that of the index number and is placed earliest in the initial reference set is determined from the initial reference set, and a position corresponding to the target reference node is determined as the target position.根据权利要求1所述的方法,其中,所述基于所述索引序号的奇偶特性,确定所述当前节点在 所述初始参考集合中对应的目标位置,包括:The method according to claim 1, wherein the determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index sequence number comprises:在所述初始参考集合中,根据预设步长确定最早放置的一组候选参考节点;In the initial reference set, determining a set of candidate reference nodes to be placed earliest according to a preset step size;从所述一组候选参考节点中确定与所述索引序号的奇偶特性相反的目标参考节点,将所述目标参考节点对应的位置确定为所述目标位置。A target reference node having an odd-even characteristic opposite to that of the index number is determined from the group of candidate reference nodes, and a position corresponding to the target reference node is determined as the target position.根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:在所述索引序号大于或等于预设常数值的情况下,将所述初始参考集合的队尾位置确定为所述当前节点在所述初始参考集合中对应的目标位置;When the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set;根据所述初始参考集合对所述当前节点进行解码处理之后,删除所述初始参考集合中队首位置处的参考节点,并将所述当前节点放置于所述目标位置,得到所述目标参考集合。After decoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.根据权利要求1所述的方法,其中,所述初始参考集合包括第一初始参考集合和第二初始参考集合;所述方法还包括:The method according to claim 1, wherein the initial reference set comprises a first initial reference set and a second initial reference set; the method further comprises:根据所述第一初始参考集合对所述当前节点进行解码处理之后,得到第一目标参考集合;其中,所述第一目标参考集合是基于所述当前节点替换所述第一初始参考集合中所述目标位置处的参考节点得到的;和/或After decoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and/or根据所述第二初始参考集合对所述当前节点进行解码处理之后,得到第二目标参考集合;其中,所述第二目标参考集合是基于删除所述第二初始参考集合中所述目标位置处的参考节点、将所述当前节点放置于队尾位置得到的。After decoding the current node according to the second initial reference set, a second target reference set is obtained; wherein the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.根据权利要求18所述的方法,其中,所述方法还包括:The method according to claim 18, wherein the method further comprises:若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据所述第二初始参考集合对所述当前节点进行解码处理;If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, decoding the current node according to the second initial reference set;若所述当前节点使用全局搜索方式,则根据所述第一初始参考集合对所述当前节点进行解码处理。If the current node uses a global search method, the current node is decoded according to the first initial reference set.根据权利要求18所述的方法,其中,所述方法还包括:The method according to claim 18, wherein the method further comprises:若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定所述第一目标参考集合和所述第二目标参考集合均是基于删除队首位置处的参考节点、将所述当前节点放置于队尾位置的方式维持;If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue;若所述当前节点使用全局搜索方式,则确定所述第一目标参考集合是基于所述当前节点替换所述目标位置处的参考节点的方式维持,所述第二目标参考集合是基于删除所述目标位置处的参考节点、将所述当前节点放置于队尾位置的方式维持。If the current node uses a global search method, it is determined that the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.一种编码方法,应用于编码器,所述方法包括:A coding method, applied to an encoder, comprising:确定当前节点对应的索引序号以及初始参考集合;Determine the index number corresponding to the current node and the initial reference set;基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置;Based on the parity characteristic of the index sequence number, determining the target position corresponding to the current node in the initial reference set;根据所述初始参考集合对所述当前节点进行编码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set.根据权利要求21所述的方法,其中,根据所述初始参考集合对所述当前节点进行编码处理之后,所述将所述当前节点放置于所述目标位置,包括:The method according to claim 21, wherein after encoding the current node according to the initial reference set, placing the current node at the target position comprises:在所述索引序号大于或等于0且小于预设常数值的情况下,直接将所述当前节点放置于所述初始参考集合中的所述目标位置;When the index number is greater than or equal to 0 and less than a preset constant value, directly placing the current node at the target position in the initial reference set;在所述索引序号大于或等于预设常数值的情况下,利用所述当前节点替换所述目标位置处的参考节点。When the index number is greater than or equal to a preset constant value, the reference node at the target position is replaced by the current node.根据权利要求22所述的方法,其中,所述预设常数值表示所述初始参考集合包括参考节点个数的最大值,所述目标参考集合表示所述当前节点在预设编码顺序上的下一节点对应的初始参考集合。The method according to claim 22, wherein the preset constant value represents the maximum number of reference nodes included in the initial reference set, and the target reference set represents the initial reference set corresponding to the next node of the current node in a preset coding order.根据权利要求22所述的方法,其中,所述初始参考集合是由N个已编码的参考节点组成;所述方法还包括:The method according to claim 22, wherein the initial reference set consists of N encoded reference nodes; the method further comprising:若所述索引序号大于或等于0且小于预设常数值,则确定N的取值等于所述索引序号;If the index number is greater than or equal to 0 and less than a preset constant value, determine that the value of N is equal to the index number;若所述索引序号大于或等于预设常数值,则确定N的取值等于所述预设常数值。If the index number is greater than or equal to a preset constant value, it is determined that the value of N is equal to the preset constant value.根据权利要求24所述的方法,其中,所述根据所述初始参考集合对所述当前节点进行编码处理,包括:The method according to claim 24, wherein the encoding processing of the current node according to the initial reference set comprises:获取所述当前节点对应的属性原始值;Get the original value of the attribute corresponding to the current node;根据所述初始参考集合,确定所述当前节点对应的属性预测值;Determining, according to the initial reference set, a predicted attribute value corresponding to the current node;根据所述属性原始值和所述属性预测值,确定所述当前节点对应的属性残差值;Determine the attribute residual value corresponding to the current node according to the attribute original value and the attribute predicted value;对所述属性残差值进行编码处理,将得到的编码比特写入码流。The attribute residual value is encoded, and the obtained encoded bits are written into a bit stream.根据权利要求25所述的方法,其中,所述根据所述属性原始值和所述属性预测值,确定所述 当前节点对应的属性残差值,包括:The method according to claim 25, wherein the determining the attribute residual value corresponding to the current node according to the attribute original value and the attribute predicted value comprises:对所述属性原始值和所述属性预测值进行减法计算,得到所述当前节点对应的属性残差值。Subtract the original attribute value from the predicted attribute value to obtain the attribute residual value corresponding to the current node.根据权利要求25所述的方法,其中,所述根据所述初始参考集合,确定所述当前节点对应的属性预测值,包括:The method according to claim 25, wherein determining the attribute prediction value corresponding to the current node according to the initial reference set comprises:若所述索引序号等于0,则确定所述初始参考集合为空集合,将预设属性值直接确定为所述当前节点对应的属性预测值;If the index number is equal to 0, the initial reference set is determined to be an empty set, and the preset attribute value is directly determined as the attribute prediction value corresponding to the current node;若所述索引序号不等于0,则确定所述初始参考集合为非空集合,从所述初始参考集合中确定至少一个预测节点,根据所述至少一个预测节点确定所述当前节点对应的属性预测值。If the index number is not equal to 0, the initial reference set is determined to be a non-empty set, at least one prediction node is determined from the initial reference set, and the attribute prediction value corresponding to the current node is determined according to the at least one prediction node.根据权利要求27所述的方法,其中,当所述索引序号不等于0时,所述从所述初始参考集合中确定至少一个预测节点,包括:The method according to claim 27, wherein when the index number is not equal to 0, determining at least one prediction node from the initial reference set comprises:若所述索引序号等于1,则将所述初始参考集合中包括的一个参考节点确定为所述至少一个预测节点;If the index number is equal to 1, a reference node included in the initial reference set is determined as the at least one prediction node;若所述索引序号等于2,则将所述初始参考集合中包括的两个参考节点确定为所述至少一个预测节点;If the index number is equal to 2, two reference nodes included in the initial reference set are determined as the at least one prediction node;若所述索引序号大于或等于3,则从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,将所述预设数量个参考节点确定为所述至少一个预测节点。If the index number is greater than or equal to 3, a preset number of reference nodes having relatively small distance values to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as the at least one prediction node.根据权利要求28所述的方法,其中,所述从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 28, wherein the obtaining, from the initial reference set, a preset number of reference nodes having relatively small distance values to the current node comprises:从所述初始参考集合中,利用全局搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点;或者,A preset number of reference nodes having relatively small distances to the current node are obtained from the initial reference set by using a global search method; or,从所述初始参考集合中,利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点;或者,From the initial reference set, a preset number of reference nodes having relatively small distance values from the current node are obtained by using a spatial relationship search method; or,从所述初始参考集合中,利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点。A preset number of reference nodes having relatively small distance values to the current node are acquired from the initial reference set by using a spatial relationship depth-first search method.根据权利要求29所述的方法,其中,所述利用全局搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 29, wherein the step of obtaining a preset number of reference nodes having relatively small distance values from the current node by using a global search method comprises:计算所述初始参考集合中每一个参考节点与所述当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的预设数量个距离值;Calculating the distance value between each reference node in the initial reference set and the current node, and selecting a preset number of distance values with relatively small distance values from the obtained N distance values;根据所述预设数量个距离值,确定所述预设数量个参考节点。The preset number of reference nodes is determined according to the preset number of distance values.根据权利要求29所述的方法,其中,所述利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 29, wherein the step of obtaining a preset number of reference nodes having relatively small distance values from the current node by using a spatial relationship search method comprises:基于节点与节点之间的空间关系,从所述初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;Based on the spatial relationship between nodes, searching for reference nodes that meet preset conditions from the initial reference set to obtain M reference nodes;计算所述M个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据所述K个距离值确定K个参考节点;Calculating the distance value between each reference node in the M reference nodes and the current node, selecting K distance values with relatively small distance values from the obtained M distance values, and determining K reference nodes according to the K distance values;若所述K等于所述预设数量,则将所述K个参考节点作为所述预设数量个参考节点;If K is equal to the preset number, the K reference nodes are used as the preset number of reference nodes;其中,所述符合预设条件的参考节点,至少包括:所述当前节点的上层块内的子节点、与所述当前节点的上层块共面的邻居块内的子节点、与所述当前节点的上层块共线的邻居块内的子节点和与所述当前节点的上层块共点的邻居块内的子节点。Among them, the reference nodes that meet the preset conditions include at least: child nodes in the upper layer block of the current node, child nodes in the neighboring block coplanar with the upper layer block of the current node, child nodes in the neighboring block colinear with the upper layer block of the current node, and child nodes in the neighboring block copoint with the upper layer block of the current node.根据权利要求31所述的方法,其中,所述方法还包括:The method according to claim 31, wherein the method further comprises:若所述K小于所述预设数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据所述预设数量个距离值确定所述预设数量个参考节点。If K is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K distance values, and the preset number of reference nodes are determined based on the preset number of distance values.根据权利要求29所述的方法,其中,所述利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的预设数量个参考节点,包括:The method according to claim 29, wherein the obtaining a preset number of reference nodes having relatively small distance values from the current node by using a spatial relationship depth-first search method comprises:基于节点与节点之间的空间关系,从所述初始参考集合中搜索所述当前节点的上层块内的子节点,得到K1个参考节点;Based on the spatial relationship between nodes, searching for child nodes in the upper layer block of the current node from the initial reference set to obtain K1 reference nodes;计算所述K1个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值,并根据所述K2个距离值确定所述K2个参考节点;Calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values with relatively small distance values from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values;若所述K2等于所述预设数量,则将所述K2个参考节点作为所述预设数量个参考节点;If K2 is equal to the preset number, the K2 reference nodes are used as the preset number of reference nodes;若所述K2小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;If K2 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks coplanar with the upper layer block of the current node to obtain K3 reference nodes;计算所述K3个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K3个距离值和所述K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据所述K4个距离值确定K4个参考节点;Calculate the distance value between each of the K3 reference nodes and the current node, and determine K4 distance values with relatively small distance values according to the comparison result of the obtained K3 distance values and the K2 distance values, and determine the K4 reference node according to the K4 distance values;若所述K4等于所述预设数量,则将所述K4个参考节点作为所述预设数量个参考节点;If the K4 is equal to the preset number, the K4 reference nodes are used as the preset number of reference nodes;若所述K4小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;If the K4 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are colinear with the upper layer block of the current node to obtain K5 reference nodes;计算所述K5个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K5个距离值和所述K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据所述K6个距离值确定K6个参考节点;Calculate the distance value between each of the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values according to the comparison result of the obtained K5 distance values and the K4 distance values, and determine K6 reference nodes according to the K6 distance values;若所述K6等于所述预设数量,则将所述K6个参考节点作为所述预设数量个参考节点;If the K6 is equal to the preset number, the K6 reference nodes are used as the preset number of reference nodes;若所述K6小于所述预设数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;If the K6 is less than the preset number, continue to search the initial reference set for child nodes in neighboring blocks that have common points with the upper layer block of the current node to obtain K7 reference nodes;计算所述K7个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K7个距离值和所述K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据所述K8个距离值确定K8个参考节点;Calculate the distance value between each of the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values according to the comparison result of the obtained K7 distance values and the K6 distance values, and determine the K8 reference node according to the K8 distance values;若所述K8等于所述预设数量,则将所述K8个参考节点作为所述预设数量个参考节点;If the K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes;若所述K8小于所述预设数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K8个距离值的比较结果确定距离值相对较小的预设数量个距离值,根据所述预设数量个距离值确定所述预设数量个参考节点。If the K8 is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values with relatively small distance values are determined based on the comparison result between the distance value and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.根据权利要求31至33任一项所述的方法,其中,所述当前节点的上层块至少包括下述其中之一:所述当前节点的父块、所述当前节点的祖父块。According to the method according to any one of claims 31 to 33, the upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.根据权利要求21所述的方法,其中,所述基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置,包括:The method according to claim 21, wherein determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index sequence number comprises:从所述初始参考集合中确定与所述索引序号的奇偶特性相反且最早放置于所述初始参考集合中的目标参考节点,将所述目标参考节点对应的位置确定为所述目标位置。A target reference node which has an odd-even characteristic opposite to that of the index number and is placed earliest in the initial reference set is determined from the initial reference set, and a position corresponding to the target reference node is determined as the target position.根据权利要求21所述的方法,其中,所述基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置,包括:The method according to claim 21, wherein determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index sequence number comprises:在所述初始参考集合中,根据预设步长确定最早放置的一组候选参考节点;In the initial reference set, determining a set of candidate reference nodes to be placed earliest according to a preset step size;从所述一组候选参考节点中确定与所述索引序号的奇偶特性相反的目标参考节点,将所述目标参考节点对应的位置确定为所述目标位置。A target reference node having an odd-even characteristic opposite to that of the index number is determined from the group of candidate reference nodes, and a position corresponding to the target reference node is determined as the target position.根据权利要求21所述的方法,其中,所述方法还包括:The method according to claim 21, wherein the method further comprises:在所述索引序号大于或等于预设常数值的情况下,将所述初始参考集合的队尾位置确定为所述当前节点在所述初始参考集合中对应的目标位置;When the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set;根据所述初始参考集合对所述当前节点进行编码处理之后,删除所述初始参考集合中队首位置处的参考节点,并将所述当前节点放置于所述目标位置,得到所述目标参考集合。After encoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.根据权利要求21所述的方法,其中,所述初始参考集合包括第一初始参考集合和第二初始参考集合;所述方法还包括:The method according to claim 21, wherein the initial reference set comprises a first initial reference set and a second initial reference set; the method further comprises:根据所述第一初始参考集合对所述当前节点进行编码处理之后,得到第一目标参考集合;其中,所述第一目标参考集合是基于所述当前节点替换所述第一初始参考集合中所述目标位置处的参考节点得到的;和/或After encoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and/or根据所述第二初始参考集合对所述当前节点进行编码处理之后,得到第二目标参考集合;其中,所述第二目标参考集合是基于删除所述第二初始参考集合中所述目标位置处的参考节点、将所述当前节点放置于队尾位置得到的。After encoding the current node according to the second initial reference set, a second target reference set is obtained; wherein the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.根据权利要求38所述的方法,其中,所述方法还包括:The method according to claim 38, wherein the method further comprises:若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据所述第二初始参考集合对所述当前节点进行编码处理;If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, encoding the current node according to the second initial reference set;若所述当前节点使用全局搜索方式,则根据所述第一初始参考集合对所述当前节点进行编码处理。If the current node uses a global search method, the current node is encoded according to the first initial reference set.根据权利要求38所述的方法,其中,在根据所述第一初始参考集合和/或所述第二初始参考集合对所述当前节点进行编码处理之后,所述方法还包括:The method according to claim 38, wherein after encoding the current node according to the first initial reference set and/or the second initial reference set, the method further comprises:若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定所述第一目标参考集合和所述第二目标参考集合均是基于删除队首位置处的参考节点、将所述当前节点放置于队尾位置的方式维持;If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue;若所述当前节点使用全局搜索方式,则确定所述第一目标参考集合是基于所述当前节点替换所述目标位置处的参考节点的方式维持,所述第二目标参考集合是基于删除所述目标位置处的参考节点、将所述当前节点放置于队尾位置的方式维持。If the current node uses a global search method, it is determined that the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.一种码流,所述码流是根据待编码信息进行比特编码生成的;其中,所述待编码信息至少包括:当前节点对应的属性残差值。A code stream is generated by bit coding according to information to be coded; wherein the information to be coded at least includes: an attribute residual value corresponding to a current node.一种编码器,所述编码器包括第一确定单元和编码单元;其中,An encoder comprises a first determining unit and an encoding unit; wherein:所述第一确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置;The first determining unit is configured to determine an index number and an initial reference set corresponding to the current node; and determine a target position corresponding to the current node in the initial reference set based on an even-odd characteristic of the index number;所述编码单元,配置为根据所述初始参考集合对所述当前节点进行编码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。The encoding unit is configured to place the current node at the target position after encoding the current node according to the initial reference set to obtain a target reference set.一种编码器,所述编码器包括第一存储器和第一处理器;其中,An encoder comprises a first memory and a first processor; wherein:所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;The first memory is used to store a computer program that can be run on the first processor;所述第一处理器,用于在运行所述计算机程序时,执行如权利要求21至40任一项所述的方法。The first processor is configured to execute the method according to any one of claims 21 to 40 when running the computer program.一种解码器,所述解码器包括第二确定单元和解码单元;其中,A decoder, comprising a second determining unit and a decoding unit; wherein:所述第二确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于所述索引序号的奇偶特性,确定所述当前节点在所述初始参考集合中对应的目标位置;The second determination unit is configured to determine an index number and an initial reference set corresponding to the current node; and determine a target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number;所述解码单元,配置为根据所述初始参考集合对所述当前节点进行解码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。The decoding unit is configured to place the current node at the target position after decoding the current node according to the initial reference set to obtain a target reference set.一种解码器,所述解码器包括第二存储器和第二处理器;其中,A decoder, comprising a second memory and a second processor; wherein:所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;The second memory is used to store a computer program that can be run on the second processor;所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至20任一项所述的方法。The second processor is configured to execute the method according to any one of claims 1 to 20 when running the computer program.一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至20任一项所述的方法、或者实现如权利要求21至40任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 20 is implemented, or the method according to any one of claims 21 to 40 is implemented.
CN202280092172.9A2022-03-12 Coding and decoding method, code stream, encoder, decoder and storage mediumActiveCN118743218B (en)

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
PCT/CN2022/080499WO2023173237A1 (en)2022-03-122022-03-12Encoding method, decoding method, bit stream, encoder, decoder, and storage medium

Publications (2)

Publication NumberPublication Date
CN118743218Atrue CN118743218A (en)2024-10-01
CN118743218B CN118743218B (en)2025-10-14

Family

ID=

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20160316214A1 (en)*2013-12-192016-10-27Canon Kabushiki KaishaImproved encoding process using a palette mode
CN112565764A (en)*2020-12-032021-03-26西安电子科技大学Point cloud geometric information interframe coding and decoding method
CN113424547A (en)*2019-03-202021-09-21腾讯美国有限责任公司Techniques and apparatus for weighted median prediction for point cloud attribute encoding and decoding
WO2021218509A1 (en)*2020-04-302021-11-04Oppo广东移动通信有限公司Nearest neighbour search method, encoder, decoder and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20160316214A1 (en)*2013-12-192016-10-27Canon Kabushiki KaishaImproved encoding process using a palette mode
CN113424547A (en)*2019-03-202021-09-21腾讯美国有限责任公司Techniques and apparatus for weighted median prediction for point cloud attribute encoding and decoding
WO2021218509A1 (en)*2020-04-302021-11-04Oppo广东移动通信有限公司Nearest neighbour search method, encoder, decoder and storage medium
CN112565764A (en)*2020-12-032021-03-26西安电子科技大学Point cloud geometric information interframe coding and decoding method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DOMINIK M.等: "Versatile Video Coding for VPCC", 《JVET》, 24 April 2020 (2020-04-24)*

Also Published As

Publication numberPublication date
WO2023173237A1 (en)2023-09-21

Similar Documents

PublicationPublication DateTitle
WO2022121648A1 (en)Point cloud data encoding method, point cloud data decoding method, device, medium, and program product
WO2023103565A1 (en)Point cloud attribute information encoding and decoding method and apparatus, device, and storage medium
TW202249488A (en)Point cloud attribute prediction method and apparatus, and codec
WO2024174086A1 (en)Decoding method, encoding method, decoders and encoders
CN116458158B (en) Intra-frame prediction method and device, codec, device, and storage medium
CN118743218A (en) Coding and decoding method, code stream, encoder, decoder and storage medium
CN118743219A (en) Coding and decoding method, code stream, encoder, decoder and storage medium
CN118743218B (en) Coding and decoding method, code stream, encoder, decoder and storage medium
CN118743219B (en) Coding and decoding method, code stream, encoder, decoder and storage medium
WO2025039236A1 (en)Coding and decoding method, code stream, encoder, decoder, and storage medium
WO2024119420A1 (en)Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024007144A1 (en)Encoding method, decoding method, code stream, encoders, decoders and storage medium
WO2024119419A1 (en)Encoding method, decoding method, bit stream, encoder, decoder, and storage medium
WO2023240662A1 (en)Encoding method, decoding method, encoder, decoder, and storage medium
WO2025213421A1 (en)Encoding method, decoding method, bitstream, encoder, decoder, and storage medium
WO2024207235A1 (en)Encoding/decoding method, bitstream, encoder, decoder, and storage medium
WO2024187380A1 (en)Encoding method, decoding method, code stream, encoder, decoder and storage medium
WO2024207244A1 (en)Point cloud encoding and decoding method, code stream, encoder, decoder and storage medium
WO2024174092A1 (en)Encoding/decoding method, code stream, encoder, decoder, and storage medium
WO2022257143A1 (en)Intra-frame prediction method and apparatus, encoding method and apparatus, decoding method and apparatus, codec, device and medium
WO2025039122A1 (en)Point cloud encoding method, point cloud decoding method, code stream, encoder, decoder, and storage medium
WO2025039120A1 (en)Encoding method, decoding method, encoder, decoder, and storage medium
WO2025076659A1 (en)Point cloud encoding method, point cloud decoding method, code stream, encoder, decoder and storage medium
WO2024187388A1 (en)Point cloud coding method, point cloud decoding method, and code stream, coder, decoder and storage medium
WO2024207247A1 (en)Point cloud encoding method, point cloud decoding method, code stream, encoder, decoder, and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp