WO2016123783A1 - 图像预测处理方法和相关设备 - Google Patents

图像预测处理方法和相关设备 Download PDF

Info

Publication number
WO2016123783A1
WO2016123783A1 PCT/CN2015/072347 CN2015072347W WO2016123783A1 WO 2016123783 A1 WO2016123783 A1 WO 2016123783A1 CN 2015072347 W CN2015072347 W CN 2015072347W WO 2016123783 A1 WO2016123783 A1 WO 2016123783A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
binarized
wedge
downsampling
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2015/072347
Other languages
English (en)
French (fr)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201580001241.0A priority Critical patent/CN105637865B/zh
Priority to PCT/CN2015/072347 priority patent/WO2016123783A1/zh
Publication of WO2016123783A1 publication Critical patent/WO2016123783A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to an image prediction method and related devices.
  • hybrid coding structures are commonly used for encoding and decoding video sequences.
  • the coding end of the hybrid coding structure typically includes prediction, transform, quantization, entropy coding, and the like.
  • the decoding end of the hybrid coding structure generally includes: entropy decoding, inverse quantization, inverse transform, and prediction compensation.
  • images in a video sequence are typically divided into image blocks for encoding. An image can be divided into several image blocks.
  • Current prediction techniques typically include both intra prediction and inter prediction techniques.
  • the intra prediction technique uses the spatial pixel information of the current image block to remove redundant information of the current image block to obtain a residual.
  • the inter prediction technique removes redundant information of the current image block using the encoded or decoded image pixel information adjacent to the current image block to obtain a residual.
  • an image adjacent to a current image block for inter prediction is referred to as a reference image.
  • Both intra prediction and inter prediction involve a block partitioning technique, that is, an image block can be divided into more than one partition, and then intra prediction or inter prediction is performed in units of the regions.
  • the commonly used block division method is two, one is to divide a square image block into two rectangular regions (rectangular partition) in the horizontal or vertical direction, for example, as shown in FIG. 1-a and FIG. 1-b, FIG. 1 In the example of -a and Figure 1-b, the square image blocks are divided into two rectangular areas in the horizontal and vertical directions, respectively.
  • another block division manner is that a square image block can be divided into two non-rectangular partitions at any angle, which can be exemplified by, for example, FIG. 1-c.
  • the 3D video codec involves the encoding and decoding of the depth map, wherein the depth map can reflect the distance of the object in the scene to the camera, and the depth map has completely different characteristics from the natural image (for example, the texture image/color image).
  • the depth map consists of most of the flat areas and a small number of sharp edges.
  • the purpose of the depth map is not directly for viewing, but as an auxiliary tool for viewpoint synthesis.
  • Traditional coding tools have high compression efficiency in the flat portion of the depth image and a large margin in the sharp edge region. The coding error directly leads to large distortion in the synthesized virtual view.
  • Depth Map Modeling Mode DMM is introduced into the 3D video codec framework as an optional intra prediction mode.
  • the block division technique can also be used for the 3D video codec process.
  • wedgelet division is a common method.
  • the principle is that an image block can be divided into two regions having an arbitrary shape by a block division technique, and each region uses a prediction value for encoding and decoding operations.
  • Encoding and decoding a depth map usually requires the use of a wedge query template set.
  • Each size image block requires a corresponding wedge query template set.
  • the wedge query template set of each size image block may include multiple binarized blocks. template.
  • the wedge query template set of image blocks of each size usually includes an extremely large number of binarized block templates.
  • a wedge query template set of a size block of 4 ⁇ 4 usually includes 86 binarized block templates.
  • the wedge query template set of the image block of size 8x8 usually includes 766 binarized block templates, and the wedge query template set of the image block of size 16x16 usually includes 1350 binarized block templates.
  • the set of wedge query templates for each size image block is usually obtained by the wedge reference template set of the image block of the size, and the number of binarized block templates in the wedge reference template set of each size image block is more Great.
  • both the codec side need to store a set of wedge query templates of image blocks of various sizes. Since the wedge query template set of each size image block includes a larger amount of binarized block template, the wedge query template set storing image blocks of various sizes is bound to increase the complexity of the video codec device. . For example, a wedge-shaped query template set that stores image blocks of various sizes occupies more storage space, which in turn increases the burden on the codec device.
  • Embodiments of the present invention provide an image prediction method and related device, so as to reduce a storage space required for a codec device to store a wedge query template set.
  • a first aspect of the embodiments of the present invention provides an image prediction method, including:
  • N and the M are positive integers, N/P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the down-sampling offset xOffset in the x direction used by the downsampling process is an integer smaller than the N/P and greater than or equal to zero.
  • the down-sampling offset yOffset in the y direction used by the downsampling process is an integer smaller than the M/Q and greater than or equal to zero.
  • the binarized partition When the wedge-shaped dividing direction of the template i is the dividing direction a, the down-sampling offset xOffset in the x direction used for down-sampling the binarized blocking template i is smaller than the N/P and greater than or An integer equal to 0, and/or a downsampled offset yOffset in the y direction used for downsampling the binarized block template i is an integer smaller than the M/Q and greater than or equal to 0;
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the split direction a is a left-right direction
  • the wedge-shaped splitting of the binarized block template i In the case where the line is located in the left half of the binarized block template i, the down-sampling offset xOffset used in the down-sampling process of the binarized block template i is equal to the The down-sampling offset yOffset in the y direction used by the binarized block template i for downsampling processing;
  • the dividing direction a is a left-right direction, and the wedge-shaped dividing line of the binarized blocking template i is located In the case of the right half of the binarized block template i, the down-sampling offset xOffset used in the down-sampling process of the binarized block template i is not equal to the second
  • the valued block template i performs a downsampling offset yOffset in the y direction used for downsampling processing;
  • the binarized blocking is performed
  • the down-sampling offset xOffset in the x direction used by the template i for downsampling is equal to the down-sampling offset yOffset in the y direction used for down-sampling the binarized block template i;
  • the binarized blocking is performed
  • the down-sampling offset xOffset in the x direction used by the template i for downsampling is not equal to the down-sampling offset yOffset in the y direction used for down-sampling the binarized block template i.
  • the downsampling processing The downsampling offset xOffset in the x direction used is not equal to the downsampling offset yOffset in the y direction used by the downsampling process.
  • the pair of the dimensions Down-sampling processing the K binarized block templates in the wedge-shaped query template set of the N*M image block to obtain K down-sampling processed binarized block templates includes: based on the following formula The K binarized block templates in the wedge query template set of the image block of size N*M are subjected to downsampling processing to obtain K downsampled processed binarized block templates;
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • the coordinates in the binary block template i representing the set of wedge query templates of the image block of size P*Q are (x, y)
  • the downsampling result of the pixel points, the yOffset represents a downsampling offset in the y direction, and the xOffset represents a downsampling offset in the x direction.
  • the N/P is equal to The M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M, and the N is equal to a positive integer power of 2.
  • the tiling template is all binarized blocking templates among the set of wedge query templates of the image block of size N*M.
  • the wedge query template Set as a wedge query template table.
  • the image prediction The method is used in the video encoding process or in the video decoding process.
  • a second aspect of the embodiments of the present invention provides an image prediction apparatus, including:
  • An acquiring unit configured to acquire a wedge query template set of an image block of size N*M;
  • a downsampling processing unit configured to perform downsampling processing on the K binarized block templates in the wedge query template set of the image block of size N*M to obtain binarization after K downsampling processes Blocking template, the K is an integer greater than 0;
  • Adding a unit configured to add the obtained K downsampling binarized block template to a wedge query template set of an image block of size P*Q;
  • a prediction unit configured to predict an image block of size P*Q by using a wedge query template set of the image block of size P*Q; wherein the N and the M are positive integers, where N/ P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the down sampling offset xOffset in the x direction used by the downsampling processing unit downsampling process is smaller than the N/P and greater than or An integer equal to 0.
  • the down sampling offset of the y direction used by the downsampling processing unit downsampling processing is an integer smaller than the M/Q and greater than or equal to zero.
  • the binarization is performed When the wedge-shaped dividing direction of the template i is the dividing direction a, the down-sampling offset xOffset in the x-direction used by the downsampling processing unit to perform the downsampling process on the binarized blocking template i is smaller than the An integer of N/P and greater than or equal to 0, and/or a downsampling offset yOffset in the y direction used by the downsampling processing unit to perform downsampling processing on the binarized blocking template i is smaller than An integer of M/Q and greater than or equal to 0;
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the split direction a is a left-right direction
  • the wedge-shaped splitting of the binarized block template i In the case where the line is located in the left half of the binarized block template i, the downsampling offset of the x direction used by the downsampling processing unit to perform downsampling processing on the binarized block template i xOffset, equal to the down-sampling offset yOffset in the y direction used for down-sampling the binarized block template i;
  • the downsampling processing unit is opposite Two values
  • the down-sampling offset xOffset in the x direction used for the down-sampling process i is not equal to the down-sampling offset yOffset in the y direction used for down-sampling the binarized block template i ;
  • the downsampling processing unit is opposite
  • the down-sampling offset xOffset in the x direction used for the downsampling process i is equal to the down-sampling offset in the y direction used for down-sampling the binarized block template i.
  • the downsampling processing unit is opposite
  • the down-sampling offset xOffset in the x direction used for the downsampling process i is not equal to the down-sampling bias in the y direction used for down-sampling the binarized block template i.
  • the down sampling processing unit The down-sampling offset xOffset in the x direction used for the downsampling process is not equal to the down-sampling offset yOffset in the y direction used in the downsampling process.
  • the downsampling processing unit Specifically, the K binarized block templates in the wedge query template set of the image block of size N*M are subjected to downsampling processing to obtain binary values after K downsampling processes, based on the following formula: Blocking template
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • the N/P is equal to The M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M, and the N is equal to a positive integer power of 2.
  • the tiling template is all binarized blocking templates among the set of wedge query templates of the image block of size N*M.
  • the wedge query template Set as a wedge query template table.
  • the image prediction The device is used in a video encoding device or in a video decoding device.
  • a third aspect of the embodiments of the present invention provides a template processing apparatus, including:
  • the processor is configured to acquire a wedge query template set of an image block of size N*M by calling code or instructions in the memory; a wedge query template for the image block of size N*M
  • the K binarized block templates in the set are subjected to downsampling processing to obtain K downsampled binarized block templates, wherein the K is greater than 0; the obtained K downsampling processes
  • the subsequent binarized block template is added to the wedge query template set of the image block of size P*Q; the image block of size P*Q is performed by using the wedge query template set of the image block of size P*Q.
  • Predicting; N and the M are positive integers, where N/P is equal to a positive integer multiple of 2 and M/Q is equal to a positive integer multiple of 2.
  • the down-sampling offset xOffset in the x direction used by the processor downsampling process is less than the N/P and greater than or equal to 0. The integer.
  • the down sampling offset yOffset in the y direction used by the processor downsampling process An integer less than the M/Q and greater than or equal to zero.
  • the binarization is performed When the wedge-shaped dividing direction of the template i is the dividing direction a, the down-sampling offset xOffset in the x direction used by the processor to perform downsampling processing on the binarized blocking template i is smaller than the N/ An integer greater than or equal to 0, and/or a downsampling offset yOffset in the y direction used by the processor to perform downsampling processing on the binarized block template i is less than the M/Q And an integer greater than or equal to 0;
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the segmentation direction a is a left-right direction
  • the wedge-shaped segmentation of the binarized block template i In the case where the line is located in the left half of the binarized block template i, the down-sampling offset xOffset in the x direction used by the processor to perform downsampling processing on the binarized block template i, Is equal to the down sampling offset yOffset in the y direction used for downsampling the binarized block template i;
  • the processor pairs the two The down-sampling offset xOffset in the x direction used for the down-sampling process i is not equal to the down-sampling offset in the y direction used for down-sampling the binarized block template i yOffset;
  • the dividing direction a is an up and down direction, and the wedge dividing line of the binarized block template i is located In the case of the upper half of the binarized block template i, the down-sampling offset xOffset in the x direction used by the processor to perform downsampling processing on the binarized block template i is equal to The binarized block template i performs a downsampling offset yOffset in the y direction used for downsampling processing;
  • the processor pairs the two The down-sampling offset xOffset in the x direction used for the down-sampling process i is not equal to the down-sampling offset in the y direction used for down-sampling the binarized block template i yOffset.
  • the processor is downsampled
  • the downsampling offset xOffset in the x direction used for the processing is not equal to the downsampling offset yOffset in the y direction used by the downsampling process.
  • the processor is specifically used Then, based on the following formula, K binarized block templates among the wedge query template sets of the image block of size N*M are subjected to downsampling processing to obtain K subsampled processed binarization points.
  • Block template K binarized block templates among the wedge query template sets of the image block of size N*M are subjected to downsampling processing to obtain K subsampled processed binarization points.
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • the N/P is equal to The M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M, and the N is equal to a positive integer power of 2.
  • the tiling template is all binarized blocking templates among the set of wedge query templates of the image block of size N*M.
  • the wedge query template Set as a wedge query template table.
  • the image prediction The device is used in a video encoding device or in a video decoding device.
  • a wedge-shaped query template set of an image block of size N*M is first acquired; and K binary values in a wedge-shaped query template set of the image block of size N*M are obtained.
  • the block template is subjected to downsampling processing to obtain K subsampled processed binarized block templates; and the obtained K downsampled binarized block templates are added to a size of P*Q
  • the wedge query template set of the image block is used to predict the image block of size P*Q by using the wedge query template set of the image block of size P*Q; wherein the N and the M are positive integers, N /P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the wedge query template set of the image block of size P*Q is obtained by downsampling the binarized block template in the wedge query template set of the image block of size N*M, based on this
  • the mechanism does not need to generate a wedge-shaped query template set of image blocks of size P*Q based on the wedge-shaped reference template set of the image block of size P*Q in advance according to the existing mechanism, and does not need to store the size based on the prior P.
  • the wedge-shaped reference template set of the Q image block generates a wedge-shaped reference template set of the image block of size P*Q.
  • FIG. 1 is a schematic diagram showing the division of several image blocks according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an image prediction method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of another image prediction method according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart diagram of another image prediction method according to an embodiment of the present disclosure.
  • FIG. 5-a to FIG. 5-k are schematic diagrams of several template downsampling processing manners according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an image prediction apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of another image prediction apparatus according to an embodiment of the present invention.
  • Embodiments of the present invention provide an image prediction method and related device, so as to reduce a storage space required for a codec device to store a wedge query template set.
  • An image prediction method may include: acquiring a wedge-shaped query template set of an image block of size N*M; and K binarization block templates among the wedge-shaped query template sets of the image block of size N*M Performing a downsampling process to obtain K subsampled processed binarized block templates, wherein the K is greater than an integer of 0; adding the obtained K downsampled binarized block templates to a size of a wedge-shaped query template set of image blocks of P*Q, predicting an image block of size P*Q by using a wedge-shaped query template set of the image block of size P*Q; the N and the M are positive integers , N/P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • FIG. 2 is a flowchart of an image prediction method according to an embodiment of the present invention. schematic diagram. As shown in FIG. 2, an image prediction method provided by an embodiment of the present invention may include:
  • N and the M are positive integers.
  • the N may be equal to or not equal to M, for example, the N may be greater than or less than the M.
  • the N may be equal to a positive integer power of 2.
  • the M can, for example, also be equal to a positive integer power of two.
  • the N can be equal to 2, 4, 8, 16, 30, 64 or other values.
  • an image block of size N*M can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • the image block mentioned in each embodiment of the present invention may refer to an image block of a depth map or an image block of other types of images.
  • the image block of the above size N*M may be an image block of size N*M of the depth map.
  • the K binarized block templates may be, for example, part or all of the binarized block templates in the wedge query template set of the image block of size N*M.
  • the K can be equal to 1, 2, 3, 4, 10, 15, 30, 50, 65 or other values.
  • N/P is equal to a positive integer multiple of 2
  • M/Q is equal to a positive integer multiple of 2.
  • the P may be equal to or not equal to Q, for example, the P may be greater than or less than the Q.
  • the P may be equal to a positive integer power of 2.
  • the Q can, for example, also be equal to a positive integer power of two.
  • the P can be equal to 2, 4, 8, 16, 30, 64 or other values.
  • an image block of size P*Q can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • the size of each binarized block template in the wedge query template set of the image block of size N*M is N*M.
  • the size of each binarized block template in the wedge query template set of the image block of size P*Q is P*Q, and so on.
  • the wedge query template set of the image block of size N*M is first obtained; K binarization among the wedge query template sets of the image block of size N*M is obtained.
  • the block template is subjected to downsampling processing to obtain K subsampled processed binarized block templates; and the obtained K downsampled binarized block templates are added to the image of size P*Q
  • the wedge query template set of the block is used to predict the image block of size P*Q by using the wedge query template set of the image block of size P*Q; wherein the N and the M are positive integers, N/ P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the wedge query template set of the image block of size P*Q is obtained by downsampling the binarized block template in the wedge query template set of the image block of size N*M, based on this
  • the mechanism does not need to generate a wedge-shaped query template set of image blocks of size P*Q based on the wedge-shaped reference template set of the image block of size P*Q in advance according to the existing mechanism, and does not need to store the size based on the prior P.
  • the wedge-shaped reference template set of the Q image block generates a wedge-shaped reference template set of the image block of size P*Q.
  • the codec device may store a wedge query template set of an image block of size 16*16, but does not store a wedge query template set of an image block of size 8*8, or may not store a wedge of an image block of size 4*4.
  • Query template set When a wedge query template set of an image block of size 8*8 is needed, the codec device can obtain a size by downsampling the binarized block template in the wedge query template set of the 16*16 image block. A set of wedge query templates for 8*8 image blocks.
  • the codec device can also obtain a size of 4*4 image block by down-sampling the binarized block template in the wedge-shaped query template set of the 16*16 image block.
  • the wedge-shaped query template set can be seen that the above technical solution is advantageous for greatly reducing the storage space required for the codec device to store the wedge query template set.
  • the down-sampling offset xOffset in the x-direction used by the downsampling process may be selected according to the needs of the specific scenario, and the down-sampling bias in the y direction used by the downsampling process may be selected according to the needs of the specific scenario.
  • the down-sampling offset xOffset in the x direction may be the same or different.
  • the down-sampling offset yOffset in the y-direction may be the same or different.
  • the down-sampling offset xOffset in the x direction used in the downsampling process is an integer smaller than the N/P and greater than or equal to 0.
  • the downsampling offset xOffset may be equal to 0 or 1. If N/P or the like 4, the downsampling offset xOffset may be equal to 0 or 1 or 2 or 3. If N/P or the like 8, the downsampling offset xOffset may be equal to 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7, and so on.
  • the down sampling offset yOffset in the y direction used by the downsampling process is an integer smaller than the M/Q and greater than or equal to 0.
  • the downsampling offset xOffset may be equal to 0 or 1. If M/Q is 4, the downsampling offset xOffset may be equal to 0 or 1 or 2 or 3. If M/Q is 8, then the downsampling offset xOffset may be equal to 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7, and so on.
  • the binarized block template i is used for downsampling processing.
  • the downsampling offset xOffset in the x direction is an integer smaller than the N/P and greater than or equal to 0, and/or downsampling in the y direction used for downsampling the binarized block template i
  • the offset yOffset is an integer smaller than the M/Q and greater than or equal to zero.
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for downsampling the binarized block template i is equal to downsampling the binarized block template i
  • the downsampling offset yOffset in the y direction used is processed.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for down-sampling the binarized block template i is not equal to the binarized block template i
  • the downsampling offset yOffset in the y direction used for the sampling process is not equal to the binarized block template i.
  • the dividing direction a is an up-and-down direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for the downsampling process of the binarized block template i is equal to downsampling the binarized block template i
  • the downsampling offset yOffset in the y direction used is processed.
  • the dividing direction a is an up-and-down direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for down-sampling the binarized block template i is not equal to the binarized block template i
  • the downsampling offset yOffset in the y direction used for the sampling process is not equal to the binarized block template i.
  • the down sampling offset xOffset in the x direction used by the downsampling process is not equal to the down sampling offset in the y direction used by the downsampling process.
  • the K binarized block templates in the set of wedge query templates of the image block of size N*M are downsampled to obtain
  • the K binarized processed binarized block templates include: downsampling K binarized block templates among the wedge query template sets of the size N*M image blocks based on the following formula To obtain a binarized block template after K downsampling processes.
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • downsampling processing modes may also be sampled to downsample the K binarized blocking templates in the wedge query template set of the image block of size N*M to obtain K.
  • a binarized block template after downsampling may also be sampled to downsample the K binarized blocking templates in the wedge query template set of the image block of size N*M to obtain K.
  • the N/P may be equal to or not equal to the M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M and the N is equal to a positive integer power of 2.
  • the P is equal to the Q and the P is equal to a positive integer power of 2.
  • the set of wedge query templates is a wedge lookup table or other form of a set of wedge query templates.
  • the image prediction method may be used in a video encoding process or a video decoding process.
  • the wedge template set of the image block of size N*M can be used to predict an image block of size N*M, and the like. It is possible to predict an image block of size N*M by using a wedge template set of image blocks of size N*M.
  • the set of wedge templates of the image block of size P*Q can be used to predict image blocks of size P*Q and the like. It is possible to predict an image block of size P*Q by using a wedge template set of an image block of size P*Q.
  • the execution body of the template processing method may be a video encoding device or a video decoding device.
  • the video encoding device or video decoding device can be any device that needs to output or store video, such as a laptop, tablet, personal computer, mobile phone, digital television, or video server.
  • FIG. 3 is a schematic flowchart diagram of an image prediction method according to an embodiment of the present invention. This embodiment is described by way of example from the perspective of a video encoding apparatus. As shown in FIG. 3, an image prediction method provided by an embodiment of the present invention may include:
  • a video encoding apparatus acquires a wedge query template set of an image block of size N*M.
  • N and the M are positive integers.
  • the N may be equal to or not equal to M, for example, the N may be greater than or less than the M.
  • the N may be equal to a positive integer power of 2.
  • the M can, for example, also be equal to a positive integer power of two.
  • the N can be equal to 2, 4, 8, 16, 30, 64 or other values.
  • an image block of size N*M can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • the image block mentioned in each embodiment of the present invention may refer to an image block of a depth map or an image block of other types of images.
  • the image block of size N*M may be an image block of size N*M of the depth map.
  • the video encoding apparatus performs a down sampling process on the i-th binarized block template in the wedge-shaped query template set of the image block of size N*M to obtain an i-th binary value after the downsampling process. Blocking template.
  • the video encoding apparatus performs downsampling processing on the i-th binarized blocking template in the wedge-shaped query template set of the image block of size N*M.
  • the obtaining the i-th binarized block template after the downsampling process comprises: performing K binarized block templates in the wedge query template set of the image block of size N*M based on the following formula:
  • the downsampling process is performed to obtain a binarized block template after K downsampling processes.
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • the video encoding apparatus adds the obtained i-th binarized blocking template after the downsampling process to the wedge-shaped query template set of the image block of size P*Q.
  • the video encoding apparatus determines whether the i is greater than a total number of binarized block templates currently included in the wedge query template set of the image block of size N*M.
  • step 303 is performed.
  • the video encoding apparatus predicts an image block of size P*Q by using a wedge-shaped query template set of the image block of size P*Q.
  • N/P is equal to a positive integer multiple of 2
  • M/Q is equal to a positive integer multiple of 2.
  • the P may be equal to or not equal to Q, for example, the P may be greater than or less than the Q.
  • the P may be equal to a positive integer power of 2.
  • the Q can, for example, also be equal to a positive integer power of two.
  • the P can be equal to 2, 4, 8, 16, 30, 64 or other values.
  • an image block of size P*Q can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • each binarized block template in the wedge query template set of the image block of size N*M is N*M.
  • Wedge query for image blocks of size P*Q The size of each binarized block template in the template set is P*Q, and so on.
  • the down-sampling offset xOffset in the x-direction used by the downsampling process may be selected according to the needs of the specific scenario, and the down-sampling bias in the y direction used by the downsampling process may be selected according to the needs of the specific scenario.
  • the down-sampling offset xOffset in the x direction may be the same or different.
  • the down-sampling offset yOffset in the y-direction may be the same or different.
  • the down-sampling offset xOffset in the x direction used in the downsampling process is an integer smaller than the N/P and greater than or equal to 0.
  • the down sampling offset yOffset in the y direction used by the downsampling process is an integer smaller than the M/Q and greater than or equal to 0.
  • the binarized block template i is used for downsampling processing.
  • the downsampling offset xOffset in the x direction is an integer smaller than the N/P and greater than or equal to 0, and/or downsampling in the y direction used for downsampling the binarized block template i
  • the offset yOffset is an integer smaller than the M/Q and greater than or equal to zero.
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for downsampling the binarized block template i is equal to downsampling the binarized block template i
  • the downsampling offset yOffset in the y direction used is processed.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for down-sampling the binarized block template i is not equal to the binarized block template i Sampling process used Downsampling offset yOffset in the y direction.
  • the dividing direction a is an up-and-down direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for the downsampling process of the binarized block template i is equal to downsampling the binarized block template i
  • the downsampling offset yOffset in the y direction used is processed.
  • the dividing direction a is an up-and-down direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for down-sampling the binarized block template i is not equal to the binarized block template i
  • the downsampling offset yOffset in the y direction used for the sampling process is not equal to the binarized block template i.
  • the down sampling offset xOffset in the x direction used by the downsampling process is not equal to the down sampling offset in the y direction used by the downsampling process.
  • the N/P may be equal to or not equal to the M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M and the N is equal to a positive integer power of 2.
  • the P is equal to the Q and the P is equal to a positive integer power of 2.
  • the set of wedge query templates is a wedge query template table or other form of a wedge query template set.
  • the video encoding device may first obtain a wedge query template set of an image block of size N*M; and K of the wedge query template set of the image block of size N*M
  • the binarized block templates are subjected to downsampling processing to obtain K subsampled processed binarized block templates; and the obtained K downsampled binarized block templates are added to the size P *The wedge query template set of the image block of Q, predicting the image block of size P*Q by using the wedge query template set of the image block of size P*Q;
  • N and the M are positive Integer
  • N/P is equal to 2
  • M/Q is equal to a positive integer multiple of 2.
  • the wedge query template set of the image block of size P*Q is obtained by downsampling the binarized block template in the wedge query template set of the image block of size N*M, based on this
  • the mechanism does not need to generate a wedge-shaped reference template set of an image block of size P*Q based on a wedge-shaped reference template set of an image block of size P*Q in advance according to an existing mechanism, and does not need to store the size based on P* in advance.
  • the wedge-shaped reference template set of the Q image block generates a wedge-shaped reference template set of the image block of size P*Q.
  • the codec device may store a wedge query template set of an image block of size 16*16, but does not store a wedge query template set of an image block of size 8*8, or may not store a wedge of an image block of size 4*4.
  • Query template set When a wedge query template set of an image block of size 8*8 is needed, the codec device can obtain a size by downsampling the binarized block template in the wedge query template set of the 16*16 image block.
  • a set of wedge query templates for 8*8 image blocks When it is required to use a wedge-shaped query template set of an image block of size 4*4, the codec device can also obtain a size by down-sampling the binarized block template in the wedge-shaped query template set of the 16*16 image block.
  • As a set of wedge query templates of 4*4 image blocks it can be seen that the above technical solution is advantageous for greatly reducing the storage space required for the codec device to store the wedge query template set.
  • the encoding device can perform downsampling processing on the binary block template in the wedge query template table of the image block of size 16*16 to obtain a size of 8*8.
  • the wedge-shaped query template table of the image block the encoding device searches for the optimal binarized block template of the current image block in the wedge-shaped query template table of the image block of size 8*8 obtained by the downsampling process, and the most The index of the optimal binarized block template is written into the video code stream, where the coded bit number of the index of the optimal binarized block template can be equal to the wedge query template table of the image block with the code size of 16*16.
  • the number of coded bits of an index of a binarized block template Because the wedge query template table of the image block of size 8*8 is obtained by downsampling the wedge query template table of the image block of size 16*16, if the number of binarized block templates in the two wedge query template tables Similarly, the coded bits of the index of the binarized block template in the two wedge query template tables may be the same, and the decoding device may be based on the index of the optimal binarized block template in the code stream.
  • the binary query block template corresponding to the wedge query template table of the image block of size 16*16 is used, and the downsampled result of the binarized block template corresponding thereto is used. To predict the current image block, and so on.
  • FIG. 4 is a schematic flowchart diagram of an image prediction method according to an embodiment of the present invention. This embodiment is described by way of example from the perspective of a video decoding apparatus. As shown in FIG. 4, an image prediction method provided by an embodiment of the present invention may include:
  • the video decoding apparatus acquires a wedge query template set of an image block of size N*M.
  • N and the M are positive integers.
  • the N may be equal to or not equal to M, for example, the N may be greater than or less than the M.
  • the N may be equal to a positive integer power of 2.
  • the M can, for example, also be equal to a positive integer power of two.
  • the N can be equal to 2, 4, 8, 16, 40, 64 or other values.
  • an image block of size N*M can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • the image block mentioned in each embodiment of the present invention may refer to an image block of a depth map or an image block of other types of images.
  • the image block of size N*M may be an image block of size N*M of the depth map.
  • the video decoding apparatus performs a down sampling process on the i-th binarized block template in the wedge-shaped query template set of the image block of size N*M to obtain an i-th binary value after the downsampling process. Blocking template.
  • the video decoding apparatus performs downsampling processing on the i-th binarized block template in the wedge query template set of the image block of size N*M.
  • the obtaining the i-th binarized block template after the downsampling process comprises: performing K binarized block templates in the wedge query template set of the image block of size N*M based on the following formula:
  • the downsampling process is performed to obtain a binarized block template after K downsampling processes.
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • the video decoding apparatus adds the obtained i-th binarized block template after the downsampling process to a wedge-shaped query template set of the image block of size P*Q.
  • the video decoding apparatus determines whether the i is greater than a total number of binarized block templates currently included in the wedge query template set of the image block of size N*M.
  • step 403 is performed.
  • the video decoding apparatus predicts an image block of size P*Q by using a wedge-shaped query template set of the image block of size P*Q.
  • N/P is equal to a positive integer multiple of 2
  • M/Q is equal to a positive integer multiple of 2.
  • the P may be equal to or not equal to Q, for example, the P may be greater than or less than the Q.
  • the P may be equal to a positive integer power of 2.
  • the Q can, for example, also be equal to a positive integer power of two.
  • the P can be equal to 2, 4, 8, 16, 40, 64 or other values.
  • an image block of size P*Q can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • the size of each binarized block template in the wedge query template set of the image block of size N*M is N*M.
  • the size of each binarized block template in the wedge query template set of the image block of size P*Q is P*Q, and so on.
  • the x-direction used in the downsampling process may be selected according to the needs of the specific scenario.
  • the sampling offset xOffset can select the down sampling offset yOffset in the y direction used by the downsampling process according to the needs of the specific scene.
  • the down-sampling offset xOffset in the x direction may be the same or different.
  • the down-sampling offset yOffset in the y-direction may be the same or different.
  • the down-sampling offset xOffset in the x direction used in the downsampling process is an integer smaller than the N/P and greater than or equal to 0.
  • the down sampling offset yOffset in the y direction used by the downsampling process is an integer smaller than the M/Q and greater than or equal to 0.
  • the binarized block template i is used for downsampling processing.
  • the downsampling offset xOffset in the x direction is an integer smaller than the N/P and greater than or equal to 0, and/or downsampling in the y direction used for downsampling the binarized block template i
  • the offset yOffset is an integer smaller than the M/Q and greater than or equal to zero.
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for downsampling the binarized block template i is equal to downsampling the binarized block template i
  • the downsampling offset yOffset in the y direction used is processed.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for down-sampling the binarized block template i is not equal to the binarized block template i
  • the downsampling offset yOffset in the y direction used for the sampling process is not equal to the binarized block template i.
  • the dividing direction a is In the up-and-down direction, and the wedge-shaped dividing line of the binarized blocking template i is located in the upper half of the binarized blocking template i, the binarized blocking template i is down-sampled
  • the down-sampling offset xOffset in the x direction used is equal to the down-sampling offset yOffset in the y direction used for down-sampling the binarized block template i.
  • the dividing direction a is an up-and-down direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template.
  • the down-sampling offset xOffset in the x direction used for down-sampling the binarized block template i is not equal to the binarized block template i
  • the downsampling offset yOffset in the y direction used for the sampling process is not equal to the binarized block template i.
  • the down sampling offset xOffset in the x direction used by the downsampling process is not equal to the down sampling offset in the y direction used by the downsampling process.
  • the N/P may be equal to or not equal to the M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M and the N is equal to a positive integer power of 2.
  • the P is equal to the Q and the P is equal to a positive integer power of 2.
  • the set of wedge query templates is a wedge query template table or other form of a wedge query template set.
  • the video decoding device may first acquire a wedge query template set of an image block of size N*M; and K of the wedge query template set of the image block of size N*M
  • the binarized block templates are subjected to downsampling processing to obtain K subsampled processed binarized block templates; and the obtained K downsampled binarized block templates are added to the size P *The wedge query template set of the image block of Q, predicting the image block of size P*Q by using the wedge query template set of the image block of size P*Q; wherein the N and the M are positive An integer, N/P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the wedge query template set of the image block of size P*Q is a binarized block mode of the set of wedge query templates for the image block of size N*M.
  • the board performs the downsampling process, and based on this mechanism, the encoding end does not need to generate a wedge reference template of the image block of size P*Q based on the wedge reference template set of the image block of size P*Q according to the existing mechanism.
  • the set does not need to store in advance a wedge-shaped reference template set of image blocks of size P*Q generated based on the wedge-shaped reference template set of the image block of size P*Q. It can be seen that the above technical solution is beneficial to greatly reduce the storage space required for the encoding device to store the wedge query template set.
  • the down-sampling offset xOffset in the x direction and the downsampling offset yOffset in the y direction used in the downsampling process may take values.
  • Example 1 is an example of a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • the downsampling offset xOffset 0 in the x direction.
  • the downsampling offset yOffset 1 in the y direction.
  • Figure 5-a shows one possible downsampling result under the conditions of Scene 1
  • the left side of Figure 5-a shows an example of a binary value in the wedge template lookup table of an image block of size 16x16.
  • the right side of FIG. 5-a exemplifies a downsampling process of a binarized block template in a wedge template lookup table of an image block of size 16 ⁇ 16, resulting in a 16 ⁇ 16 image block.
  • the down-sampling offset xOffset 0 used in the x-direction used in the downsampling process.
  • the downsampling offset yOffset 1 in the y direction.
  • scenario 2 is taken as an example of a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • Example 3 is an example of a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16 For example, for any binarized blocking template in the wedge template query table of the 16 ⁇ 16 image block, regardless of the direction of the wedge division corresponding to the binary block template, which direction is used in the downsampling process.
  • the downsampling offset xOffset 0 in the x direction.
  • the downsampling offset yOffset 0 in the y direction.
  • Example Scenario 5 by downsampling a wedge template lookup table for an image block of size 16x16
  • a wedge template lookup table of an image block of size 8 ⁇ 8 is taken as an example.
  • the downsampling offset xOffset 1 in the x direction.
  • the downsampling offset yOffset 0 in the y direction.
  • Example Scenario 6 is taken as an example to obtain a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • Example Scenario 7 is taken as an example of a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16 For example, for any binarized blocking template in the wedge template query table of the 16 ⁇ 16 image block, regardless of the direction of the wedge division corresponding to the binary block template, which direction is used in the downsampling process.
  • the downsampling offset xOffset 1 in the x direction.
  • the downsampling offset yOffset 1 in the y direction.
  • Example Scenario 7 is taken as an example of a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • Example Scenario 8 is taken as an example to obtain a wedge template lookup table of an image block having a size of 8 ⁇ 8 by downsampling a wedge template lookup table of an image block of size 16 ⁇ 16.
  • xOffset 0
  • yOffset 0.
  • FIGS 5-h through 5-k illustrate several possible downsampling results in scenario 8.
  • an embodiment of the present invention further provides an image prediction apparatus 600, which may include:
  • the obtaining unit 610 is configured to acquire a wedge query template set of the image block of size N*M.
  • the downsampling processing unit 620 is configured to perform downsampling processing on the K binarized block templates in the wedge query template set of the image block of size N*M to obtain the K values of the K downsampling process A block template, the K being an integer greater than zero.
  • the adding unit 630 is configured to add the obtained K downsampling binarized block templates to the wedge query template set of the image block of size P*Q.
  • a prediction unit 640 configured to predict, by using a wedge query template set of the image block of size P*Q, an image block of size P*Q; wherein, the N and the M are positive integers, where, N /P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • N and the M are positive integers.
  • the N may be equal to or not equal to M, for example, the N may be greater than or less than the M.
  • the N may be equal to a positive integer power of 2.
  • the M can, for example, also be equal to a positive integer power of two.
  • the N can be equal to 2, 4, 8, 16, 30, 64 or other values.
  • an image block of size N*M can be, for example, an image block of size 2*2, an image block of size 4*4, an image block of size 8*8, and an image block of size 16*16.
  • the image block mentioned in each embodiment of the present invention may refer to an image block of a depth map or an image block of other types of images.
  • the image block of the above size N*M may be an image block of size N*M of the depth map.
  • the down-sampling offset xOffset in the x direction used by the downsampling processing unit downsampling process is an integer smaller than the N/P and greater than or equal to zero.
  • the down-sampling offset yOffset in the y direction used by the downsampling processing unit downsampling process is an integer smaller than the M/Q and greater than or equal to zero.
  • the downsampling processing unit pairs the binarized block template
  • the down-sampling offset xOffset in the x direction used for the downsampling process is an integer smaller than the N/P and greater than or equal to 0, and/or the downsampling processing unit blocks the binarization
  • the down sampling offset yOffset in the y direction used by the template i for downsampling processing is an integer smaller than the M/Q and greater than or equal to 0;
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template i
  • the downsampling offset xOffset in the x direction used by the downsampling processing unit to perform downsampling processing on the binarized blocking template i is equal to the binarized blocking template i performing a downsampling offset yOffset in the y direction used for downsampling processing;
  • the downsampling processing unit is opposite
  • the down-sampling offset xOffset in the x direction used for the downsampling process i is not equal to the down-sampling bias in the y direction used for down-sampling the binarized block template i. Shift yOffset;
  • the downsampling processing unit is opposite
  • the down-sampling offset xOffset in the x direction used for the downsampling process i is equal to the down-sampling offset in the y direction used for down-sampling the binarized block template i.
  • the downsampling processing unit is opposite
  • the down-sampling offset xOffset in the x direction used by the binarized block template i for downsampling processing is not equal to the pair
  • the binarized block template i performs a downsampling offset yOffset in the y direction used for downsampling processing.
  • the down sampling offset xOffset in the x direction used by the downsampling processing unit downsampling process is not equal to the y direction used in the downsampling process. Downsampled offset yOffset.
  • the downsampling processing unit is specifically configured to: K among the wedge query template sets of the image block of size N*M based on the following formula
  • the binarized block template is subjected to downsampling processing to obtain K subsampled processed binarized block templates;
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • the N/P is equal to the M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M, and the N is equal to a positive integer power of 2.
  • the K binarized blocking templates are all binarized blocks in the set of wedge query templates of the image block of size N*M. template.
  • the set of wedge query templates may be a wedge query template table.
  • the image prediction apparatus is used in a video encoding apparatus or a video decoding apparatus.
  • the image prediction apparatus 600 first acquires an image of size N*M. a wedge-shaped query template set of the block; performing down-sampling processing on the K binarized block templates in the wedge-shaped query template set of the image block of size N*M to obtain binarization after K downsampling processes Blocking the template; adding the obtained K downsampling binarized blocking template to the wedge query template set of the image block of size P*Q, using the image block of the size P*Q
  • the wedge query template set predicts an image block of size P*Q; wherein N and the M are positive integers, N/P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the wedge query template set of the image block of size P*Q is obtained by downsampling the binarized block template in the wedge query template set of the image block of size N*M, based on this
  • the mechanism does not need to generate a wedge-shaped query template set of image blocks of size P*Q based on the wedge-shaped reference template set of the image block of size P*Q in advance according to the existing mechanism, and does not need to store the size based on the prior P.
  • the wedge-shaped reference template set of the Q image block generates a wedge-shaped reference template set of the image block of size P*Q.
  • an embodiment of the present invention further provides an image prediction apparatus 700, which may include:
  • the processor 702 is configured to acquire a wedge query template set of an image block of size N*M by calling a code or an instruction in the memory; and a wedge query of the image block of size N*M
  • the K binarized block templates in the template set are subjected to downsampling processing to obtain K downsampled binarized block templates, wherein the K is greater than an integer of 0; and the obtained K down samples are obtained.
  • the processed binarized block template is added to the wedge query template set of the image block of size P*Q; the wedge-shaped query template set of the image block of the size P*Q is used for the image block of size P*Q
  • the prediction is performed; the N and the M are positive integers, wherein N/P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the down-sampling offset xOffset in the x direction used by the processor downsampling process is an integer smaller than the N/P and greater than or equal to 0.
  • the down sampling offset yOffset in the y direction used by the processor downsampling process is an integer smaller than the M/Q and greater than or equal to 0.
  • the processor performs the binarized block template i Under mining
  • the down-sampled offset xOffset used in the x-direction is an integer smaller than the N/P and greater than or equal to 0, and/or the processor downsamples the binarized block template i
  • the downsampling offset yOffset in the y direction used by the processing is an integer smaller than the M/Q and greater than or equal to 0;
  • the binarized block template i is any one binarized block template in the wedge query template set of the image block of size N*M, and the segmentation direction a is an upper left direction and an upper right direction. Lower left direction, lower right direction, left and right direction, or up and down direction.
  • the dividing direction a is a left-right direction
  • a wedge-shaped dividing line of the binarized blocking template i is located in the binarized blocking template i
  • the down-sampling offset xOffset in the x direction used by the processor to perform downsampling processing on the binarized blocking template i is equal to performing the binarized blocking template i
  • the processor pairs the two The down-sampling offset xOffset in the x direction used for the down-sampling process i is not equal to the down-sampling offset in the y direction used for down-sampling the binarized block template i yOffset;
  • the processor pairs the two The down-sampling offset xOffset in the x direction used for the down-sampling process i is equal to the down-sampling offset yOffset in the y direction used for down-sampling the binarized block template i ;
  • the processor pairs the two The down-sampling offset xOffset in the x direction used for the down-sampling process i is not equal to the down-sampling offset in the y direction used for down-sampling the binarized block template i yOffset.
  • the down-sampling offset xOffset in the x direction used by the processor downsampling process is not equal to the y direction used in the downsampling process.
  • Sample offset yOffset is not equal to the down-sampling offset xOffset.
  • the processor is specifically configured to: based on the following formula, K binary values in a set of wedge query templates of the image block of size N*M
  • the block template is subjected to downsampling processing to obtain a binarized block template after K downsampling processes;
  • said x represents coordinates in the x direction
  • said y represents coordinates in the y direction
  • said i represents the number of the binarized block template in the wedge query template set
  • said WedPattern_P*Q[i][x][y ] represents a downsampling result of a pixel of (x, y) coordinates in the binary templated template i of the wedge-shaped query template set of the image block of size P*Q
  • the yOffset indicating the lower of the y direction
  • the sampling offset the xOffset representing the downsampling offset in the x direction.
  • the N/P is equal to the M/Q.
  • the N/P is equal to 2 or 4.
  • the N is equal to the M, and the N is equal to a positive integer power of 2.
  • the K binarized blocking templates are all binarized blocks in the set of wedge query templates of the image block of size N*M. template.
  • the set of wedge query templates may be a wedge query template table.
  • the image prediction apparatus 700 is used in a video encoding apparatus or in a video decoding apparatus.
  • the image prediction apparatus 700 first acquires a wedge-shaped query template set of an image block of size N*M; and K of the wedge-shaped query template set of the image block of the size of N*M
  • the binarized block templates are subjected to downsampling processing to obtain K subsampled processed binarized block templates; and the obtained K downsampled binarized block templates are added to the size P *Q diagram
  • the image block of size P*Q is predicted by using the wedge query template set of the image block of size P*Q; wherein the N and the M are positive integers, N /P is equal to a positive integer multiple of 2, and M/Q is equal to a positive integer multiple of 2.
  • the wedge query template set of the image block of size P*Q is obtained by downsampling the binarized block template in the wedge query template set of the image block of size N*M, based on this
  • the mechanism does not need to generate a wedge-shaped query template set of image blocks of size P*Q based on the wedge-shaped reference template set of the image block of size P*Q in advance according to the existing mechanism, and does not need to store the size based on the prior P.
  • the wedge-shaped reference template set of the Q image block generates a wedge-shaped reference template set of the image block of size P*Q.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all of the steps of any one of the image prediction methods described in the foregoing method embodiments.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located in one place, or It can also be distributed to multiple network elements. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the above-described integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, server or network device, etc., and in particular a processor in a computer device) to perform all or part of the steps of the above-described methods of various embodiments of the present invention.
  • the foregoing storage medium may include: a U disk, a mobile hard disk, a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), and the like. The medium of the code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

一种图像预测方法和相关设备。一种图像预测方法包括:获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下釆样处理以得到K个下釆样处理后的二值化分块模板,所述K大于0的整数;将得到的所述K个下釆样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。本发明实施例提供的技术方案有利于降低编解码设备存储楔形查询模板集所需存储空间。

Description

图像预测处理方法和相关设备 技术领域
本发明涉及通信技术领域,具体涉及图像预测方法和相关设备。
背景技术
目前,在视频编码和解码框架中,混合编码结构通常用于视频序列的编码和解码。
混合编码结构的编码端通常包括预测、变换、量化和熵编码等。混合编码结构的解码端通常包括:熵解码、反量化、反变换和预测补偿等。在视频编码和解码框架中,视频序列中的图像通常划分成图像块来进行编码。一幅图像可被划分成若干图像块。
目前预测技术通常包含帧内预测和帧间预测两种技术。帧内预测技术利用当前图像块的空间像素信息去除当前图像块的冗余信息以获得残差。帧间预测技术利用当前图像块邻近的已编码或已解码图像像素信息去除当前图像块的冗余信息以获得残差。在帧间预测技术里,用于帧间预测的当前图像块邻近的图像被称为参考图像。
帧内预测或帧间预测均涉及块划分(block partitioning)技术,即可将一个图像块划分成多于一个的区域(partition),然后再以所述区域为单位进行帧内预测或帧间预测。其中,常用的块划分方式两种,一种是将一个方形图像块沿水平或垂直方向划分成两个矩形区域(rectangular partition),例如图1-a和图1-b举例所示,图1-a和图1-b所示举例中,方形图像块分别沿水平与垂直方向划分成两个矩形区域。此外,另一种块划分方式是可沿任意角度将一个方形图像块划分成两个非矩形区域(non-rectangular partition),具体可以例如图1-c举例所示。
三维视频编解码涉及了深度图的编解码,其中,深度图可反映场景内物体到相机的距离,深度图具有与自然图像(例如纹理图像/彩色图像)完全不同的特性。首先,深度图由大部分的平坦区域和少部分的锐利边缘组成。其次是深度图的用途不是直接用来观看的,而是用作视点合成的辅助工具。传统编码工具在深度图像的平坦部分有很高的压缩效率,在锐利边缘区域会带来较大的 编码误差,直接导致合成的虚拟视点中有较大失真。为了在压缩平坦区域同时更好的保护边缘部分,深度图像建模模式(DMM,Depth Map Modeling mode)作为一种可选的帧内预测模式被引入到三维视频编解码框架中。
三维视频编解码过程也可使用块划分技术。例如在三维视频的深度图的编解码技术中,楔形(wedgelet)划分是一种常用方法。其原理是图像块经块划分技术可划分成两个具有任意形状的区域之后,每个区域使用一个预测值进行编码和解码操作。对深度图进行编解码通常需要使用到楔形查询模板集,每种尺寸的图像块均需要对应的楔形查询模板集,每种尺寸的图像块的楔形查询模板集中可包括多个二值化分块模板。
现有技术中,每种尺寸的图像块的楔形查询模板集中通常包括极其大量的二值化分块模板,例如尺寸为4x4的图像块的楔形查询模板集中通常包括86个二值化分块模板,又例如尺寸为8x8的图像块的楔形查询模板集中通常包括766个二值化分块模板,尺寸为16x16的图像块的楔形查询模板集中通常包括1350个二值化分块模板。
并且,每种尺寸的图像块的楔形查询模板集通常都是通过该尺寸的图像块的楔形参考模板集来得到,每种尺寸的图像块的楔形参考模板集中二值化分块模板的数量更为巨大。现有技术中,编解码端都需要存储各种尺寸的图像块的楔形查询模板集。由于每种尺寸的图像块的楔形查询模板集中均包括了较大量二值化分块模板,因此存储各种尺寸的图像块的楔形查询模板集势必将较大的增加视频编解码设备的复杂度。例如存储各种尺寸的图像块的楔形查询模板集会占用较多的存储空间进而会增加编解码设备的负担。
发明内容
本发明实施例提供图像预测方法和相关设备,以期降低编解码设备存储楔形查询模板集所需存储空间。
本发明实施例第一方面提供一种图像预测方法,包括:
获取尺寸为N*M的图像块的楔形查询模板集;
对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0 的整数;
将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。
结合第一方面,在第一方面的第一种可能的实施方式中,
所述下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
结合第一方面或第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,
所述下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
结合第一方面或第一方面的第一种至第二种可能的实施方式中的任意一种可能的实施方式,在第一方面的第三种可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
结合第一方面的第三种可能的实施方式,在第一方面的第四种可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于 所述二值化分块模板i的右半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
结合第一方面或第一方面的第一种至第三种可能的实施方式中的任意一种可能的实施方式,在第一方面的第五种可能的实施方式中,所述下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
结合第一方面或第一方面的第一种至第五种可能的实施方式中的任意一种可能的实施方式,在第一方面的第六种可能的实施方式中,所述对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板包括:基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y) 的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
结合第一方面或第一方面的第一种至第六种可能的实施方式中的任意一种可能的实施方式,在第一方面的第七种可能的实施方式中,所述N/P等于所述M/Q。
结合第一方面或者第一方面的第一种至第七种可能的实施方式中的任意一种可能的实施方式,在第一方面的第八种可能的实施方式中,所述N/P等于2或4。
结合第一方面或者第一方面的第一种至第八种可能的实施方式中的任意一种可能的实施方式,在第一方面的第九种可能的实施方式中,
所述N等于所述M,且所述N等于2的正整数次幂。
结合第一方面或者第一方面的第一种至第九种可能的实施方式中的任意一种可能的实施方式,在第一方面的第十种可能的实施方式中,所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
结合第一方面或者第一方面的第一种至第十种可能的实施方式中的任意一种可能的实施方式,在第一方面的第十一种可能的实施方式中,所述楔形查询模板集为楔形查询模板表。
结合第一方面或者第一方面的第一种至第十一种可能的实施方式中的任意一种可能的实施方式,在第一方面的第十二种可能的实施方式中,所述图像预测方法用于视频编码过程中或视频解码过程中。
本发明实施例第二方面提供一种图像预测装置,包括:
获取单元,用于获取尺寸为N*M的图像块的楔形查询模板集;
下采样处理单元,用于对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;
添加单元,用于将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中;
预测单元,用于利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,其中,N/P等于2的正整数倍,M/Q等于2的正整数倍。
结合第二方面,在第二方面的第一种可能的实施方式中,所述下采样处理单元下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
结合第二方面或第二方面的第一种可能的实施方式,在第二方面的第二种可能的实施方式中,所述下采样处理单元下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
结合第二方面或第二方面的第一种至第二种可能的实施方式中的任意一种可能的实施方式,在第二方面的第三种可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
结合第二方面的第三种可能的实施方式,在第二方面的第四种可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,所述下采样处理单元对所述二值 化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
结合第二方面或第二方面的第一种至第三种可能的实施方式中的任意一种可能的实施方式,在第二方面的第五种可能的实施方式中,所述下采样处理单元下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
结合第二方面或第二方面的第一种至第五种可能的实施方式中的任意一种可能的实施方式,在第二方面的第六种可能的实施方式中,所述下采样处理单元具体用于,基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
结合第二方面或第二方面的第一种至第六种可能的实施方式中的任意一种可能的实施方式,在第二方面的第七种可能的实施方式中,所述N/P等于所述M/Q。
结合第二方面或者第二方面的第一种至第七种可能的实施方式中的任意一种可能的实施方式,在第二方面的第八种可能的实施方式中,所述N/P等于2或4。
结合第二方面或者第二方面的第一种至第八种可能的实施方式中的任意一种可能的实施方式,在第二方面的第九种可能的实施方式中,
所述N等于所述M,且所述N等于2的正整数次幂。
结合第二方面或者第二方面的第一种至第九种可能的实施方式中的任意一种可能的实施方式,在第二方面的第十种可能的实施方式中,所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
结合第二方面或者第二方面的第一种至第十种可能的实施方式中的任意一种可能的实施方式,在第二方面的第十一种可能的实施方式中,所述楔形查询模板集为楔形查询模板表。
结合第二方面或者第二方面的第一种至第十一种可能的实施方式中的任意一种可能的实施方式,在第二方面的第十二种可能的实施方式中,所述图像预测装置用于视频编码装置中或视频解码装置中。
本发明实施例第三方面提供一种模板处理装置,包括:
处理器和存储器;
其中,所述处理器通过调用所述存储器中的代码或指令以用于,获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中;利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;所述N和所述M为正整数,其中,N/P等于2的正整数倍,M/Q等于2的正整数倍。
结合第三方面,在第三方面的第一种可能的实施方式中,所述处理器下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
结合第三方面或第三方面的第一种可能的实施方式,在第三方面的第二种可能的实施方式中,所述处理器下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
结合第三方面或第三方面的第一种至第二种可能的实施方式中的任意一种可能的实施方式,在第三方面的第三种可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,所述处理器对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
结合第三方面的第三种可能的实施方式,在第三方面的第四种可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于 所述二值化分块模板i的上半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
结合第三方面或第三方面的第一种至第三种可能的实施方式中的任意一种可能的实施方式,在第三方面的第五种可能的实施方式中,所述处理器下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
结合第三方面或第三方面的第一种至第五种可能的实施方式中的任意一种可能的实施方式,在第三方面的第六种可能的实施方式中,所述处理器具体用于,基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
结合第三方面或第三方面的第一种至第六种可能的实施方式中的任意一种可能的实施方式,在第三方面的第七种可能的实施方式中,所述N/P等于所述M/Q。
结合第三方面或者第三方面的第一种至第七种可能的实施方式中的任意 一种可能的实施方式,在第三方面的第八种可能的实施方式中,所述N/P等于2或4。
结合第三方面或者第三方面的第一种至第八种可能的实施方式中的任意一种可能的实施方式,在第三方面的第九种可能的实施方式中,所述N等于所述M,且所述N等于2的正整数次幂。
结合第三方面或者第三方面的第一种至第九种可能的实施方式中的任意一种可能的实施方式,在第三方面的第十种可能的实施方式中,所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
结合第三方面或者第三方面的第一种至第十种可能的实施方式中的任意一种可能的实施方式,在第三方面的第十一种可能的实施方式中,所述楔形查询模板集为楔形查询模板表。
结合第三方面或者第三方面的第一种至第十一种可能的实施方式中的任意一种可能的实施方式,在第三方面的第十二种可能的实施方式中,所述图像预测装置用于视频编码装置中或视频解码装置中。
可以看出,本发明实施例方案中,先获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。也就是说,尺寸为P*Q的图像块的楔形查询模板集是通过对尺寸为N*M的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得的,基于这种机制,编解码端无需按现有机制事先基于尺寸为P*Q的图像块的楔形参考模板集来生成尺寸为P*Q的图像块的楔形查询模板集,也无需事先存储基于尺寸为P*Q的图像块的楔形参考模板集生成的尺寸为P*Q的图像块的楔形参考模板集。可见,上述技术方案有利于极大的降低编解码设备存储楔形查询模板集所需存储空间。
附图说明
为了更清楚地说明本发明实施例技术方案,下面将对实施例和现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。
图1-a~图1-c为本发明实施例提供的几种图像块的划分示意图;
图2为本发明实施例提供的一种图像预测方法的流程示意图;
图3为本发明实施例提供的另一种图像预测方法的流程示意图;
图4为本发明实施例提供的另一种图像预测方法的流程示意图;
图5-a~图5-k为本发明实施例提供的几种模板下采样处理方式的示意图;
图6为本发明实施例提供的一种图像预测装置的示意图;
图7为本发明实施例提供的另一种图像预测装置的示意图。
具体实施方式
本发明实施例提供图像预测方法和相关设备,以期降低编解码设备存储楔形查询模板集所需存储空间。
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明的一部分实施例,而非全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
本发明图像预测方法的一个实施例。一种图像预测方法可包括:获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。
首先参见图2,图2为本发明的一个实施例提供的一种图像预测方法的流程 示意图。其中,如图2所示,本发明的一个实施例提供的一种图像预测方法可以包括:
201、获取尺寸为N*M的图像块的楔形查询模板集。
其中,所述N和所述M为正整数。
其中,所述N可等于或不等于M,例如所述N可大于或小于所述M。
可选的,在本发明的一些可能的实施方式中,所述N例如可等于2的正整数次幂。所述M例如也可等于2的正整数次幂。
例如所述N可等于2、4、8、16、30、64或其他值。
举例来说,尺寸为N*M的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
其中,本发明的各实施例提及的图像块可指深度图的图像块或其他类型图像的图像块。例如,上述尺寸为N*M的图像块可为深度图的尺寸为N*M的图像块。
202、对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K正整数。
其中,所述K个二值化分块模板例如可为所述尺寸为N*M的图像块的楔形查询模板集中的部分或全部二值化分块模板。
例如所述K可等于1、2、3、4、10、15、30、50、65或其他值。
203、将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中。
204、利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测。
其中,所述P和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。
其中,所述P可等于或不等于Q,例如所述P可大于或小于所述Q。
可选的,在本发明的一些可能的实施方式中,所述P例如可等于2的正整数次幂。所述Q例如也可等于2的正整数次幂。
例如所述P可等于2、4、8、16、30、64或其他值。
举例来说,尺寸为P*Q的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
可以理解,在本发明的各实施例中,尺寸为N*M的图像块的楔形查询模板集中的各二值化分块模板对应的尺寸为N*M。尺寸为P*Q的图像块的楔形查询模板集中的各二值化分块模板对应的尺寸为P*Q,以此类推。
可以看出,本实施例方案中,先获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。也就是说,尺寸为P*Q的图像块的楔形查询模板集是通过对尺寸为N*M的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得的,基于这种机制,编解码端无需按现有机制事先基于尺寸为P*Q的图像块的楔形参考模板集来生成尺寸为P*Q的图像块的楔形查询模板集,也无需事先存储基于尺寸为P*Q的图像块的楔形参考模板集生成的尺寸为P*Q的图像块的楔形参考模板集。可见,上述技术方案有利于极大的降低编解码设备存储楔形查询模板集所需存储空间。
例如编解码设备可存储尺寸为16*16的图像块的楔形查询模板集,但不存储尺寸为8*8的图像块的楔形查询模板集,也可不存储尺寸为4*4的图像块的楔形查询模板集。当需要使用尺寸为8*8的图像块的楔形查询模板集时,编解码设备可通过对16*16的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得尺寸为8*8的图像块的楔形查询模板集。当需要使用尺寸为4*4 的图像块的楔形查询模板集时,编解码设备也可通过对16*16的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得尺寸为4*4的图像块的楔形查询模板集,可见,上述技术方案有利于极大的降低编解码设备存储楔形查询模板集所需存储空间。
其中,可根据具体场景的需要来选择所述下采样处理所使用的x方向的下采样偏移量xOffset,可根据具体场景的需要来选择所述下采样处理所使用的y方向的下采样偏移量yOffset。
例如,对于各种楔形分割方向的二值化分块模板,x方向的下采样偏移量xOffset可相同或不相同。对于各种楔形分割方向的二值化分块模板,y方向的下采样偏移量yOffset可相同或不相同。
可选的,在所述下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
例如若N/P等2,则下采样偏移量xOffset可等于0或1。若N/P等4,则下采样偏移量xOffset可等于0或1或2或3,若N/P等8,则下采样偏移量xOffset可等于0或1或2或3或4或5或6或7,以此类推。
可选的,在本发明的一些可能的实施方式中,所述下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
例如若M/Q等2,则下采样偏移量xOffset可等于0或1。若M/Q等4,则下采样偏移量xOffset可等于0或1或2或3,若M/Q等8,则下采样偏移量xOffset可等于0或1或2或3或4或5或6或7,以此类推。
可选的,在本发明一些可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板包括:基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板。
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
当然,也可采样其他的下采样处理方式,来对所述对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板。
其中,所述N/P可等于或不等于所述M/Q。
可选的,在本发明的一些可能的实施方式中,所述N/P等于2或4。
可选的,在本发明的一些可能的实施方式中,所述N等于所述M且所述N等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述P等于所述Q且所述P等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述楔形查询模板集为楔形查询模板表(lookup table)或其他形式的楔形查询模板集。
可选的,在本发明的一些可能的实施方式中,所述图像预测方法可以用于视频编码过程中或视频解码过程中。举例来说,在视频编码过程中或视频解码过程中,例如所述尺寸为N*M的图像块的楔形模板集可被用于对尺寸为N*M的图像块进行预测等。即可利用尺寸为N*M的图像块的楔形模板集对尺寸为N*M的图像块进行预测。例如所述尺寸为P*Q的图像块的楔形模板集可被用于对尺寸为P*Q的图像块进行预测等。即可利用尺寸为P*Q的图像块的楔形模板集对尺寸为P*Q的图像块进行预测。其中,所述模板处理方法的执行主体可为视频编码装置或视频解码装置。该视频编码装置或视频解码装置可以是任何需要输出或存储视频的装置,如笔记本电脑、平板电脑、个人电脑、手机、数字电视或视频服务器等设备。
为便于更好的理解和实施本发明实施例的上述方案,下面结合一些具体的应用场景进行举例说明。
请参见图3,图3为本发明的一个实施例提供的一种图像预测方法的流程示意图。本实施例从视频编码装置的角度进行举例描述。如图3所示,本发明的一个实施例提供的一种图像预测方法可以包括:
301、视频编码装置获取尺寸为N*M的图像块的楔形查询模板集。
其中,所述N和所述M为正整数。
其中,所述N可等于或不等于M,例如所述N可大于或小于所述M。
可选的,在本发明的一些可能的实施方式中,所述N例如可等于2的正整数次幂。所述M例如也可等于2的正整数次幂。
例如所述N可等于2、4、8、16、30、64或其他值。
举例来说,尺寸为N*M的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
其中,本发明的各实施例提及的图像块可指深度图的图像块或其他类型图像的图像块。例如,所述尺寸为N*M的图像块可为深度图的尺寸为N*M的图像块。
302、视频编码装置设置i=1。
303、视频编码装置对所述尺寸为N*M的图像块的楔形查询模板集之中的第i个二值化分块模板进行下采样处理,以得到下采样处理后的第i个二值化分块模板。
可选的,在本发明一些可能实施方式中,所述视频编码装置对所述尺寸为N*M的图像块的楔形查询模板集之中的第i个二值化分块模板进行下采样处理以得到下采样处理后的第i个二值化分块模板包括:基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板。
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
304、视频编码装置将得到的下采样处理后的第i个二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集。
305、i=i+1。
306、视频编码装置判断所述i是否大于所述尺寸为N*M的图像块的楔形查询模板集当前包括的二值化分块模板总数。
若否,则执行步骤303。
若是,则执行步骤307。
307、视频编码装置利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测。
其中,所述P和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。
其中,所述P可等于或不等于Q,例如所述P可大于或小于所述Q。
可选的,在本发明的一些可能的实施方式中,所述P例如可等于2的正整数次幂。所述Q例如也可等于2的正整数次幂。
例如所述P可等于2、4、8、16、30、64或其他值。
举例来说,尺寸为P*Q的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
可以理解,在本发明的各实施例中,尺寸为N*M的图像块的楔形查询模板集中的各二值化分块模板对应的尺寸为N*M。尺寸为P*Q的图像块的楔形查询 模板集中的各二值化分块模板对应的尺寸为P*Q,以此类推。
其中,可根据具体场景的需要来选择所述下采样处理所使用的x方向的下采样偏移量xOffset,可根据具体场景的需要来选择所述下采样处理所使用的y方向的下采样偏移量yOffset。
例如,对于各种楔形分割方向的二值化分块模板,x方向的下采样偏移量xOffset可相同或不相同。对于各种楔形分割方向的二值化分块模板,y方向的下采样偏移量yOffset可相同或不相同。
可选的,在所述下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
可选的,在本发明的一些可能的实施方式中,所述下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
可选的,在本发明一些可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的 y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
其中,所述N/P可等于或不等于所述M/Q。
可选的,在本发明的一些可能的实施方式中,所述N/P等于2或4。
可选的,在本发明的一些可能的实施方式中,所述N等于所述M且所述N等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述P等于所述Q且所述P等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述楔形查询模板集为楔形查询模板表或其他形式的楔形查询模板集。
可以看出,本实施例方案中,视频编码设备可先获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的 正整数倍,M/Q等于2的正整数倍。也就是说,尺寸为P*Q的图像块的楔形查询模板集是通过对尺寸为N*M的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得的,基于这种机制,编码端无需按现有机制事先基于尺寸为P*Q的图像块的楔形参考模板集来生成尺寸为P*Q的图像块的楔形参考模板集,也无需事先存储基于尺寸为P*Q的图像块的楔形参考模板集生成的尺寸为P*Q的图像块的楔形参考模板集。可见,上述技术方案有利于极大的降低编码设备存储楔形查询模板集所需存储空间。
例如编解码设备可存储尺寸为16*16的图像块的楔形查询模板集,但不存储尺寸为8*8的图像块的楔形查询模板集,也可不存储尺寸为4*4的图像块的楔形查询模板集。当需要使用尺寸为8*8的图像块的楔形查询模板集时,编解码设备可通过对16*16的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得尺寸为8*8的图像块的楔形查询模板集。当需要使用尺寸为4*4的图像块的楔形查询模板集时,编解码设备也可通过对16*16的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得尺寸为4*4的图像块的楔形查询模板集,可见,上述技术方案有利于极大的降低编解码设备存储楔形查询模板集所需存储空间。
例如,当前图像块的尺寸为8*8,那么编码设备可通过对尺寸16*16的图像块的楔形查询模板表中的二值化分块模板进行下采样处理,获得尺寸为8*8的图像块的楔形查询模板表,编码设备在通过下采样处理而得到的尺寸为8*8的图像块的楔形查询模板表中搜索当前图像块的最优二值化分块模板,并将该最优二值化分块模板的索引写入视频码流中,其中,该最优二值化分块模板的索引的编码位数可等于编码尺寸为16*16的图像块的楔形查询模板表中的一个二值化分块模板的索引的编码位数。因为,尺寸为8*8的图像块的楔形查询模板表通过尺寸为16*16的图像块的楔形查询模板表下采样获得,若两个楔形查询模板表中的二值化分块模板的数量相同,则编码两个楔形查询模板表中的二值化分块模板的索引的编码位数亦可相同,而解码设备则可根据码流中的最优二值化分块模板的索引,在尺寸为16*16的图像块的楔形查询模板表中查到与之对应的二值化分块模板,利用查到的与之对应的二值化分块模板的下采样结果 来进行当前图像块的预测等。
请参见图4,图4为本发明的一个实施例提供的一种图像预测方法的流程示意图。本实施例从视频解码装置的角度进行举例描述。如图4所示,本发明的一个实施例提供的一种图像预测方法可以包括:
401、视频解码装置获取尺寸为N*M的图像块的楔形查询模板集。
其中,所述N和所述M为正整数。
其中,所述N可等于或不等于M,例如所述N可大于或小于所述M。
可选的,在本发明的一些可能的实施方式中,所述N例如可等于2的正整数次幂。所述M例如也可等于2的正整数次幂。
例如所述N可等于2、4、8、16、40、64或其他值。
举例来说,尺寸为N*M的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
其中,本发明的各实施例提及的图像块可指深度图的图像块或其他类型图像的图像块。例如,所述尺寸为N*M的图像块可为深度图的尺寸为N*M的图像块。
402、视频解码装置设置i=1。
403、视频解码装置对所述尺寸为N*M的图像块的楔形查询模板集之中的第i个二值化分块模板进行下采样处理,以得到下采样处理后的第i个二值化分块模板。
可选的,在本发明一些可能实施方式中,所述视频解码装置对所述尺寸为N*M的图像块的楔形查询模板集之中的第i个二值化分块模板进行下采样处理以得到下采样处理后的第i个二值化分块模板包括:基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板。
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
404、视频解码装置将得到的下采样处理后的第i个二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集。
405、i=i+1。
406、视频解码装置判断所述i是否大于所述尺寸为N*M的图像块的楔形查询模板集当前包括的二值化分块模板总数。
若否,则执行步骤403。
若是,则执行步骤407。
407、视频解码装置利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测。
其中,所述P和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。
其中,所述P可等于或不等于Q,例如所述P可大于或小于所述Q。
可选的,在本发明的一些可能的实施方式中,所述P例如可等于2的正整数次幂。所述Q例如也可等于2的正整数次幂。
例如所述P可等于2、4、8、16、40、64或其他值。
举例来说,尺寸为P*Q的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
可以理解,在本发明的各实施例中,尺寸为N*M的图像块的楔形查询模板集中的各二值化分块模板对应的尺寸为N*M。尺寸为P*Q的图像块的楔形查询模板集中的各二值化分块模板对应的尺寸为P*Q,以此类推。
其中,可根据具体场景的需要来选择所述下采样处理所使用的x方向的下 采样偏移量xOffset,可根据具体场景的需要来选择所述下采样处理所使用的y方向的下采样偏移量yOffset。
例如,对于各种楔形分割方向的二值化分块模板,x方向的下采样偏移量xOffset可相同或不相同。对于各种楔形分割方向的二值化分块模板,y方向的下采样偏移量yOffset可相同或不相同。
可选的,在所述下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
可选的,在本发明的一些可能的实施方式中,所述下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
可选的,在本发明一些可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为 上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
其中,可选的,在本发明的一些可能的实施方式中,在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
其中,所述N/P可等于或不等于所述M/Q。
可选的,在本发明的一些可能的实施方式中,所述N/P等于2或4。
可选的,在本发明的一些可能的实施方式中,所述N等于所述M且所述N等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述P等于所述Q且所述P等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述楔形查询模板集为楔形查询模板表或其他形式的楔形查询模板集。
可以看出,本实施例方案中,视频解码设备可先获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。也就是说,尺寸为P*Q的图像块的楔形查询模板集是通过对尺寸为N*M的图像块的楔形查询模板集中的二值化分块模 板进行下采样处理来获得的,基于这种机制,编码端无需按现有机制事先基于尺寸为P*Q的图像块的楔形参考模板集来生成尺寸为P*Q的图像块的楔形参考模板集,也无需事先存储基于尺寸为P*Q的图像块的楔形参考模板集生成的尺寸为P*Q的图像块的楔形参考模板集。可见,上述技术方案有利于极大的降低编码设备存储楔形查询模板集所需存储空间。
下面通过一些更为具体的应用场景来举例,下采样处理所使用的x方向的下采样偏移量xOffset和y方向的下采样偏移量yOffset可能取值。
举例场景1,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,不管该二值化分块模板对应的楔形划分方向是那个方向,在进行下采样处理时所使用的x方向的下采样偏移量xOffset=0。y方向的下采样偏移量yOffset=1。
图5-a示出了场景1条件下的一种可能的下采样结果,图5-a的左边举例示出了尺寸为16×16的图像块的楔形模版查询表中的一个二值化分块模板。图5-a的右边则举例示出了对尺寸为16×16的图像块的楔形模版查询表中的一个二值化分块模板进行下采样处理,从而得到的尺寸为16×16的图像块的楔形模版查询表中的一个二值化分块模板。其中,在进行下采样处理时所使用的x方向的下采样偏移量xOffset=0。y方向的下采样偏移量yOffset=1。
举例场景2,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,如果该二值化分块模板对应的楔形划分方向为Ori=0,1,2,3,则xOffset=0,yOffset=1。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的左半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的上半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的右半部分的情况下,则xOffset=1,yOffset=0。若该二值化分块模 板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的下半部分的情况下,则xOffset=0,yOffset=1。
图5-b举例示出了在Ori=0,1,2,3,xOffset=0,yOffset=1的情况下的一种可能的下采样结果。
图5-c举例示出了在Ori=4或Ori=5,xOffset=0,yOffset=0的情况下的一种可能的下采样结果。
图5-d举例示出了在Ori=4,xOffset=1,yOffset=0的情况下的一种可能的下采样结果。
举例场景3,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,不管该二值化分块模板对应的楔形划分方向是那个方向,在进行下采样处理时所使用的x方向的下采样偏移量xOffset=0。y方向的下采样偏移量yOffset=0。
图5-e举例示出了场景3中,在xOffset=0,yOffset=0的情况下的一种可能的下采样结果。
举例场景4,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,如果该二值化分块模板对应的楔形划分方向为Ori=0,1,2,3,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的左半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的上半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的右半部分的情况下,则xOffset=1,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的下半部分的情况下,则xOffset=0,yOffset=1。
举例场景5,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来 得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,不管该二值化分块模板对应的楔形划分方向是那个方向,在进行下采样处理时所使用的x方向的下采样偏移量xOffset=1。y方向的下采样偏移量yOffset=0。
图5-f举例示出了场景5中,在xOffset=1,yOffset=0的情况下的一种可能的下采样结果。
举例场景6,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,如果该二值化分块模板对应的楔形划分方向为Ori=0,1,2,3,则xOffset=1,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的左半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的上半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的右半部分的情况下,则xOffset=1,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的下半部分的情况下,则xOffset=0,yOffset=1。
举例场景7,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,不管该二值化分块模板对应的楔形划分方向是那个方向,在进行下采样处理时所使用的x方向的下采样偏移量xOffset=1。y方向的下采样偏移量yOffset=1。
图5-g举例示出了场景7中,在xOffset=1,yOffset=1的情况下的一种可能的下采样结果。
举例场景7,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,如果该二值化分块模板对应 的楔形划分方向为Ori=0,1,2,3,则xOffset=1,yOffset=1。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的左半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的上半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的右半部分的情况下,则xOffset=1,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的下半部分的情况下,则xOffset=0,yOffset=1。
举例场景8,以通过对尺寸为16×16的图像块的楔形模版查询表下采样来得到尺寸为8×8的图像块的楔形模版查询表为例。例如,对于16×16的图像块的楔形模版查询表中的任意一个二值化分块模板,如果该二值化分块模板对应的楔形划分方向为Ori=0,则xOffset=0,yOffset=0。如果该二值化分块模板对应的楔形划分方向为Ori=1,则xOffset=1,yOffset=0。如果该二值化分块模板对应的楔形划分方向为Ori=2,则xOffset=1,yOffset=1。如果该二值化分块模板对应的楔形划分方向为Ori=3,则xOffset=0,yOffset=1。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的左半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的上半部分的情况下,则xOffset=0,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=4,且该二值化分块模板的楔形分割线位于该二值化分块模板的右半部分的情况下,则xOffset=1,yOffset=0。若该二值化分块模板对应的楔形划分方向为Ori=5,且该二值化分块模板的楔形分割线位于该二值化分块模板的下半部分的情况下,则xOffset=0,yOffset=1。
图5-h~图5-k举例示出了场景8中的几种可能的下采样结果。
可以理解,上述举例的几个场景主要是为了举例说明在进行下采样处理时所使用的x方向的下采样偏移量xOffset和y方向的下采样偏移量yOffset的取值的灵活性,当然也不限上述举例的取值方式。
参见图6,本发明实施例还提供一种图像预测装置600,可包括:
获取单元610,用于获取尺寸为N*M的图像块的楔形查询模板集。
下采样处理单元620,用于对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数。
添加单元630,用于将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中。
预测单元640,用于利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,其中,N/P等于2的正整数倍,M/Q等于2的正整数倍。
其中,所述N和所述M为正整数。
其中,所述N可等于或不等于M,例如所述N可大于或小于所述M。
可选的,在本发明的一些可能的实施方式中,所述N例如可等于2的正整数次幂。所述M例如也可等于2的正整数次幂。
例如所述N可等于2、4、8、16、30、64或其他值。
举例来说,尺寸为N*M的图像块例如可为尺寸为2*2的图像块、尺寸为4*4的图像块、尺寸为8*8的图像块、尺寸为16*16的图像块、尺寸为32*32的图像块或尺寸为64*64的图像块、尺寸为8*16的图像块、尺寸为32*16的图像块或其他尺寸的图像块。
其中,本发明的各实施例提及的图像块可指深度图的图像块或其他类型图像的图像块。例如,上述尺寸为N*M的图像块可为深度图的尺寸为N*M的图像块。
可选的,在本发明的一些可能的实施方式中,
所述下采样处理单元下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
可选的,在本发明的一些可能的实施方式中,
所述下采样处理单元下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
可选的,在本发明的一些可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对 所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述下采样处理单元下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述下采样处理单元具体用于,基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
可选的,在本发明的一些可能的实施方式中,所述N/P等于所述M/Q。
可选的,在本发明的一些可能的实施方式中,所述N/P等于2或4。
可选的,在本发明的一些可能的实施方式中,所述N等于所述M,且所述N等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
可选的,在本发明的一些可能的实施方式中,所述楔形查询模板集可为楔形查询模板表。
可选的,在本发明的一些可能的实施方式中,所述图像预测装置用于视频编码装置中或视频解码装置中。
可以理解的是,本实施例的图像预测装置600的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
可以看出,本实施例方案中,图像预测装置600先获取尺寸为N*M的图像 块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。也就是说,尺寸为P*Q的图像块的楔形查询模板集是通过对尺寸为N*M的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得的,基于这种机制,编解码端无需按现有机制事先基于尺寸为P*Q的图像块的楔形参考模板集来生成尺寸为P*Q的图像块的楔形查询模板集,也无需事先存储基于尺寸为P*Q的图像块的楔形参考模板集生成的尺寸为P*Q的图像块的楔形参考模板集。可见,上述技术方案有利于极大的降低编解码设备存储楔形查询模板集所需存储空间。
参见图7,本发明实施例还提供一种图像预测装置700,可包括:
处理器702和存储器703;其中,处理器702和存储器703通过总线701耦合连接。
其中,所述处理器702通过调用所述存储器中的代码或指令以用于,获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中;利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;所述N和所述M为正整数,其中,N/P等于2的正整数倍,M/Q等于2的正整数倍。
可选的,在本发明的一些可能的实施方式中,所述处理器下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
可选的,在本发明的一些可能的实施方式中,所述处理器下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
可选的,在本发明的一些可能的实施方式中,在二值化分块模板i的楔形分割方向为分割方向a的情况下,所述处理器对所述二值化分块模板i进行下采 样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,所述处理器对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
可选的,在本发明的一些可能的实施方式中,在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
或者,
在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述处理器下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下 采样偏移量yOffset。
可选的,在本发明的一些可能的实施方式中,所述处理器具体用于,基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
WedPattern_P*Q[i][x][y]=
WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
可选的,在本发明的一些可能的实施方式中,所述N/P等于所述M/Q。
可选的,在本发明的一些可能的实施方式中,所述N/P等于2或4。
可选的,在本发明的一些可能的实施方式中,
所述N等于所述M,且所述N等于2的正整数次幂。
可选的,在本发明的一些可能的实施方式中,所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
可选的,在本发明的一些可能的实施方式中,所述楔形查询模板集可为楔形查询模板表。
可选的,在本发明的一些可能的实施方式中,所述图像预测装置700用于视频编码装置中或视频解码装置中。
可以理解的是,本实施例的模板处理装置700的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
可以看出,本实施例方案中,图像预测装置700先获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图 像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。也就是说,尺寸为P*Q的图像块的楔形查询模板集是通过对尺寸为N*M的图像块的楔形查询模板集中的二值化分块模板进行下采样处理来获得的,基于这种机制,编解码端无需按现有机制事先基于尺寸为P*Q的图像块的楔形参考模板集来生成尺寸为P*Q的图像块的楔形查询模板集,也无需事先存储基于尺寸为P*Q的图像块的楔形参考模板集生成的尺寸为P*Q的图像块的楔形参考模板集。可见,上述技术方案有利于极大的降低编解码设备存储楔形查询模板集所需存储空间。
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任意一种图像预测方法的部分或全部步骤。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可能可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者 也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以为个人计算机、服务器或者网络设备等,具体可以是计算机设备中的处理器)执行本发明各个实施例上述方法的全部或部分步骤。其中,而前述的存储介质可包括:U盘、移动硬盘、磁碟、光盘、只读存储器(ROM,Read-Only Memory)或者随机存取存储器(RAM,Random Access Memory)等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (39)

  1. 一种图像预测方法,其特征在于,包括:
    获取尺寸为N*M的图像块的楔形查询模板集;
    对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;
    将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中,利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,N/P等于2的正整数倍,M/Q等于2的正整数倍。
  2. 根据权利要求1所述的方法,其特征在于,
    所述下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
  3. 根据权利要求1或2所述的方法,其特征在于,
    所述下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,在二值化分块模板i的楔形分割方向为分割方向a的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
    其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
  5. 根据权利要求4所述的方法,其特征在于,
    在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进 行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
  6. 根据权利要求1至4任一项所述的方法,其特征在于,所述下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板包括:基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
    WedPattern_P*Q[i][x][y]=
    WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
    其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺 寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述N/P等于所述M/Q。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,
    所述N/P等于2或4。
  10. 根据权利要求1至9任一项所述的方法,其特征在于,
    所述N等于所述M,且所述N等于2的正整数次幂。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,
    所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
  12. 根据权利要求1至11任一项所述的方法,其特征在于,所述楔形查询模板集为楔形查询模板表。
  13. 根据权利要求1至12任一项所述的方法,其特征在于,所述图像预测方法用于视频编码过程中或视频解码过程中。
  14. 一种图像预测装置,其特征在于,包括:
    获取单元,用于获取尺寸为N*M的图像块的楔形查询模板集;
    下采样处理单元,用于对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;
    添加单元,用于将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中;
    预测单元,用于利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;其中,所述N和所述M为正整数,其中,N/P等于2的正整数倍,M/Q等于2的正整数倍。
  15. 根据权利要求14所述的图像预测装置,其特征在于,
    所述下采样处理单元下采样处理所使用的x方向的下采样偏移量xOffset为 小于所述N/P且大于或者等于0的整数。
  16. 根据权利要求14或15所述的装置,其特征在于,
    所述下采样处理单元下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
  17. 根据权利要求14至16任一项所述的装置,其特征在于,在二值化分块模板i的楔形分割方向为分割方向a的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
    其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
  18. 根据权利要求17所述的装置,其特征在于,
    在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,所述下采样处理单元对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
  19. 根据权利要求14至17任一项所述的装置,其特征在于,所述下采样处理单元下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
  20. 根据权利要求14至19任一项所述的装置,其特征在于,所述下采样处理单元具体用于,基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
    WedPattern_P*Q[i][x][y]=
    WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
    其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
  21. 根据权利要求14至20任一项所述的装置,其特征在于,所述N/P等于所述M/Q。
  22. 根据权利要求14至21任一项所述的装置,其特征在于,
    所述N/P等于2或4。
  23. 根据权利要求14至22任一项所述的装置,其特征在于,
    所述N等于所述M,且所述N等于2的正整数次幂。
  24. 根据权利要求14至23任一项所述的装置,其特征在于,
    所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
  25. 根据权利要求14至24任一项所述的装置,其特征在于,所述楔形查询模板集为楔形查询模板表。
  26. 根据权利要求14至25任一项所述的装置,其特征在于,所述图像预测装置用于视频编码装置中或视频解码装置中。
  27. 一种模板处理装置,其特征在于,包括:
    处理器和存储器;
    其中,所述处理器通过调用所述存储器中的代码或指令以用于,获取尺寸为N*M的图像块的楔形查询模板集;对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板,所述K大于0的整数;将得到的所述K个下采样处理后的二值化分块模板添加到尺寸为P*Q的图像块的楔形查询模板集中;利用所述尺寸为P*Q的图像块的楔形查询模板集对尺寸为P*Q的图像块进行预测;所述N和所述M为正整数,其中,N/P等于2的正整数倍,M/Q等于2的正整数倍。
  28. 根据权利要求27所述的图像预测装置,其特征在于,
    所述处理器下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数。
  29. 根据权利要求27或28所述的装置,其特征在于,
    所述处理器下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数。
  30. 根据权利要求27至29任一项所述的装置,其特征在于,在二值化分块模板i的楔形分割方向为分割方向a的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset为小于所述N/P且大于或者等于0的整数,和/或,所述处理器对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset为小于所述M/Q且大于或者等于0的整数;
    其中,所述二值化分块模板i为所述尺寸为N*M的图像块的楔形查询模板集中的任意1个二值化分块模板,所述分割方向a为左上方向、右上方向、左下方向、右下方向、左右方向或上下方向。
  31. 根据权利要求30所述的装置,其特征在于,
    在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的左半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为左右方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的右半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的上半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset;
    或者,
    在所述分割方向a为上下方向,且所述二值化分块模板i的楔形分割线位于所述二值化分块模板i的下半部分的情况下,所述处理器对所述二值化分块模板i进行下采样处理所使用的x方向的下采样偏移量xOffset,不等于对所述二值化分块模板i进行下采样处理所使用的y方向的下采样偏移量yOffset。
  32. 根据权利要求27至31任一项所述的装置,其特征在于,所述处理器下采样处理所使用的x方向的下采样偏移量xOffset,不等于所述下采样处理所使用的y方向的下采样偏移量yOffset。
  33. 根据权利要求27至32任一项所述的装置,其特征在于,所述处理器具体用于,基于如下公式,对所述尺寸为N*M的图像块的楔形查询模板集之中的K个二值化分块模板进行下采样处理以得到K个下采样处理后的二值化分块模板;
    WedPattern_P*Q[i][x][y]=
    WedPattern_N*M[i][(x<<1)+xOffset][(y<<1)+yOffset]
    其中,所述x表示x方向的坐标,所述y表示y方向的坐标,所述i表示楔形查询模板集中二值化分块模板的编号,所述WedPattern_P*Q[i][x][y]表示所述尺寸为P*Q的图像块的楔形查询模板集中的二值化分块模板i中的坐标为(x,y)的像素点的下采样结果,所述yOffset表示y方向的下采样偏移量,所述xOffset表示x方向的下采样偏移量。
  34. 根据权利要求27至33任一项所述的装置,其特征在于,所述N/P等于所述M/Q。
  35. 根据权利要求27至34任一项所述的装置,其特征在于,
    所述N/P等于2或4。
  36. 根据权利要求27至35任一项所述的装置,其特征在于,
    所述N等于所述M,且所述N等于2的正整数次幂。
  37. 根据权利要求27至36任一项所述的装置,其特征在于,
    所述K个二值化分块模板为所述尺寸为N*M的图像块的楔形查询模板集之中的全部二值化分块模板。
  38. 根据权利要求27至37任一项所述的装置,其特征在于,所述楔形查询模板集为楔形查询模板表。
  39. 根据权利要求27至38任一项所述的装置,其特征在于,所述图像预测装置用于视频编码装置中或视频解码装置中。
PCT/CN2015/072347 2015-02-05 2015-02-05 图像预测处理方法和相关设备 Ceased WO2016123783A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580001241.0A CN105637865B (zh) 2015-02-05 2015-02-05 图像预测处理方法和相关设备
PCT/CN2015/072347 WO2016123783A1 (zh) 2015-02-05 2015-02-05 图像预测处理方法和相关设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/072347 WO2016123783A1 (zh) 2015-02-05 2015-02-05 图像预测处理方法和相关设备

Publications (1)

Publication Number Publication Date
WO2016123783A1 true WO2016123783A1 (zh) 2016-08-11

Family

ID=56050774

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072347 Ceased WO2016123783A1 (zh) 2015-02-05 2015-02-05 图像预测处理方法和相关设备

Country Status (2)

Country Link
CN (1) CN105637865B (zh)
WO (1) WO2016123783A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107592538B (zh) * 2017-09-06 2019-07-23 华中科技大学 一种降低立体视频深度图编码复杂度的方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790892A (zh) * 2012-07-05 2012-11-21 清华大学 深度图编码方法及装置
WO2013068562A1 (en) * 2011-11-11 2013-05-16 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Effective wedgelet partition coding
WO2014005248A1 (en) * 2012-07-02 2014-01-09 Qualcomm Incorporated Intra-coding of depth maps for 3d video coding
CN104079942A (zh) * 2014-06-25 2014-10-01 华为技术有限公司 一种图像处理方法、装置及系统
CN104221379A (zh) * 2011-11-11 2014-12-17 弗兰霍菲尔运输应用研究公司 自适应分区编码
CN104247427A (zh) * 2011-11-11 2014-12-24 弗兰霍菲尔运输应用研究公司 使用分区编码的有效预测

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013068562A1 (en) * 2011-11-11 2013-05-16 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Effective wedgelet partition coding
CN104221379A (zh) * 2011-11-11 2014-12-17 弗兰霍菲尔运输应用研究公司 自适应分区编码
CN104247427A (zh) * 2011-11-11 2014-12-24 弗兰霍菲尔运输应用研究公司 使用分区编码的有效预测
WO2014005248A1 (en) * 2012-07-02 2014-01-09 Qualcomm Incorporated Intra-coding of depth maps for 3d video coding
CN102790892A (zh) * 2012-07-05 2012-11-21 清华大学 深度图编码方法及装置
CN104079942A (zh) * 2014-06-25 2014-10-01 华为技术有限公司 一种图像处理方法、装置及系统

Also Published As

Publication number Publication date
CN105637865A (zh) 2016-06-01
CN105637865B (zh) 2019-11-19

Similar Documents

Publication Publication Date Title
JP7558352B2 (ja) 画像予測方法および関連装置
CN114554202B (zh) 图像数据编码/解码方法、介质和发送比特流的方法
CN104412597B (zh) 用于3d视频编码的统一视差矢量推导的方法及装置
ES2992657T3 (en) Method and apparatus for affine based inter prediction of chroma subblocks
CN120980216A (zh) 图像编码/解码方法和计算机可读记录介质
WO2014166434A1 (zh) 深度图像的编解码方法和编解码装置
JP7791141B2 (ja) クロマイントラ予測方法および装置、並びにコンピュータ記憶媒体
WO2016054975A1 (zh) 预测块的划分方法、编码设备和解码设备
WO2020146571A1 (en) Method and apparatus for dynamic point cloud partition packing
CN104618724A (zh) 视频编码或解码的方法及装置
CN106210740A (zh) 使用视图间运动预测编码深度数据的方法及其装置
WO2016123783A1 (zh) 图像预测处理方法和相关设备
CN106576169A (zh) 深度编码中用于深度建模模式的查找表尺寸减小的方法
CN105122808A (zh) 用于三维及多视图视频编码的视差向量推导的方法及装置
WO2016123774A1 (zh) 编解码方法和编解码器
CN116800985A (zh) 编解码方法和装置
WO2016123782A1 (zh) 模板处理方法和相关设备
Salehi et al. Cubic-panorama image dataset analysis for storage and transmission
HK40129156A (zh) 图像编码/解码方法和计算机可读记录介质
HK40129154A (zh) 图像编码/解码方法和计算机可读记录介质
Chiu et al. Fast Coding Unit Decision Algorithm for Compressing Depth Maps in HEVC
CN105379257A (zh) 用于三维视频编码的视差向量推导的方法及装置

Legal Events

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

Ref document number: 15880739

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15880739

Country of ref document: EP

Kind code of ref document: A1