CN103716622B - Image processing method and device - Google Patents
Image processing method and device Download PDFInfo
- Publication number
- CN103716622B CN103716622B CN201210374978.5A CN201210374978A CN103716622B CN 103716622 B CN103716622 B CN 103716622B CN 201210374978 A CN201210374978 A CN 201210374978A CN 103716622 B CN103716622 B CN 103716622B
- Authority
- CN
- China
- Prior art keywords
- filter
- image block
- target
- image
- training
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/30—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
- H04N19/33—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability in the spatial domain
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/117—Filters, e.g. for pre-processing or post-processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Processing (AREA)
Abstract
一种用于图像处理的方法,该方法包括:根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;从该备选上采样滤波器中,确定目标上采样滤波器;根据该目标上采样滤波器和基本层图像块,确定预测信息;根据该预测信息,对目标图像块进行编码处理,以生成目标码流。
A method for image processing, the method comprising: determining a first training filter according to a non-smooth region image block of an enhancement layer image and a non-smooth region image block of a base layer image, so that the first training filter satisfies : The similarity between the first prediction information determined according to the first training filter and the non-smooth region image block of the base layer image and the first original information determined according to the non-smooth region image block of the enhancement layer image satisfies the first A preset condition, wherein the base layer image corresponds to the enhancement layer image; according to the first training filter, an alternative upsampling filter is determined, wherein the candidate upsampling filter includes the first training filter; determine a target upsampling filter from the candidate upsampling filter; determine prediction information according to the target upsampling filter and the base layer image block; perform encoding processing on the target image block according to the prediction information, to generate the target code stream.
Description
技术领域technical field
本发明涉及视频处理领域,并且更具体地,涉及一种用于图像处理的用于图像处理的方法和装置。The present invention relates to the field of video processing, and more particularly, to an image processing method and device for image processing.
背景技术Background technique
随着互联网的迅猛发展以及人们物质精神文化的日益丰富,在互联网中针对视频的应用需求尤其是针对高清视频的应用需求越来越多,而高清视频的数据量非常大,要想高清视频能在带宽有限的互联网中传输,必须首先解决的问题就是高清视频压缩编码问题。With the rapid development of the Internet and the increasingly rich material and spiritual culture of people, there are more and more requirements for video applications on the Internet, especially for high-definition video applications, and the data volume of high-definition videos is very large. For transmission in the Internet with limited bandwidth, the problem that must be solved first is the problem of high-definition video compression and encoding.
在网络环境里(比如互联网),由于网络带宽是有限的,终端设备以及用户的需求都是不同的,所以为了某种特定的应用而一次压缩的码流并不是令人满意和有效的,对一些特定的用户或设备而言,甚至是没有意义的。解决这个问题的一个有效的方法就是利用可伸缩视频编码(SVC,scalable video coding)技术。在该SVC技术中,根据包括空间分辨率、时间分辨率或者信噪比强度等在内的质量参数,将一个图像分为多个图像层。SVC的目标就是让质量高的图像层尽量充分的利用质量低的图像层的信息,提高层间预测的效率,使得编码质量高的图像的时候能够效率更高。In the network environment (such as the Internet), because the network bandwidth is limited, the needs of terminal equipment and users are different, so it is not satisfactory and effective to compress the code stream for a specific application. For some specific users or devices, it may not even make sense. An effective way to solve this problem is to use scalable video coding (SVC, scalable video coding) technology. In the SVC technology, an image is divided into multiple image layers according to quality parameters including spatial resolution, temporal resolution, or signal-to-noise ratio strength. The goal of SVC is to make the high-quality image layer make full use of the information of the low-quality image layer as much as possible, improve the efficiency of inter-layer prediction, and make the encoding of high-quality images more efficient.
对质量高的图像进行分层编码时,由于分辨率不同,需要对质量低的图像进行上采样,以达到与质量高的图像一致的分辨率后,再利用质量低的图像的信息对增强层进行预测。因此,上采样的效果会对编码性能产生直接的影响,由于图像的纹理等特性的不同,通过使用多个滤波器,能够有效提升上采样的效果。When performing layered encoding on high-quality images, due to different resolutions, it is necessary to upsample low-quality images to achieve the same resolution as high-quality images, and then use the information of low-quality images to update the enhancement layer. Make predictions. Therefore, the effect of upsampling will have a direct impact on the encoding performance. Due to the difference in texture and other characteristics of the image, the effect of upsampling can be effectively improved by using multiple filters.
目前,已知一种使用多个滤波器进行上采样的技术,其对每一个4×4的图像块计算位置在1,2,3,4的四个像素的水平方向和竖直方向的二阶差分,将四个像素水平方向的二阶差分相加,作为水平(horizontal),将四个像素竖直方向的二阶差分相加,作为垂直(vertical)。从而,可以确定纹理方向(direction)。例如,如果vertical大于horizontal的两倍,则确定direction为1;如果horizontal大于vertical的两倍,则确定direction为2;如果vertical等于horizontal的两倍,则确定direction为0。其后,计算vertical及horizontal的平均值,以确定该像素块所属类型,并为每一种类型分别训练一个滤波器,这样可以使得训练所得滤波器与对应类别非常相符,但是该方法需要在编码端对滤波器的系数以及每类块所使用的滤波器的索引(index)进行编码并传输到解码端,这样才可以在解码端正确解码。如果使用这种方法对基本层重建图像进行上采样,则会导致需要传输的表示滤波器系数和index的比特太多,从而影响编码性能。At present, there is a known upsampling technique using multiple filters, which calculates the binary values of the horizontal and vertical directions of the four pixels at positions 1, 2, 3, and 4 for each 4×4 image block. First-order difference, add the second-order difference of four pixels in the horizontal direction, as horizontal (horizontal), add the second-order difference of four pixels in the vertical direction, as vertical (vertical). Thus, the texture direction can be determined. For example, if the vertical is greater than twice the horizontal, the direction is determined to be 1; if the horizontal is greater than twice the vertical, the direction is determined to be 2; if the vertical is equal to twice the horizontal, the direction is determined to be 0. After that, calculate the average value of vertical and horizontal to determine the type of the pixel block, and train a filter for each type, so that the trained filter can be very consistent with the corresponding category, but this method needs to be encoded The terminal encodes the coefficients of the filter and the index (index) of the filter used by each type of block and transmits them to the decoding terminal, so that it can be decoded correctly at the decoding terminal. If this method is used to upsample the base layer reconstructed image, too many bits representing filter coefficients and indices need to be transmitted, thereby affecting the coding performance.
发明内容Contents of the invention
本发明实施例提供一种用于图像处理的方法和装置,能够提高图像处理的效果和性能。Embodiments of the present invention provide a method and device for image processing, which can improve the effect and performance of image processing.
第一方面,提供了一种用于图像处理的方法,该方法包括:根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;从该备选上采样滤波器中,确定目标上采样滤波器;根据该目标上采样滤波器和基本层图像块,确定预测信息;根据该预测信息,对目标图像块进行编码处理,以生成目标码流,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。In a first aspect, a method for image processing is provided, the method comprising: determining a first training filter according to a non-smooth region image block of an enhancement layer image and a non-smooth region image block of a base layer image, so that the The first training filter satisfies: the difference between the first prediction information determined according to the first training filter and the non-smooth region image block of the base layer image and the first original information determined according to the non-smooth region image block of the enhancement layer image The similarity between satisfies the first preset condition, wherein the base layer image corresponds to the enhancement layer image; according to the first training filter, an alternative upsampling filter is determined, wherein the alternative upsampling filter The device includes the first training filter; from the candidate up-sampling filter, determine the target up-sampling filter; according to the target up-sampling filter and the base layer image block, determine prediction information; according to the prediction information, target The image block is encoded to generate a target code stream, wherein the target image block is located in the enhancement layer image, the base layer image block is located in the base layer image, and the space between the base image block in the base layer image The position corresponds to the spatial position of the target image block in the enhancement layer image.
在一种可能的实施方式中,该方法还包括:根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及该根据该第一训练滤波器,确定备选上采样滤波器,进一步包括:根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。In a possible implementation manner, the method further includes: determining a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter Satisfy: the similarity between the second prediction information determined according to the second training filter and the smooth region image block of the base layer image and the second original information determined according to the smooth region image block of the enhancement layer image satisfies the second Preset conditions, wherein the base layer image corresponds to the enhancement layer image; and determining a candidate upsampling filter according to the first training filter further includes: according to the first training filter and the first training filter Two training filters, determining a candidate upsampling filter, wherein the candidate upsampling filter includes the first training filter and the second training filter.
结合第一方面和第一种可能的实施方式,在第二种可能的实施方式中,该从备选上采样滤波器中,确定目标上采样滤波器,包括:根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;根据该目标图像块的平滑度,确定该目标上采样滤波器。With reference to the first aspect and the first possible implementation manner, in a second possible implementation manner, determining the target upsampling filter from the candidate upsampling filters includes: according to the characteristics of the base layer image block information to determine the smoothness of the target image, wherein the feature information includes the coding block marking information of the base layer image block or the residual information of the base layer image block; according to the smoothness of the target image block, determine the target Upsampling filter.
结合第一方面、第一种可能的实施方式和第二种可能的实施方式,在第三种可能的实施方式中,根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,进一步包括:根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;以及该根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,包括:根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,该目标码流包括用于指示该目标上采样滤波器的第一指示信息,该第一指示信息用以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器的依据。With reference to the first aspect, the first possible implementation manner, and the second possible implementation manner, in a third possible implementation manner, according to the first training filter and the second training filter, determine the alternative upper A sampling filter, further comprising: determining a candidate upsampling filter based on the first training filter, the second training filter, and a legacy filter, wherein the candidate upsampling filter includes the first training filter , the second training filter and the conventional filter; and performing encoding processing on the target image block according to the prediction information to generate a target code stream, including: performing encoding processing on the target image block according to the prediction information , to generate a target code stream, the target code stream includes first indication information used to indicate the target upsampling filter, and the first indication information is used to obtain the target upsampling filter when decoding the above-mentioned coded target image block The basis for the filter.
结合第一方面、第一种可能的实施方式、第二种可能的实施方式和第三种可能的实施方式,在第四种可能的实施方式中,该根据该第一训练滤波器,确定备选上采样滤波器,进一步包括:根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;以及该确定目标上采样滤波器,包括:确定该目标图像块的纹理度;根据该目标图像块的纹理度,确定该目标上采样滤波器。With reference to the first aspect, the first possible implementation manner, the second possible implementation manner and the third possible implementation manner, in a fourth possible implementation manner, according to the first training filter, determine the Selecting an upsampling filter further includes: determining a candidate upsampling filter according to the first training filter and the traditional filter, wherein the candidate upsampling filter includes the first training filter and the traditional filter and determining the target up-sampling filter, including: determining the texture degree of the target image block; and determining the target up-sampling filter according to the texture degree of the target image block.
第二方面,提供了一种用于图像处理的方法,该方法包括:根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;从备选上采样滤波器中,确定目标上采样滤波器,该备选上采样滤波器包括该第一训练滤波器;根据该目标上采样滤波器和基本层图像块,确定预测信息;根据该预测信息和从目标码流中获取的残差信息,对该目标码流进行解码处理,以获取该目标图像块,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。In a second aspect, a method for image processing is provided, the method comprising: determining a first training filter according to a non-smooth region image block of an enhancement layer image and a non-smooth region image block of a base layer image, so that the The first training filter satisfies: the difference between the first prediction information determined according to the first training filter and the non-smooth region image block of the base layer image and the first original information determined according to the non-smooth region image block of the enhancement layer image The similarity between satisfies the first preset condition, wherein the base layer image corresponds to the enhancement layer image; according to the first training filter, an alternative upsampling filter is determined, wherein the alternative upsampling filter The filter includes the first training filter; from among the candidate upsampling filters, a target upsampling filter is determined, the candidate upsampling filter including the first training filter; according to the target upsampling filter and the base layer An image block is used to determine prediction information; according to the prediction information and the residual information obtained from the target code stream, the target code stream is decoded to obtain the target image block, wherein the target image block is located in the enhancement layer image wherein, the base layer image block is located in the base layer image, and the spatial position of the base image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
在一种可能的实施方式中,该方法还包括:根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及该根据该第一训练滤波器,确定备选上采样滤波器,进一步包括:根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。In a possible implementation manner, the method further includes: determining a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter Satisfy: the similarity between the second prediction information determined according to the second training filter and the smooth region image block of the base layer image and the second original information determined according to the smooth region image block of the enhancement layer image satisfies the second Preset conditions, wherein the base layer image corresponds to the enhancement layer image; and determining a candidate upsampling filter according to the first training filter further includes: according to the first training filter and the first training filter Two training filters, determining a candidate upsampling filter, wherein the candidate upsampling filter includes the first training filter and the second training filter.
结合第二方面和第一种可能的实施方式,在第二种可能的实施方式中,该从备选上采样滤波器中,该从备选上采样滤波器中,确定目标上采样滤波器,包括:根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;根据该目标图像块的平滑度,确定该目标上采样滤波器。With reference to the second aspect and the first possible implementation manner, in the second possible implementation manner, from the candidate upsampling filters, the target upsampling filter is determined from the candidate upsampling filters, The method includes: determining the smoothness of the target image according to the feature information of the base layer image block, wherein the feature information includes coding block marking information of the base layer image block or residual information of the base layer image block; according to the The smoothness of the target image block, which determines the target upsampling filter.
结合第二方面、第一种可能的实施方式和第二种可能的实施方式,在第三种可能的实施方式中,根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,进一步包括:根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;以及该从备选上采样滤波器中,确定目标上采样滤波器,包括:从该目标码流中,获取用于指示该目标上采样滤波器的第一指示信息,根据该第一指示信息,确定该目标上采样滤波器。With reference to the second aspect, the first possible implementation manner, and the second possible implementation manner, in a third possible implementation manner, according to the first training filter and the second training filter, determine the alternative upper A sampling filter, further comprising: determining a candidate upsampling filter based on the first training filter, the second training filter, and a legacy filter, wherein the candidate upsampling filter includes the first training filter , the second training filter and the traditional filter; and determining the target up-sampling filter from the candidate up-sampling filters, including: obtaining the information used to indicate the target up-sampling filter from the target code stream The target upsampling filter is determined according to the first indication information.
结合第二方面、第一种可能的实施方式、第二种可能的实施方式和第三种可能的实施方式,在第四种可能的实施方式中,该根据该第一训练滤波器,确定备选上采样滤波器,进一步包括:根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;以及该确定目标上采样滤波器,包括:确定该目标图像块的纹理度;根据该目标图像块的纹理度,确定该目标上采样滤波器。With reference to the second aspect, the first possible implementation manner, the second possible implementation manner, and the third possible implementation manner, in a fourth possible implementation manner, according to the first training filter, determine the Selecting an upsampling filter further includes: determining a candidate upsampling filter according to the first training filter and the traditional filter, wherein the candidate upsampling filter includes the first training filter and the traditional filter and determining the target up-sampling filter, including: determining the texture degree of the target image block; and determining the target up-sampling filter according to the texture degree of the target image block.
第三方面,提供了一种用于图像处理的装置,该装置包括:获取单元,用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;确定单元,根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;用于从该备选上采样滤波器中,确定目标上采样滤波器;编码单元,用于从该确定单元获取该上采样滤波器,并根据该目标上采样滤波器和基本层图像块,确定预测信息;用于根据该预测信息,对目标图像块进行编码处理,以生成目标码流,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。In a third aspect, an apparatus for image processing is provided, which includes: an acquisition unit configured to determine a first training filter according to an image block in a non-smooth area of an enhancement layer image and an image block in an unsmooth area of a base layer image device, so that the first training filter satisfies: the first prediction information determined according to the first training filter and the non-smooth area image block of the base layer image and the non-smooth area image block of the enhancement layer image The similarity between the first original information satisfies a first preset condition, wherein the base layer image corresponds to the enhancement layer image; the determining unit determines an alternative upsampling filter according to the first training filter, Wherein, the candidate upsampling filter includes the first training filter; it is used to determine the target upsampling filter from the candidate upsampling filter; an encoding unit is used to obtain the upsampling filter from the determination unit device, and determine prediction information according to the target upsampling filter and the base layer image block; for encoding the target image block according to the prediction information, so as to generate a target code stream, wherein the target image block is located in the enhanced In the layer image, the base layer image block is located in the base layer image, and the spatial position of the basic image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
在一种可能的实施方式中,该获取单元还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及该确定单元进一步用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。In a possible implementation manner, the obtaining unit is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter The filter satisfies: the similarity between the second prediction information determined according to the second training filter and the smooth region image block of the base layer image and the second original information determined according to the smooth region image block of the enhancement layer image satisfies the first Two preset conditions, wherein the base layer image corresponds to the enhancement layer image; and the determining unit is further used to determine an alternative upsampling filter according to the first training filter and the second training filter, Wherein, the candidate upsampling filter includes the first training filter and the second training filter.
结合第三方面和第一种可能的实施方式,在第二种可能的实施方式中,该确定单元具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;用于根据该目标图像块的平滑度,确定该目标上采样滤波器。With reference to the third aspect and the first possible implementation manner, in a second possible implementation manner, the determining unit is specifically configured to determine the smoothness of the target image according to the feature information of the base layer image block, wherein the The feature information includes coded block marking information of the base layer image block or residual information of the base layer image block; it is used to determine the target upsampling filter according to the smoothness of the target image block.
结合第三方面、第一种可能的实施方式和第二种可能的实施方式,在第三种可能的实施方式中,该确定单元进一步用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;以及该编码单元具体用于根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,该目标码流包括用于指示该目标上采样滤波器的第一指示信息,该第一指示信息用以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器的依据。With reference to the third aspect, the first possible implementation manner, and the second possible implementation manner, in a third possible implementation manner, the determining unit is further configured to filter and a traditional filter, determine an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter, the second training filter, and the traditional filter; and the coding unit is specifically used to According to the prediction information, the target image block is encoded to generate a target code stream, and the target code stream includes first indication information used to indicate the target upsampling filter, and the first indication information is used for decoding the above-mentioned The coded target image block is used as the basis for obtaining the target upsampling filter.
结合第三方面、第一种可能的实施方式、第二种可能的实施方式和第三种可能的实施方式,在第四种可能的实施方式中,该确定单元进一步用于根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;具体用于确定该目标图像块的纹理度;用于根据该目标图像块的纹理度,确定该目标上采样滤波器。With reference to the third aspect, the first possible implementation manner, the second possible implementation manner and the third possible implementation manner, in a fourth possible implementation manner, the determining unit is further configured to filter and traditional filter, determine an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter and the traditional filter; specifically used to determine the texture of the target image block; The target up-sampling filter is determined according to the texture degree of the target image block.
第四方面,提供了一种用于图像处理的装置,其特征在于,该装置包括:获取单元,用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;确定单元,用于根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;用于从备选上采样滤波器中,确定目标上采样滤波器,该备选上采样滤波器包括该第一训练滤波器;解码单元,用于从该确定单元获取该目标上采样滤波器,并根据该目标上采样滤波器和基本层图像块,确定预测信息;用于根据该预测信息和从目标码流中获取的残差信息,对该目标码流进行解码处理,以获取该目标图像块,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。In a fourth aspect, there is provided an image processing device, which is characterized in that the device includes: an acquisition unit, configured to determine according to the non-smooth region image block of the enhancement layer image and the non-smooth region image block of the base layer image The first training filter, so that the first training filter satisfies: the first prediction information determined according to the first training filter and the non-smooth region image block of the base layer image and according to the non-smooth region of the enhancement layer image The similarity between the first original information determined by the image block satisfies the first preset condition, wherein the base layer image corresponds to the enhancement layer image; the determining unit is configured to determine the backup image according to the first training filter Selecting an upsampling filter, wherein the candidate upsampling filter includes the first training filter; for determining a target upsampling filter from the candidate upsampling filters, the candidate upsampling filter including the A first training filter; a decoding unit, configured to obtain the target upsampling filter from the determination unit, and determine prediction information according to the target upsampling filter and the base layer image block; and to determine prediction information based on the prediction information and the target The residual information obtained in the code stream is decoded on the target code stream to obtain the target image block, wherein the target image block is located in the enhancement layer image, and the base layer image block is located in the base layer image, And the spatial position of the basic image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
在一种可能的实施方式中,该获取单元还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及该确定单元进一步用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。In a possible implementation manner, the obtaining unit is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter The filter satisfies: the similarity between the second prediction information determined according to the second training filter and the smooth region image block of the base layer image and the second original information determined according to the smooth region image block of the enhancement layer image satisfies the first Two preset conditions, wherein the base layer image corresponds to the enhancement layer image; and the determining unit is further used to determine an alternative upsampling filter according to the first training filter and the second training filter, Wherein, the candidate upsampling filter includes the first training filter and the second training filter.
结合第四方面和第一种可能的实施方式,在第二种可能的实施方式中,该确定单元具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;根据该目标图像块的平滑度,确定该目标上采样滤波器。With reference to the fourth aspect and the first possible implementation manner, in a second possible implementation manner, the determining unit is specifically configured to determine the smoothness of the target image according to the feature information of the base layer image block, wherein the The feature information includes coded block marking information of the base layer image block or residual information of the base layer image block; and the target upsampling filter is determined according to the smoothness of the target image block.
结合第四方面、第一种可能的实施方式和第二种可能的实施方式,在第三种可能的实施方式中,该确定单元进一步用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;用于从该目标码流中,获取用于指示该目标上采样滤波器的第一指示信息,用于根据该第一指示信息,确定该目标上采样滤波器。With reference to the fourth aspect, the first possible implementation manner, and the second possible implementation manner, in a third possible implementation manner, the determining unit is further configured to filter and traditional filter, determine an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter, the second training filter and the traditional filter; In the method, the first indication information used to indicate the target up-sampling filter is acquired, and is used to determine the target up-sampling filter according to the first indication information.
结合第四方面、第一种可能的实施方式、第二种可能的实施方式和第三种可能的实施方式,在第四种可能的实施方式中,该确定单元进一步用于根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;用于确定该目标图像块的纹理度;用于根据该目标图像块的纹理度,确定该目标上采样滤波器。With reference to the fourth aspect, the first possible implementation manner, the second possible implementation manner and the third possible implementation manner, in a fourth possible implementation manner, the determining unit is further configured to A filter and a traditional filter, determining an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter and the traditional filter; used to determine the texture degree of the target image block; used to The target upsampling filter is determined according to the texture degree of the target image block.
第五方面,提供了一种用于图像处理的编码器,该编码器包括:总线;与该总线相连的处理器;与该总线相连的存储器;其中,该处理器通过该总线,调用该存储器中存储的程序,以用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;从该备选上采样滤波器中,确定目标上采样滤波器;根据该目标上采样滤波器和基本层图像块,确定预测信息;根据该预测信息,对目标图像块进行编码处理,以生成目标码流,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。In a fifth aspect, an encoder for image processing is provided, and the encoder includes: a bus; a processor connected to the bus; a memory connected to the bus; wherein, the processor calls the memory through the bus The program stored in is used to determine a first training filter according to the non-smooth area image blocks of the enhancement layer image and the non-smooth area image blocks of the base layer image, so that the first training filter satisfies: according to the first The similarity between the training filter and the first prediction information determined by the non-smooth area image block of the base layer image and the first original information determined by the non-smooth area image block of the enhancement layer image satisfies a first preset condition, Wherein, the base layer image corresponds to the enhancement layer image; according to the first training filter, an alternative upsampling filter is determined, wherein the alternative upsampling filter includes the first training filter; from the In the alternative upsampling filter, determine the target upsampling filter; determine prediction information according to the target upsampling filter and the base layer image block; perform encoding processing on the target image block according to the prediction information to generate a target code stream , wherein the target image block is located in the enhancement layer image, the base layer image block is located in the base layer image, and the spatial position of the base image block in the base layer image is the same as that of the target image block in the enhancement layer image corresponds to the spatial location in .
在一种可能的实施方式中,该处理单元还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。In a possible implementation manner, the processing unit is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter The filter satisfies: the similarity between the second prediction information determined according to the second training filter and the smooth region image block of the base layer image and the second original information determined according to the smooth region image block of the enhancement layer image satisfies the first Two preset conditions, wherein the base layer image corresponds to the enhancement layer image; for determining an alternative upsampling filter according to the first training filter and the second training filter, wherein the alternative The upsampling filter includes the first training filter and the second training filter.
结合第五方面和第一种可能的实施方式,在第二种可能的实施方式中,该处理单元具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;用于根据该目标图像块的平滑度,确定该目标上采样滤波器。With reference to the fifth aspect and the first possible implementation manner, in a second possible implementation manner, the processing unit is specifically configured to determine the smoothness of the target image according to the feature information of the base layer image block, wherein the The feature information includes coded block marking information of the base layer image block or residual information of the base layer image block; it is used to determine the target upsampling filter according to the smoothness of the target image block.
结合第五方面、第一种可能的实施方式和第二种可能的实施方式,在第三种可能的实施方式中,该处理器具体用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;用于根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,该目标码流包括用于指示该目标上采样滤波器的第一指示信息,该第一指示信息用以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器的依With reference to the fifth aspect, the first possible implementation manner, and the second possible implementation manner, in a third possible implementation manner, the processor is specifically configured to filter and a traditional filter, and determine an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter, the second training filter, and the traditional filter; for according to the prediction information, Encoding the target image block to generate a target code stream, the target code stream includes first indication information used to indicate the target upsampling filter, and the first indication information is used to decode the encoded target image block time as the basis for obtaining the target upsampling filter
结合第五方面、第一种可能的实施方式、第二种可能的实施方式和第三种可能的实施方式,在第四种可能的实施方式中,该处理器具体用于根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;具体用于确定该目标图像块的纹理度;用于根据该目标图像块的纹理度,确定该目标上采样滤波器。。With reference to the fifth aspect, the first possible implementation manner, the second possible implementation manner and the third possible implementation manner, in a fourth possible implementation manner, the processor is specifically configured to filter and traditional filter, determine an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter and the traditional filter; specifically used to determine the texture of the target image block; The target up-sampling filter is determined according to the texture degree of the target image block. .
第六方面,提供了一种用于图像处理的解码器,该解码器包括:总线;与该总线相连的处理器;与该总线相连的存储器;其中,该处理器通过该总线,调用该存储器中存储的程序,以用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;从备选上采样滤波器中,确定目标上采样滤波器,该备选上采样滤波器包括该第一训练滤波器;根据该目标上采样滤波器和基本层图像块,确定预测信息;根据该预测信息和从目标码流中获取的残差信息,对该目标码流进行解码处理,以获取该目标图像块,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。In a sixth aspect, there is provided a decoder for image processing, the decoder comprising: a bus; a processor connected to the bus; a memory connected to the bus; wherein, the processor calls the memory through the bus The program stored in is used to determine a first training filter according to the non-smooth area image blocks of the enhancement layer image and the non-smooth area image blocks of the base layer image, so that the first training filter satisfies: according to the first The similarity between the training filter and the first prediction information determined by the non-smooth area image block of the base layer image and the first original information determined by the non-smooth area image block of the enhancement layer image satisfies a first preset condition, Wherein, the base layer image corresponds to the enhancement layer image; according to the first training filter, a candidate upsampling filter is determined, wherein the candidate upsampling filter includes the first training filter; from the backup In the selected upsampling filter, determine the target upsampling filter, the candidate upsampling filter includes the first training filter; according to the target upsampling filter and the base layer image block, determine prediction information; according to the prediction information and the residual information obtained from the target code stream, the target code stream is decoded to obtain the target image block, wherein the target image block is located in the enhancement layer image, and the base layer image block is located in the base layer image, and the spatial position of the basic image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
在一种可能的实施方式中,该处理单元还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。In a possible implementation manner, the processing unit is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter The filter satisfies: the similarity between the second prediction information determined according to the second training filter and the smooth region image block of the base layer image and the second original information determined according to the smooth region image block of the enhancement layer image satisfies the first Two preset conditions, wherein the base layer image corresponds to the enhancement layer image; for determining an alternative upsampling filter according to the first training filter and the second training filter, wherein the alternative The upsampling filter includes the first training filter and the second training filter.
结合第六方面和第一种可能的实施方式,在第二种可能的实施方式中,该处理单元具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;根据该目标图像块的平滑度,确定该目标上采样滤波器。With reference to the sixth aspect and the first possible implementation manner, in a second possible implementation manner, the processing unit is specifically configured to determine the smoothness of the target image according to the feature information of the base layer image block, wherein the The feature information includes coded block marking information of the base layer image block or residual information of the base layer image block; and the target upsampling filter is determined according to the smoothness of the target image block.
结合第六方面、第一种可能的实施方式和第二种可能的实施方式,在第三种可能的实施方式中,该处理器进一步用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;用于从该目标码流中,获取用于指示该目标上采样滤波器的第一指示信息,用于根据该第一指示信息,确定该目标上采样滤波器。With reference to the sixth aspect, the first possible implementation manner, and the second possible implementation manner, in a third possible implementation manner, the processor is further configured to filter and traditional filter, determine an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter, the second training filter and the traditional filter; In the method, the first indication information used to indicate the target up-sampling filter is acquired, and is used to determine the target up-sampling filter according to the first indication information.
结合第六方面、第一种可能的实施方式、第二种可能的实施方式和第三种可能的实施方式,在第四种可能的实施方式中,该处理器进一步用于根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;用于确定该目标图像块的纹理度;用于根据该目标图像块的纹理度,确定该目标上采样滤波器。With reference to the sixth aspect, the first possible implementation manner, the second possible implementation manner and the third possible implementation manner, in a fourth possible implementation manner, the processor is further configured to A filter and a traditional filter, determining an alternative upsampling filter, wherein the alternative upsampling filter includes the first training filter and the traditional filter; used to determine the texture degree of the target image block; used to The target upsampling filter is determined according to the texture degree of the target image block.
根据本发明实施例的用于图像处理的方法、装置编码器和解码器,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。According to the method for image processing, the device encoder and the decoder of the embodiments of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, it is possible to reduce the number of upsampling filters while improving the effect of upsampling. There is no need to transmit filter coefficients and indexes, so that the encoding performance can be improved, and the effect and performance of image processing can be improved.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required in the embodiments of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1是根据本发明一实施例的用于图像处理的方法的示意性流程图。Fig. 1 is a schematic flowchart of a method for image processing according to an embodiment of the present invention.
图2是根据本发明一实施例的用于确定训练滤波器的方法的示意图。Fig. 2 is a schematic diagram of a method for determining a training filter according to an embodiment of the present invention.
图3是根据本发明一实施例的用于图像处理的方法的另一示意性流程图。Fig. 3 is another schematic flowchart of a method for image processing according to an embodiment of the present invention.
图4是根据本发明一实施例的用于图像处理的装置的示意性框图。Fig. 4 is a schematic block diagram of an apparatus for image processing according to an embodiment of the present invention.
图5是根据本发明另一实施例的用于图像处理的装置的示意性框图。Fig. 5 is a schematic block diagram of an apparatus for image processing according to another embodiment of the present invention.
图6是根据本发明一实施例的用于图像处理的编码器的示意性框图。Fig. 6 is a schematic block diagram of an encoder for image processing according to an embodiment of the present invention.
图7是根据本发明另一实施例的用于图像处理的解码器的示意性框图。Fig. 7 is a schematic block diagram of a decoder for image processing according to another embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
图1示出了从编码端角度描述的根据本发明实施例的用于图像处理的方法100的示意性流程图。如图1所示,该方法100包括:Fig. 1 shows a schematic flowchart of a method 100 for image processing according to an embodiment of the present invention described from the perspective of an encoding end. As shown in Figure 1, the method 100 includes:
S110,根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;S110. Determine a first training filter according to the non-smooth region image block of the enhancement layer image and the non-smooth region image block of the base layer image, so that the first training filter satisfies: according to the first training filter and the basic The similarity between the first prediction information determined by the image block in the non-smooth area of the layer image and the first original information determined based on the image block in the non-smooth area of the enhancement layer image satisfies a first preset condition, wherein the base layer an image corresponding to the enhancement layer image;
S120,根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;S120. Determine a candidate upsampling filter according to the first training filter, where the candidate upsampling filter includes the first training filter;
S130,从该备选上采样滤波器中,确定目标上采样滤波器;S130. Determine a target upsampling filter from the candidate upsampling filters;
S140,根据该目标上采样滤波器和基本层图像块,确定预测信息。S140. Determine prediction information according to the target upsampling filter and the base layer image block.
S150,根据该预测信息,对目标图像块进行编码处理,以生成目标码流,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应S150. Perform encoding processing on the target image block according to the prediction information to generate a target code stream, wherein the target image block is located in the enhancement layer image, the base layer image block is located in the base layer image, and the base image The spatial position of the block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image
在对图像进行分层编码,例如,在空间可伸缩编码时,可以将图像进行将分辨率处理得到低分辨率图像,作为对比将原图像称作高分辨率图像,编码器分别对该低分辨率图像以及该高分辨率图像进行编码处理。为方便描述,本文中将质量高的待编码图像称作增强层图像,将对应的质量低的待编码图像(例如所述低分辨率图像)称作基本层图像。In the layered coding of images, for example, in spatially scalable coding, the resolution of the image can be processed to obtain a low-resolution image. As a comparison, the original image is called a high-resolution image, and the encoder separately converts the low-resolution The high-resolution image and the high-resolution image are encoded. For convenience of description, a high-quality image to be encoded is referred to as an enhancement layer image, and a corresponding low-quality image to be encoded (for example, the low-resolution image) is referred to as a base layer image.
在本发明实施例中,目标图像是使用分层编码技术进行处理的图像,基本层是指分层编码中的质量(包括帧速率、空间分辨率、时间分辨率、信噪比强度或质量等级等参数)较低的层,增强层是指分层编码中的质量(包括帧速率、空间分辨率、时间分辨率、信噪比强度或质量等级等参数)较高的层。需要说明的是,在本发明实施例中,在本发明实施例中,对于一个给定的增强层,与其相对应的基本层可以为质量低于该增强层的任一层,例如,如果当前存在五层,编码质量依次提高(即,第一层质量最低,第五层质量最高),如果增强层为第四层,则基本层可以是第一层,也可以是第二层、也可以是第三层、也可以是第四层。同理,对于一个给定的基本层,与其相对应的增强层可以为质量低于该基本层的任一层。In the embodiment of the present invention, the target image is an image processed using layered coding technology, and the basic layer refers to the quality in layered coding (including frame rate, spatial resolution, temporal resolution, signal-to-noise ratio strength or quality level and other parameters), the enhancement layer refers to the layer with higher quality (including parameters such as frame rate, spatial resolution, time resolution, signal-to-noise ratio strength or quality level) in layered coding. It should be noted that, in the embodiment of the present invention, in the embodiment of the present invention, for a given enhancement layer, the corresponding base layer may be any layer whose quality is lower than the enhancement layer, for example, if the current There are five layers, and the encoding quality increases in order (that is, the first layer has the lowest quality, the fifth layer has the highest quality), and if the enhancement layer is the fourth layer, the base layer can be the first layer, or the second layer, or It could be the third layer, or it could be the fourth layer. Similarly, for a given base layer, the corresponding enhancement layer may be any layer whose quality is lower than the base layer.
增强层图像为当前处理的增强层中的图像,基本层图像为基本层中与增强层图像在同一时刻的图像。The enhancement layer image is an image in the currently processed enhancement layer, and the base layer image is an image in the base layer at the same moment as the enhancement layer image.
综上所述,在本发明实施例中,该基本层图像的质量低于该增强层图像的质量。To sum up, in the embodiment of the present invention, the quality of the base layer image is lower than the quality of the enhancement layer image.
目标图像块为该增强层图像中正在处理的图像块。The target image block is an image block being processed in the enhancement layer image.
基本层图像块为基本层图像中与该目标图像块在空间位置上存在对应关系的图像块。The base layer image block is an image block in the base layer image corresponding to the target image block in spatial position.
在本发明实施例中,基本层图像块与目标图像块的对应关系可以根据基本层图像与增强层图像之间的分辨率比例关系计算得到。例如,在包括x方向和y方向的系统内,如果增强层图像在x方向与y方向的分辨率分别是基本层图像的2倍,则对于增强层中左上角的像素坐标为(2x,2y)且大小为(2m)×(2n)的图像块,其基本层图像中的对应块可以是左上角的像素坐标为(x,y)且大小为m×n的图像块。In the embodiment of the present invention, the corresponding relationship between the base layer image block and the target image block can be calculated according to the resolution ratio relationship between the base layer image and the enhancement layer image. For example, in a system including x direction and y direction, if the resolution of the enhancement layer image in the x direction and y direction is twice that of the base layer image respectively, then the pixel coordinates of the upper left corner in the enhancement layer are (2x, 2y ) with a size of (2m)×(2n), the corresponding block in the base layer image can be an image block whose pixel coordinates in the upper left corner are (x, y) and whose size is m×n.
在本发明实施例中,将图像(包括增强层图像和基本层图像)分为简单的两类区域,即,平滑区域和非平滑区域。在平滑区域,编码时通常可以获得较为准确的预测值,从而,最终编码时确定的编码块标记(CBF,CodedBlock Flag)为0,即残差为0。在非平滑区域,编码时由于信号特性相关性不大,无法精确预测,因此不能得到较为准确的预测值,导致预测后残差较大或不均匀,从而,最终编码的CBF不为0。In the embodiment of the present invention, an image (including an enhancement layer image and a base layer image) is divided into two simple types of regions, namely, a smooth region and a non-smooth region. In the smooth area, a relatively accurate prediction value can usually be obtained during encoding, so that the coded block flag (CBF, CodedBlock Flag) determined during final encoding is 0, that is, the residual is 0. In the non-smooth area, due to the small correlation of signal characteristics during encoding, it is impossible to predict accurately, so a more accurate prediction value cannot be obtained, resulting in large or uneven residual after prediction, so that the final encoded CBF is not 0.
因此,在本发明实施例中,可以确定基本层图像中CBF为0的图像块(基本层图像的平滑区域图像块)位于平滑区域,从而,可以认为与该图像块相对应的增强层图像中的图像块(增强层图像的平滑区域图像块)位于平滑区域。同理,可以确定基本层图像中CBF不为0的图像块(基本层图像的非平滑区域图像块)位于非平滑区域,从而,可以认为与该图像块相对应的增强层图像中的图像块(增强层图像的非平滑区域图像块)位于非平滑区域。如上所述,可以确定增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,以及,增强层图像的非平滑区域图像块和该基本层图像的非平滑区域图像块。Therefore, in the embodiment of the present invention, it can be determined that the image block with a CBF of 0 in the base layer image (the image block in the smooth area of the base layer image) is located in the smooth area, and thus, it can be considered that the image block corresponding to the image block in the enhancement layer image The image blocks (smooth area image blocks of the enhancement layer image) are located in the smooth area. Similarly, it can be determined that the image block in the base layer image whose CBF is not 0 (the image block in the non-smooth area of the base layer image) is located in the non-smooth area, so that the image block in the enhancement layer image corresponding to this image block can be considered (A non-smooth region image block of an enhancement layer image) is located in a non-smooth region. As described above, smooth area image blocks of the enhancement layer image and smooth area image blocks of the base layer image, and non-smooth area image blocks of the enhancement layer image and non-smooth area image blocks of the base layer image may be determined.
其后,在S110,可以根据增强层图像的非平滑区域图像块和该基本层图像的非平滑区域图像块训练第一训练滤波器,作为示例而非限定,可以通过以下方法,训练该第一训练滤波器。Thereafter, at S110, the first training filter may be trained according to the non-smooth area image block of the enhancement layer image and the non-smooth area image block of the base layer image. As an example but not a limitation, the first training filter may be trained by the following method Train the filter.
如图2所示,y1(n)表示增强层图像(原始图像)的平滑区域图像块(多个图像快的集合,以下,称为原始平滑区域图像块),x(n)表示基本层图像的平滑区域图像块,H(n)表示待确定的滤波器(第一训练滤波器),e(n)表示经过滤波以后的基本层图像的平滑区域图像块(记作预测图像块)与原始平滑区域图像块。例如,以使原始平滑区域图像块与预测图像块的像素值的均方误差最小,作为优化条件(第一预设条件的一例),求解H(n)。As shown in Figure 2, y1(n) represents the smooth area image block of the enhancement layer image (original image) (a collection of multiple image blocks, hereinafter referred to as the original smooth area image block), and x(n) represents the base layer image H(n) represents the filter to be determined (the first training filter), e(n) represents the smooth region image block of the filtered base layer image (referred to as the predicted image block) and the original Smooth region image patches. For example, to minimize the mean square error of the pixel values of the original smooth region image block and the predicted image block as an optimization condition (an example of the first preset condition), H(n) is solved.
该H(n)的最优解可以表示为以下式(1),The optimal solution of H(n) can be expressed as the following formula (1),
其中,Rxx表示原始平滑区域图像块的自相关函数,ryx表示基本层图像的平滑区域图像块与原始平滑区域图像块的互相关函数。Among them, R xx represents the autocorrelation function of the original smooth region image block, and ryx represents the cross-correlation function between the smooth region image block of the base layer image and the original smooth region image block.
应理解,以上列举的获取训练滤波器的方法仅为示例性说明,本发明并不限定于此,例如,可以通过改变上述最优化条件等,对该获取训练滤波器的方法进行各种变更。It should be understood that the methods for obtaining training filters listed above are only illustrative, and the present invention is not limited thereto. For example, various changes may be made to the method for obtaining training filters by changing the above optimization conditions and the like.
可选地,该方法还包括:Optionally, the method also includes:
根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及According to the smooth region image block of the enhancement layer image and the smooth region image block of the base layer image, determine a second training filter so that the second training filter satisfies: according to the second training filter and the base layer image The similarity between the second prediction information determined based on the smooth area image block of the enhancement layer image and the second original information determined according to the smooth area image block of the enhancement layer image satisfies a second preset condition, wherein the base layer image and the enhancement layer image layer image correspondence; and
该根据该第一训练滤波器,确定备选上采样滤波器,进一步包括:According to the first training filter, determining an alternative upsampling filter further includes:
根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。A candidate upsampling filter is determined according to the first training filter and the second training filter, wherein the candidate upsampling filter includes the first training filter and the second training filter.
在本发明实施例中,除训练的样本不同(第一训练滤波器是增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块训练获得,第二训练滤波器是该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块训练获得),外其他过程相似,这里,为了避免赘述,省略其说明。In the embodiment of the present invention, except that the training samples are different (the first training filter is obtained by training the non-smooth area image block of the enhancement layer image and the non-smooth area image block of the base layer image, and the second training filter is the enhancement layer image block The smooth area image block of the image and the smooth area image block of the base layer image are obtained through training), and other processes are similar, and here, in order to avoid redundant description, its description is omitted.
通过上述方法,可以分别得到第一训练滤波器和第二训练滤波器,因此,在本发明实施例中,训练滤波器的系数是固定的,在编码过程中不需要消耗比特传输滤波器系数,同时在解码端选择滤波器时,例如,可以根据基本层对应块的CBF值判断当前块所属类型(即,为平滑区域图像块或非平滑区域图像块),从而,无需传输每个图像块使用的滤波器的索引,提高了图像处理的性能。Through the above method, the first training filter and the second training filter can be obtained respectively. Therefore, in the embodiment of the present invention, the coefficients of the training filter are fixed, and there is no need to consume bit transmission filter coefficients in the encoding process. At the same time, when selecting a filter at the decoding end, for example, the type of the current block (that is, an image block in a smooth area or an image block in a non-smooth area) can be judged according to the CBF value of the corresponding block in the base layer, so that there is no need to transmit each image block using The index of the filter improves the performance of image processing.
从而,在备选滤波器可以包括该第一训练滤波器和第二训练滤波器,即,情况1。Therefore, the candidate filter may include the first training filter and the second training filter, that is, case 1.
情况1Case 1
可选地,该从备选上采样滤波器中,确定目标上采样滤波器,包括:Optionally, the target upsampling filter is determined from the alternative upsampling filters, including:
根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;determining the smoothness of the target image according to feature information of the base layer image block, wherein the feature information includes coding block marking information of the base layer image block or residual information of the base layer image block;
根据该目标图像块的平滑度,确定该目标上采样滤波器。The target upsampling filter is determined according to the smoothness of the target image block.
具体地说,在该备选上采样滤波器包括如上所述获取的第一训练滤波器和第二训练滤波器的情况下,在S 130中,可以根据目标图像块的类型(为平滑区域图像块或非平滑区域图像块),选择目标上采样滤波器。Specifically, in the case that the candidate upsampling filter includes the first training filter and the second training filter obtained as described above, in S130, according to the type of the target image block (which is a smooth region image blocks or non-smooth region image blocks), select the target upsampling filter.
在本发明实施例中,当与该目标图像块相对应的基本层图像块的CBF为0时,可以确定该目标图像块位于平滑区域。同理,当与该目标图像块相对应的基本层图像块的CBF不为0时,可以确定该目标图像块位于非平滑区域。In the embodiment of the present invention, when the CBF of the base layer image block corresponding to the target image block is 0, it may be determined that the target image block is located in a smooth area. Similarly, when the CBF of the base layer image block corresponding to the target image block is not 0, it can be determined that the target image block is located in a non-smooth area.
应理解,以上列举的确定目标图像块的平滑度的方法和使用的参数仅为示例性说明,本发明并不限定于此,其他能够确定目标图像块的平滑度,即,确定目标图像块处于增强层图像中的平滑区域或非平滑区域的方法和参数,均落入本发明的保护范围。It should be understood that the method for determining the smoothness of the target image block and the parameters used above are only exemplary, and the present invention is not limited thereto. Others can determine the smoothness of the target image block, that is, determine that the target image block is in The methods and parameters for enhancing the smooth area or non-smooth area in the image of the layer fall within the protection scope of the present invention.
此情况下,在S140,可以如上所述确定的根据该目标上采样滤波器,对基本层图像块的重建图像进行上采样,从而确定相对于目标图像块的预测值。In this case, at S140, the reconstructed image of the base layer image block may be up-sampled according to the target up-sampling filter determined as described above, so as to determine a prediction value relative to the target image block.
从而,在S150,可以计算各预测模式的失真率代价,并确定对该目标图像块进行编码时使用的最优预测模式。需要说明的是,在对该编码后的目标图像块进行解码处理时,可以采用与上述同样的方法确定目标上采样滤波器。Therefore, at S150, the distortion rate cost of each prediction mode can be calculated, and the optimal prediction mode used when encoding the target image block can be determined. It should be noted that, when decoding the encoded target image block, the same method as above can be used to determine the target up-sampling filter.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,包括:According to the prediction information, the target image block is encoded to generate a target code stream, including:
根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,该目标码流包括用于指示该目标上采样滤波器的第一指示信息,该第一指示信息用以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器的依据。According to the prediction information, the target image block is encoded to generate a target code stream, and the target code stream includes first indication information used to indicate the target upsampling filter, and the first indication information is used for decoding the above-mentioned The coded target image block is used as the basis for obtaining the target upsampling filter.
在本发明实施例中,作为传统滤波器,例如,可以包括现有的余弦插值滤波器。以下说明中,为了便于说明,以该传统滤波器为余弦插值滤波器为例,进行说明。In the embodiment of the present invention, as a traditional filter, for example, an existing cosine interpolation filter may be included. In the following description, for ease of description, the conventional filter is taken as an example of a cosine interpolation filter for description.
具体地说,在本发明实施例中,上述获取训练滤波器的方法(训练过程)在像素域进行,并且,可以针对不同的下采样比例(增强层图像与基本层图像之间的分辨率比)进行不同的训练,例如,存在对于整像素位置和半像素位置获得的滤波器相异的情况,因此,可能导致对整像素位置和半像素位置的预测不均衡,从而影响预测残差的平稳性,因此,在本发明实施例中,还可以在备选上采样滤波器中还可以加入传统滤波器,例如,余弦插值滤波器,该余弦插值滤波器的获取方法可以与现有技术相同,这里,为了避免赘述,省略其说明。Specifically, in the embodiment of the present invention, the above-mentioned method for obtaining the training filter (training process) is performed in the pixel domain, and can be used for different downsampling ratios (the resolution ratio between the enhancement layer image and the base layer image) ) for different training, for example, there are cases where the filters obtained for integer pixel positions and half pixel positions are different, therefore, it may lead to unbalanced predictions for integer pixel positions and half pixel positions, thus affecting the stability of the prediction residual Therefore, in the embodiment of the present invention, a traditional filter, such as a cosine interpolation filter, can also be added to the alternative upsampling filter, and the acquisition method of the cosine interpolation filter can be the same as that of the prior art, Here, in order to avoid redundant description, its description is omitted.
从而,在备选滤波器可以包括该第一训练滤波器和第二训练滤波器和余弦插值滤波器(传统滤波器的一例),即,情况2。Therefore, the candidate filter may include the first training filter and the second training filter and a cosine interpolation filter (an example of a traditional filter), that is, case 2.
情况2Case 2
在S130中,例如,可以使用率失真优化(RDO,Rate-Distortion Optimization),选择使用余弦插值滤波器或第一训练滤波器或第二训练滤波器,作为目标上采样滤波器。In S130, for example, rate-distortion optimization (RDO, Rate-Distortion Optimization) may be used to select to use a cosine interpolation filter or the first training filter or the second training filter as the target up-sampling filter.
此情况下,其后,在S140,可以根据该目标上采样滤波器,对基本层图像块的重建图像进行上采样,从而确定相对于目标图像块的预测值。In this case, thereafter, at S140, the reconstructed image of the base layer image block may be up-sampled according to the target up-sampling filter, so as to determine a prediction value relative to the target image block.
从而,在S150,可以计算各预测模式的失真率代价,并确定对该目标图像块进行编码时使用的最优预测模式。在该最优预测模式为层间纹理预测模式的情况下,可以对用于指示该目标上采样滤波器(具体地说,指示该目标上采样滤波器为余弦插值滤波器、第一训练滤波器或第一训练滤波器中的哪个滤波器)的第一指示信息进行编码处理,并将编码处理后的第一指示信息加入码流,以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器依据。需要说明的是,在备选滤波器包括该余弦插值滤波器或第一训练滤波器或第二训练滤波器,作为目标上采样滤波器时,备选滤波器为三个,并且,如上所述编码端或解码端可以根据目标图像块的平滑度,确定使用第一训练滤波器或第二训练滤波器,因此,可以在码流中仅用一位标识符来承载该第一指示信息,以指示该目标上采样滤波器为传统滤波器(余弦插值滤波器)还是训练滤波器(第一训练滤波器或第二训练滤波器)。当备选滤波器中,传统滤波器的个数为至少两个时,可以通过增加第一指示信息的位数,来实现指示目标图像块的目的。Therefore, at S150, the distortion rate cost of each prediction mode can be calculated, and the optimal prediction mode used when encoding the target image block can be determined. When the optimal prediction mode is an inter-layer texture prediction mode, the target upsampling filter (specifically, indicating that the target upsampling filter is a cosine interpolation filter, the first training filter or which filter in the first training filter) encodes the first indication information, and adds the encoded first indication information to the code stream, so as to obtain the target when decoding the above-mentioned encoded target image block Upsampling filter basis. It should be noted that when the candidate filter includes the cosine interpolation filter or the first training filter or the second training filter as the target upsampling filter, there are three candidate filters, and, as mentioned above The encoding end or the decoding end can determine to use the first training filter or the second training filter according to the smoothness of the target image block. Therefore, only one bit identifier can be used to carry the first indication information in the code stream, so as to Indicates whether this target upsampling filter is a legacy filter (cosine interpolation filter) or a training filter (first training filter or second training filter). When there are at least two traditional filters among the candidate filters, the purpose of indicating the target image block can be achieved by increasing the number of bits of the first indication information.
在通过余弦插值滤波器进行上采样时,始终为直接复制基本层图像的对应像素点,但是,在例如,可伸缩视频编码方法中,基本层图像的像素并不是直接复制对应的增强层图像的像素,此时,如果目标图像的整像素位于突变点,进行上采样时直接复制基本层对应像素点会出现很大误差。因此使用这种方法进行上采样,可能会使得增强层图像的整像素位置有较大误差,因此,在本发明实施例中,通过对上述突变点的像素运用本发明实施例的方法训练得到的训练滤波器(第一训练滤波器或第二训练滤波器),能够提高上采样的效果,提高编码和图像处理的性能。When upsampling through a cosine interpolation filter, the corresponding pixels of the base layer image are always copied directly, but, for example, in scalable video coding methods, the pixels of the base layer image are not directly copied from the corresponding enhancement layer image At this time, if the entire pixel of the target image is located at the mutation point, a large error will occur when directly copying the corresponding pixel of the base layer when performing upsampling. Therefore, using this method for upsampling may cause a large error in the integer pixel position of the enhancement layer image. Therefore, in the embodiment of the present invention, the pixels obtained by using the method of the embodiment of the present invention to train the above-mentioned mutation points The training filter (the first training filter or the second training filter) can improve the effect of upsampling and improve the performance of encoding and image processing.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该确定目标上采样滤波器,包括:The determined target upsampling filter, including:
确定该目标图像块的纹理度;Determine the texture degree of the target image block;
根据该目标图像块的纹理度,确定该目标上采样滤波器。The target upsampling filter is determined according to the texture degree of the target image block.
如上所述,在本发明实施中,在该备选上采样滤波器包括余弦插值滤波器、第一训练滤波器和第二训练滤波器的情况下。如上所述,在根据RDO选择目标上采样滤波器后,需要在码流中传输用于承载编码后的第一指示信息的标记位,以在解码上述编码后的目标图像块时确定目标上采样滤波器是哪一个滤波器。因此,本方案中可以采用两个候选滤波器,但是并不通过RDO进行选择,而是根据不同滤波器的不同特征进行选择,从而避免多传输一个标记位表示目标上采样滤波器。即,该备选滤波器包括第一训练滤波器和传统滤波器,即,情况3As mentioned above, in the implementation of the present invention, in the case where the candidate upsampling filter includes a cosine interpolation filter, a first training filter and a second training filter. As mentioned above, after selecting the target upsampling filter according to RDO, it is necessary to transmit the flag bit used to carry the coded first indication information in the code stream, so as to determine the target upsampling when decoding the above coded target image block Which filter is the filter. Therefore, in this solution, two candidate filters can be used, but they are not selected through the RDO, but are selected according to different characteristics of different filters, so as to avoid transmitting an extra flag bit to indicate the target upsampling filter. That is, the candidate filter includes the first training filter and the traditional filter, i.e. case 3
情况3Case 3
在S130中,例如,可以根据基本层图像块的特征信息从第一训练滤波器和余弦插值滤波器(传统滤波器的一例)中选择目标上采样滤波器,从而避免传输标记位表示所使用的滤波器,例如,可以采用根据基本层图像块的纹理强度来确定选择使用的滤波器,在本发明实施例中,可以采用,例如,边缘检测,纹理强度分析或者帧内编码预测模式等方法,确定基本层图像块的纹理度,并在,例如,当纹理度较强时,选择使用训练所得滤波器作为目标上采样滤波器,其余都使用余弦插值滤波器。以上列举的通过边缘检测,纹理强度分析或者帧内编码预测模式等方法确定基本层图像块的纹理度的方法可以与现有技术相同,这里,为了避免赘述,省略其说明。In S130, for example, the target upsampling filter may be selected from the first training filter and the cosine interpolation filter (an example of a traditional filter) according to the feature information of the base layer image block, thereby avoiding the transmission of the The filter, for example, can be used to determine the selected filter according to the texture strength of the base layer image block. In the embodiment of the present invention, methods such as edge detection, texture strength analysis, or intra-frame coding prediction mode can be used, Determine the texture of the base layer image block, and, for example, when the texture is strong, choose to use the filter obtained from training as the target upsampling filter, and use the cosine interpolation filter for the rest. The method for determining the texture degree of the base layer image block by means of edge detection, texture strength analysis, or intra-frame coding prediction mode listed above may be the same as that of the prior art, and its description is omitted here to avoid redundant description.
此情况下,其后,在S140,可以根据该目标上采样滤波器,对基本层图像块的重建图像进行上采样,从而确定相对于目标图像块的预测值。In this case, thereafter, at S140, the reconstructed image of the base layer image block may be up-sampled according to the target up-sampling filter, so as to determine a prediction value relative to the target image block.
从而,在S150,可以计算各预测模式的失真率代价,并确定对该目标图像块进行编码时使用的最优预测模式。并对目标图像块进行编码处理。Therefore, at S150, the distortion rate cost of each prediction mode can be calculated, and the optimal prediction mode used when encoding the target image block can be determined. And encode the target image block.
在通过余弦插值滤波器进行上采样时,始终为直接复制基本层图像的对应像素点,但是,在例如,可伸缩视频编码方法中,基本层图像的像素并不是直接复制对应的增强层图像的像素,此时,如果目标图像的整像素位于突变点,进行上采样时直接复制基本层对应像素点会出现很大误差。第一训练滤波器能够对突变点位置的像素进行较好的恢复,因此可以很好的弥补余弦插值滤波器的不足。When upsampling through a cosine interpolation filter, the corresponding pixels of the base layer image are always copied directly, but, for example, in scalable video coding methods, the pixels of the base layer image are not directly copied from the corresponding enhancement layer image At this time, if the entire pixel of the target image is located at the mutation point, a large error will occur when directly copying the corresponding pixel of the base layer when performing upsampling. The first training filter can better restore the pixels at the position of the mutation point, so it can well make up for the deficiency of the cosine interpolation filter.
需要说明的是,在对该编码后的目标图像块进行解码处理时,可以采用与上述同样的方法确定目标上采样滤波器。It should be noted that, when decoding the encoded target image block, the same method as above can be used to determine the target up-sampling filter.
根据本发明实施例的用于图像处理的方法,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。According to the method for image processing in the embodiment of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, the number of upsampling filters can be reduced while improving the effect of upsampling and no transmission filter is required The coefficients and indexes can improve the coding performance and improve the effect and performance of image processing.
图3示出了从编码端角度描述的根据本发明实施例的用于图像处理的方法200的示意性流程图。如图3所示,该方法200包括:Fig. 3 shows a schematic flowchart of a method 200 for image processing according to an embodiment of the present invention described from the perspective of an encoding end. As shown in Figure 3, the method 200 includes:
S210,根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;S210. Determine a first training filter according to the non-smooth region image block of the enhancement layer image and the non-smooth region image block of the base layer image, so that the first training filter satisfies: according to the first training filter and the basic The similarity between the first prediction information determined by the image block in the non-smooth area of the layer image and the first original information determined based on the image block in the non-smooth area of the enhancement layer image satisfies a first preset condition, wherein the base layer an image corresponding to the enhancement layer image;
S220,根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;S220. Determine a candidate upsampling filter according to the first training filter, where the candidate upsampling filter includes the first training filter;
S230,从备选上采样滤波器中,确定目标上采样滤波器,该备选上采样滤波器包括该第一训练滤波器;S230. Determine a target upsampling filter from candidate upsampling filters, where the candidate upsampling filter includes the first training filter;
S240,根据该目标上采样滤波器和基本层图像块,确定预测信息。S240. Determine prediction information according to the target upsampling filter and the base layer image block.
S250,根据该预测信息和从目标码流中获取的残差信息,对该目标码流进行解码处理,以获取该目标图像块,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应S250. Perform decoding processing on the target code stream according to the prediction information and the residual information obtained from the target code stream to obtain the target image block, wherein the target image block is located in the enhancement layer image, and the base layer The image block is located in the base layer image, and the spatial position of the basic image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image
在对图像进行分层编码,例如,在空间可伸缩编码时,可以将图像进行将分辨率处理得到低分辨率图像,作为对比将原图像称作高分辨率图像,编码器分别对该低分辨率图像以及该高分辨率图像进行编码处理。为方便描述,本文中将质量高的待编码图像称作增强层图像,将对应的质量低的待编码图像(例如所述低分辨率图像)称作基本层图像。In the layered coding of images, for example, in spatially scalable coding, the resolution of the image can be processed to obtain a low-resolution image. As a comparison, the original image is called a high-resolution image, and the encoder separately converts the low-resolution The high-resolution image and the high-resolution image are encoded. For convenience of description, a high-quality image to be encoded is referred to as an enhancement layer image, and a corresponding low-quality image to be encoded (for example, the low-resolution image) is referred to as a base layer image.
在本发明实施例中,目标图像是使用分层编码技术进行处理的图像,基本层是指分层编码中的质量(包括帧速率、空间分辨率、时间分辨率、信噪比强度或质量等级等参数)较低的层,增强层是指分层编码中的质量(包括帧速率、空间分辨率、时间分辨率、信噪比强度或质量等级等参数)较高的层。需要说明的是,在本发明实施例中,在本发明实施例中,对于一个给定的增强层,与其相对应的基本层可以为质量低于该增强层的任一层,例如,如果当前存在五层,编码质量依次提高(即,第一层质量最低,第五层质量最高),如果增强层为第四层,则基本层可以是第一层,也可以是第二层、也可以是第三层、也可以是第四层。同理,对于一个给定的基本层,与其相对应的增强层可以为质量低于该基本层的任一层。In the embodiment of the present invention, the target image is an image processed using layered coding technology, and the basic layer refers to the quality in layered coding (including frame rate, spatial resolution, temporal resolution, signal-to-noise ratio strength or quality level and other parameters), the enhancement layer refers to the layer with higher quality (including parameters such as frame rate, spatial resolution, time resolution, signal-to-noise ratio strength or quality level) in layered coding. It should be noted that, in the embodiment of the present invention, in the embodiment of the present invention, for a given enhancement layer, the corresponding base layer may be any layer whose quality is lower than the enhancement layer, for example, if the current There are five layers, and the encoding quality increases in order (that is, the first layer has the lowest quality, the fifth layer has the highest quality), and if the enhancement layer is the fourth layer, the base layer can be the first layer, or the second layer, or It could be the third layer, or it could be the fourth layer. Similarly, for a given base layer, the corresponding enhancement layer may be any layer whose quality is lower than the base layer.
增强层图像为当前处理的增强层中的图像,基本层图像为基本层中与增强层图像在同一时刻的图像。The enhancement layer image is an image in the currently processed enhancement layer, and the base layer image is an image in the base layer at the same time as the enhancement layer image.
综上所述,在本发明实施例中,该基本层图像的质量低于该增强层图像的质量。To sum up, in the embodiment of the present invention, the quality of the base layer image is lower than the quality of the enhancement layer image.
目标图像块为该增强层图像中正在处理的图像块。The target image block is an image block being processed in the enhancement layer image.
基本层图像块为基本层图像中与该目标图像块在空间位置上存在对应关系的图像块。The base layer image block is an image block in the base layer image corresponding to the target image block in spatial position.
在本发明实施例中,基本层图像块与目标图像块的对应关系可以根据基本层图像与增强层图像之间的分辨率比例关系计算得到。例如,在包括x方向和y方向的系统内,如果增强层图像在x方向与y方向的分辨率分别是基本层图像的2倍,则对于增强层中左上角的像素坐标为(2x,2y)且大小为(2m)×(2n)的图像块,其基本层图像中的对应块可以是左上角的像素坐标为(x,y)且大小为m×n的图像块。In the embodiment of the present invention, the corresponding relationship between the base layer image block and the target image block can be calculated according to the resolution ratio relationship between the base layer image and the enhancement layer image. For example, in a system including x direction and y direction, if the resolution of the enhancement layer image in the x direction and y direction is twice that of the base layer image respectively, then the pixel coordinates of the upper left corner in the enhancement layer are (2x, 2y ) with a size of (2m)×(2n), the corresponding block in the base layer image can be an image block whose pixel coordinates in the upper left corner are (x, y) and whose size is m×n.
在本发明实施例中,将图像(包括增强层图像和基本层图像)分为简单的两类区域,即,平滑区域和非平滑区域。在平滑区域,编码时通常可以获得较为准确的预测值,从而,最终编码时确定的编码块标记(CBF,Coded Block Flag)为0,即残差为0。在非平滑区域,编码时由于信号特性相关性不大,无法精确预测,因此不能得到较为准确的预测值,导致预测后残差较大或不均匀,从而,最终编码的CBF不为0。In the embodiment of the present invention, an image (including an enhancement layer image and a base layer image) is divided into two simple types of regions, namely, a smooth region and a non-smooth region. In the smooth area, a relatively accurate prediction value can usually be obtained during encoding, so that the coded block flag (CBF, Coded Block Flag) determined during final encoding is 0, that is, the residual is 0. In the non-smooth area, due to the small correlation of signal characteristics during encoding, it is impossible to predict accurately, so a more accurate prediction value cannot be obtained, resulting in large or uneven residual after prediction, so that the final encoded CBF is not 0.
因此,在本发明实施例中,可以确定基本层图像中CBF为0的图像块(基本层图像的平滑区域图像块)位于平滑区域,从而,可以认为与该图像块相对应的增强层图像中的图像块(增强层图像的平滑区域图像块)位于平滑区域。同理,可以确定基本层图像中CBF不为0的图像块(基本层图像的非平滑区域图像块)位于非平滑区域,从而,可以认为与该图像块相对应的增强层图像中的图像块(增强层图像的非平滑区域图像块)位于非平滑区域。如上所述,可以确定增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,以及,增强层图像的非平滑区域图像块和该基本层图像的非平滑区域图像块。Therefore, in the embodiment of the present invention, it can be determined that the image block with a CBF of 0 in the base layer image (the image block in the smooth area of the base layer image) is located in the smooth area, and thus, it can be considered that the image block corresponding to the image block in the enhancement layer image The image blocks (smooth area image blocks of the enhancement layer image) are located in the smooth area. Similarly, it can be determined that the image block in the base layer image whose CBF is not 0 (the image block in the non-smooth area of the base layer image) is located in the non-smooth area, so that the image block in the enhancement layer image corresponding to this image block can be considered (A non-smooth region image block of an enhancement layer image) is located in a non-smooth region. As described above, smooth area image blocks of the enhancement layer image and smooth area image blocks of the base layer image, and non-smooth area image blocks of the enhancement layer image and non-smooth area image blocks of the base layer image may be determined.
其后,在S210,可以根据增强层图像的非平滑区域图像块和该基本层图像的非平滑区域图像块训练第一训练滤波器,作为示例而非限定,可以通过以下方法,训练该第一训练滤波器。Thereafter, at S210, the first training filter may be trained according to the non-smooth area image block of the enhancement layer image and the non-smooth area image block of the base layer image. As an example but not a limitation, the first training filter may be trained by the following method Train the filter.
如图2所示,y1(n)表示增强层图像(原始图像)的平滑区域图像块(多个图像快的集合,以下,称为原始平滑区域图像块),x(n)表示基本层图像的平滑区域图像块,H(n)表示待确定的滤波器(第一训练滤波器),e(n)表示经过滤波以后的基本层图像的平滑区域图像块(记作预测图像块)与原始平滑区域图像块。例如,以使原始平滑区域图像块与预测图像块的像素值的均方误差最小,作为优化条件(第一预设条件的一例),求解H(n)。As shown in Figure 2, y1(n) represents the smooth area image block of the enhancement layer image (original image) (a collection of multiple image blocks, hereinafter referred to as the original smooth area image block), and x(n) represents the base layer image H(n) represents the filter to be determined (the first training filter), e(n) represents the smooth region image block of the filtered base layer image (referred to as the predicted image block) and the original Smooth region image patches. For example, to minimize the mean square error of the pixel values of the original smooth region image block and the predicted image block as an optimization condition (an example of the first preset condition), H(n) is solved.
该H(n)的最优解可以表示为以上式(1),The optimal solution of H(n) can be expressed as the above formula (1),
应理解,以上列举的获取训练滤波器的方法仅为示例性说明,本发明并不限定于此,例如,可以通过改变上述最优化条件等,对该获取训练滤波器的方法进行各种变更。It should be understood that the methods for obtaining training filters listed above are only illustrative, and the present invention is not limited thereto. For example, various changes may be made to the method for obtaining training filters by changing the above optimization conditions and the like.
可选地,该方法还包括:Optionally, the method also includes:
根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及According to the smooth region image block of the enhancement layer image and the smooth region image block of the base layer image, determine a second training filter so that the second training filter satisfies: according to the second training filter and the base layer image The similarity between the second prediction information determined based on the smooth area image block of the enhancement layer image and the second original information determined according to the smooth area image block of the enhancement layer image satisfies a second preset condition, wherein the base layer image and the enhancement layer image layer image correspondence; and
该根据该第一训练滤波器,确定备选上采样滤波器,进一步包括:According to the first training filter, determining an alternative upsampling filter further includes:
根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。A candidate upsampling filter is determined according to the first training filter and the second training filter, wherein the candidate upsampling filter includes the first training filter and the second training filter.
在本发明实施例中,除训练的样本不同(第一训练滤波器是增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块训练获得,第二训练滤波器是该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块训练获得),外其他过程相似,这里,为了避免赘述,省略其说明。In the embodiment of the present invention, except that the training samples are different (the first training filter is obtained by training the non-smooth area image block of the enhancement layer image and the non-smooth area image block of the base layer image, and the second training filter is the enhancement layer image block The smooth area image block of the image and the smooth area image block of the base layer image are obtained through training), and other processes are similar, and here, in order to avoid redundant description, its description is omitted.
通过上述方法,可以分别得到第一训练滤波器和第二训练滤波器,因此,在本发明实施例中,训练滤波器的系数是固定的,在编码过程中不需要消耗比特传输滤波器系数,同时在解码端选择滤波器时,例如,可以根据基本层对应块的CBF值判断当前块所属类型(即,为平滑区域图像块或非平滑区域图像块),从而,无需传输每个图像块使用的滤波器的索引,提高了图像处理的性能。Through the above method, the first training filter and the second training filter can be obtained respectively. Therefore, in the embodiment of the present invention, the coefficients of the training filter are fixed, and there is no need to consume bit transmission filter coefficients in the encoding process. At the same time, when selecting a filter at the decoding end, for example, the type of the current block (that is, an image block in a smooth area or an image block in a non-smooth area) can be judged according to the CBF value of the corresponding block in the base layer, so that there is no need to transmit each image block using The index of the filter improves the performance of image processing.
从而,在备选滤波器可以包括该第一训练滤波器和第二训练滤波器,即,情况4。Therefore, the candidate filter may include the first training filter and the second training filter, that is, case 4.
情况4Case 4
可选地,该从备选上采样滤波器中,确定目标上采样滤波器,包括:Optionally, the target upsampling filter is determined from the alternative upsampling filters, including:
根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;determining the smoothness of the target image according to feature information of the base layer image block, wherein the feature information includes coding block marking information of the base layer image block or residual information of the base layer image block;
根据该目标图像块的平滑度,确定该目标上采样滤波器。The target upsampling filter is determined according to the smoothness of the target image block.
具体地说,在该备选上采样滤波器包括如上所述获取的第一训练滤波器和第二训练滤波器的情况下,在S230中,可以根据目标图像块的类型(为平滑区域图像块或非平滑区域图像块),选择目标上采样滤波器。Specifically, in the case where the candidate upsampling filter includes the first training filter and the second training filter obtained as described above, in S230, according to the type of the target image block (which is a smooth region image block or non-smooth region image blocks), select the target upsampling filter.
在本发明实施例中,当与该目标图像块相对应的基本层图像块的CBF为0时,可以确定该目标图像块位于平滑区域。同理,当与该目标图像块相对应的基本层图像块的CBF不为0时,可以确定该目标图像块位于非平滑区域。In the embodiment of the present invention, when the CBF of the base layer image block corresponding to the target image block is 0, it may be determined that the target image block is located in a smooth region. Similarly, when the CBF of the base layer image block corresponding to the target image block is not 0, it can be determined that the target image block is located in a non-smooth area.
应理解,以上列举的确定目标图像块的平滑度的方法和使用的参数仅为示例性说明,本发明并不限定于此,其他能够确定目标图像块的平滑度,即,确定目标图像块处于增强层图像中的平滑区域或非平滑区域的方法和参数,均落入本发明的保护范围。It should be understood that the method for determining the smoothness of the target image block and the parameters used above are only exemplary, and the present invention is not limited thereto. Others can determine the smoothness of the target image block, that is, determine that the target image block is in The methods and parameters for enhancing the smooth area or non-smooth area in the image of the layer fall within the protection scope of the present invention.
此情况下,在S240,可以如上所述确定的根据该目标上采样滤波器,对基本层图像块的重建图像进行上采样,从而确定相对于目标图像块的预测值。In this case, at S240, the reconstructed image of the base layer image block may be up-sampled according to the target up-sampling filter determined as described above, so as to determine a prediction value relative to the target image block.
从而,在S250,可以根据该预测值和从目标码流中获取的残差信息,对目标图像块进行解码,在本发明实施例中,该过程可以与现有技术相同,这里为了避免赘述,省略其说明。Therefore, at S250, the target image block can be decoded according to the predicted value and the residual information obtained from the target code stream. In the embodiment of the present invention, this process can be the same as that of the prior art. To avoid redundant description, here Its description is omitted.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该从备选上采样滤波器中,确定目标上采样滤波器,包括:The target upsampling filter is determined from the alternative upsampling filters, including:
从该目标码流中,获取用于指示该目标上采样滤波器的第一指示信息,From the target code stream, acquire first indication information for indicating the target upsampling filter,
根据该第一指示信息,确定该目标上采样滤波器。Determine the target upsampling filter according to the first indication information.
在本发明实施例中,作为传统滤波器,例如,可以包括现有的余弦插值滤波器。以下说明中,为了便于说明,以该传统滤波器为余弦插值滤波器为例,进行说明。In the embodiment of the present invention, as a traditional filter, for example, an existing cosine interpolation filter may be included. In the following description, for ease of description, the conventional filter is taken as an example of a cosine interpolation filter for description.
具体地说,在本发明实施例中,上述获取训练滤波器的方法(训练过程)在像素域进行,并且,可以针对不同的下采样比例(增强层图像与基本层图像之间的分辨率比)进行不同的训练,例如,存在对于整像素位置和半像素位置获得的滤波器相异的情况,因此,可能导致对整像素位置和半像素位置的预测不均衡,从而影响预测残差的平稳性,因此,在本发明实施例中,还可以在备选上采样滤波器中还可以加入传统滤波器,例如,余弦插值滤波器,该余弦插值滤波器的获取方法可以与现有技术相同,这里,为了避免赘述,省略其说明。Specifically, in the embodiment of the present invention, the above-mentioned method for obtaining the training filter (training process) is performed in the pixel domain, and can be used for different downsampling ratios (the resolution ratio between the enhancement layer image and the base layer image) ) for different training, for example, there are cases where the filters obtained for integer pixel positions and half pixel positions are different, therefore, it may lead to unbalanced predictions for integer pixel positions and half pixel positions, thus affecting the stability of the prediction residual Therefore, in the embodiment of the present invention, a traditional filter, such as a cosine interpolation filter, can also be added to the alternative upsampling filter, and the acquisition method of the cosine interpolation filter can be the same as that of the prior art, Here, in order to avoid redundant description, its description is omitted.
从而,在备选滤波器可以包括该第一训练滤波器和第二训练滤波器和余弦插值滤波器(传统滤波器的一例),即,情况5。Therefore, the candidate filter may include the first training filter and the second training filter and a cosine interpolation filter (an example of a traditional filter), that is, case 5.
情况5Case 5
在S230中,例如,可以从目标码流中获取第一指示信息,在本发明实施例中,在备选滤波器包括该余弦插值滤波器或第一训练滤波器或第二训练滤波器,作为目标上采样滤波器时,备选滤波器为三个,并且,如上所述编码端或解码端可以根据目标图像块的平滑度,确定使用第一训练滤波器或第二训练滤波器,因此,可以在码流中仅用一位标识符来承载该第一指示信息,以指示该目标上采样滤波器为传统滤波器(余弦插值滤波器)还是训练滤波器(第一训练滤波器或第二训练滤波器)。例如,当指示信息为1时,选择训练滤波器(包括第一训练滤波器或第二训练滤波器),并根据该目标图像块的平滑度,从该第一训练滤波器或第二训练滤波器中确定目标上采样滤波器。例如,当指示信息为0时,选择余弦插值滤波器作为目标上采样滤波器。In S230, for example, the first indication information may be obtained from the target code stream. In this embodiment of the present invention, the alternative filter includes the cosine interpolation filter or the first training filter or the second training filter, as When the target upsampling filter is used, there are three alternative filters, and, as described above, the encoding end or the decoding end can determine to use the first training filter or the second training filter according to the smoothness of the target image block. Therefore, Only one bit identifier can be used in the code stream to carry the first indication information to indicate whether the target upsampling filter is a traditional filter (cosine interpolation filter) or a training filter (first training filter or second training filter). For example, when the indication information is 1, select the training filter (including the first training filter or the second training filter), and according to the smoothness of the target image block, from the first training filter or the second training filter The target upsampling filter is determined in the filter. For example, when the indication information is 0, the cosine interpolation filter is selected as the target upsampling filter.
应理解,以上列举的通过第一指示信息指示目标上采样滤波器的方法仅为示例性说明,本发明并不限定于此。It should be understood that the method for indicating the target upsampling filter by using the first indication information listed above is only an exemplary description, and the present invention is not limited thereto.
需要说明的是,当备选滤波器中传统滤波器的个数为至少两个时,可以通过增加第一指示信息的位数,来实现指示目标图像块的目的。It should be noted that when the number of conventional filters in the candidate filters is at least two, the purpose of indicating the target image block can be achieved by increasing the number of bits of the first indication information.
此情况下,在S240,可以如上所述确定的根据该目标上采样滤波器,对基本层图像块的重建图像进行上采样,从而确定相对于目标图像块的预测值。In this case, at S240, the reconstructed image of the base layer image block may be up-sampled according to the target up-sampling filter determined as described above, so as to determine a prediction value relative to the target image block.
从而,在S250,可以根据该预测值和从目标码流中获取的残差信息,对目标图像块进行解码,在本发明实施例中,该过程可以与现有技术相同,这里为了避免赘述,省略其说明。Therefore, at S250, the target image block can be decoded according to the predicted value and the residual information obtained from the target code stream. In the embodiment of the present invention, this process can be the same as that of the prior art. To avoid redundant description, here Its description is omitted.
在通过余弦插值滤波器进行上采样时,始终为直接复制基本层图像的对应像素点,但是,在例如,可伸缩视频编码方法中,基本层图像的像素并不是直接复制对应的增强层图像的像素,此时,如果目标图像的整像素位于突变点,进行上采样时直接复制基本层对应像素点会出现很大误差。因此使用这种方法进行上采样,可能会使得增强层图像的整像素位置有较大误差,因此,在本发明实施例中,通过对上述突变点的像素运用本发明实施例的方法训练得到的训练滤波器(第一训练滤波器或第二训练滤波器),能够提高上采样的效果,提高编码和图像处理的性能。When upsampling through a cosine interpolation filter, the corresponding pixels of the base layer image are always copied directly, but, for example, in scalable video coding methods, the pixels of the base layer image are not directly copied from the corresponding enhancement layer image At this time, if the entire pixel of the target image is located at the mutation point, a large error will occur when directly copying the corresponding pixel of the base layer when performing upsampling. Therefore, using this method for upsampling may cause a large error in the integer pixel position of the enhancement layer image. Therefore, in the embodiment of the present invention, the pixels obtained by using the method of the embodiment of the present invention to train the above-mentioned mutation points The training filter (the first training filter or the second training filter) can improve the effect of upsampling and improve the performance of encoding and image processing.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该确定目标上采样滤波器,包括:The determined target upsampling filter, including:
确定该目标图像块的纹理度;Determine the texture degree of the target image block;
根据该目标图像块的纹理度,确定该目标上采样滤波器。The target upsampling filter is determined according to the texture degree of the target image block.
如上所述,在本发明实施中,在该备选上采样滤波器包括余弦插值滤波器、第一训练滤波器和第二训练滤波器的情况下。如上所述,在根据RDO选择目标上采样滤波器后,需要在码流中传输用于承载编码后的第一指示信息的标记位,以在解码上述编码后的目标图像块时确定目标上采样滤波器是哪一个滤波器。因此,本方案中可以采用两个候选滤波器,但是并不通过RDO进行选择,而是根据不同滤波器的不同特征进行选择,从而避免多传输一个标记位表示目标上采样滤波器。即,该备选滤波器包括第一训练滤波器和传统滤波器,即,情况6As mentioned above, in the implementation of the present invention, in the case where the candidate upsampling filter includes a cosine interpolation filter, a first training filter and a second training filter. As mentioned above, after selecting the target upsampling filter according to RDO, it is necessary to transmit the flag bit used to carry the coded first indication information in the code stream, so as to determine the target upsampling when decoding the above coded target image block Which filter is the filter. Therefore, in this solution, two candidate filters can be used, but they are not selected through the RDO, but are selected according to different characteristics of different filters, so as to avoid transmitting an extra flag bit to indicate the target upsampling filter. That is, the candidate filter includes the first training filter and the traditional filter, i.e. case 6
情况6Case 6
在S230中,例如,可以根据基本层图像块的特征信息从第一训练滤波器和余弦插值滤波器(传统滤波器的一例)中选择目标上采样滤波器,从而避免传输标记位表示所使用的滤波器,例如,可以采用根据基本层图像块的纹理强度来确定选择使用的滤波器,在本发明实施例中,可以采用,例如,边缘检测,纹理强度分析或者帧内编码预测模式等方法,确定基本层图像块的纹理度,并在,例如,当纹理度较强时,选择使用训练所得滤波器作为目标上采样滤波器,其余都使用余弦插值滤波器。以上列举的通过边缘检测,纹理强度分析或者帧内编码预测模式等方法确定基本层图像块的纹理度的方法可以与现有技术相同,这里,为了避免赘述,省略其说明。In S230, for example, the target upsampling filter may be selected from the first training filter and the cosine interpolation filter (an example of a traditional filter) according to the feature information of the base layer image block, thereby avoiding the transmission of the The filter, for example, can be used to determine the selected filter according to the texture strength of the base layer image block. In the embodiment of the present invention, methods such as edge detection, texture strength analysis, or intra-frame coding prediction mode can be used, Determine the texture of the base layer image block, and, for example, when the texture is strong, choose to use the filter obtained from training as the target upsampling filter, and use the cosine interpolation filter for the rest. The method for determining the texture degree of the base layer image block by means of edge detection, texture strength analysis, or intra-frame coding prediction mode listed above may be the same as that of the prior art, and its description is omitted here to avoid redundant description.
此情况下,在S240,可以如上所述确定的根据该目标上采样滤波器,对基本层图像块的重建图像进行上采样,从而确定相对于目标图像块的预测值。In this case, at S240, the reconstructed image of the base layer image block may be up-sampled according to the target up-sampling filter determined as described above, so as to determine a prediction value relative to the target image block.
从而,在S250,可以根据该预测值和从目标码流中获取的残差信息,对目标图像块进行解码,在本发明实施例中,该过程可以与现有技术相同,这里为了避免赘述,省略其说明。Therefore, at S250, the target image block can be decoded according to the predicted value and the residual information obtained from the target code stream. In the embodiment of the present invention, this process can be the same as that of the prior art. To avoid redundant description, here Its description is omitted.
在通过余弦插值滤波器进行上采样时,始终为直接复制基本层图像的对应像素点,但是,在例如,可伸缩视频编码方法中,基本层图像的像素并不是直接复制对应的增强层图像的像素,此时,如果目标图像的整像素位于突变点,进行上采样时直接复制基本层对应像素点会出现很大误差。第一训练滤波器能够对突变点位置的像素进行较好的恢复,因此可以很好的弥补余弦插值滤波器的不足。When upsampling through a cosine interpolation filter, the corresponding pixels of the base layer image are always copied directly, but, for example, in scalable video coding methods, the pixels of the base layer image are not directly copied from the corresponding enhancement layer image At this time, if the entire pixel of the target image is located at the mutation point, a large error will occur when directly copying the corresponding pixel of the base layer when performing upsampling. The first training filter can better restore the pixels at the position of the mutation point, so it can well make up for the deficiency of the cosine interpolation filter.
根据本发明实施例的用于图像处理的方法,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。According to the method for image processing in the embodiment of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, the number of upsampling filters can be reduced while improving the effect of upsampling and no transmission filter is required The coefficients and indexes can improve the coding performance and improve the effect and performance of image processing.
上文中,结合图1至图3,详细描述了根据本发明实施例的用于图像处理的方法,下面,将结合图4至图5,详细描述根据本发明实施例的用于图像处理的装置。Above, the method for image processing according to the embodiment of the present invention is described in detail with reference to FIGS. .
图4示出了根据本发明实施例的用于图像处理的装置300的示意性框图。如图7所示,该装置300包括:Fig. 4 shows a schematic block diagram of an apparatus 300 for image processing according to an embodiment of the present invention. As shown in Figure 7, the device 300 includes:
获取单元310,用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;The obtaining unit 310 is configured to determine a first training filter according to the non-smooth area image block of the enhancement layer image and the non-smooth area image block of the base layer image, so that the first training filter satisfies: according to the first training filter The similarity between the first prediction information determined by the detector and the non-smooth area image block of the base layer image and the first original information determined according to the non-smooth area image block of the enhancement layer image satisfies a first preset condition, wherein, The base layer image corresponds to the enhancement layer image;
确定单元320,用于根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;A determining unit 320, configured to determine a candidate upsampling filter according to the first training filter, where the candidate upsampling filter includes the first training filter;
用于从该备选上采样滤波器中,确定目标上采样滤波器,并向编码单元330传输该目标上采样滤波器,该备选上采样滤波器包括该获取单元310获取的该第一训练滤波器;For determining a target upsampling filter from the candidate upsampling filters, and transmitting the target upsampling filter to the encoding unit 330, the candidate upsampling filter includes the first training obtained by the obtaining unit 310 filter;
编码单元330,用于从该确定单元获取该上采样滤波器,并根据该目标上采样滤波器和基本层图像块,确定预测信息;An encoding unit 330, configured to obtain the upsampling filter from the determination unit, and determine prediction information according to the target upsampling filter and the base layer image block;
用于根据该预测信息,对目标图像块进行编码处理,以生成目标码流,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。is used to encode the target image block according to the prediction information to generate a target code stream, wherein the target image block is located in the enhancement layer image, the base layer image block is located in the base layer image, and the base image The spatial position of the block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
可选地,该获取单元310还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及Optionally, the obtaining unit 310 is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter satisfies: according to The similarity between the second training filter and the second prediction information determined by the smooth area image block of the base layer image and the second original information determined by the smooth area image block of the enhancement layer image satisfies a second preset condition , where the base layer image corresponds to the enhancement layer image; and
该确定单元320进一步用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。The determining unit 320 is further configured to determine a candidate upsampling filter according to the first training filter and the second training filter, wherein the candidate upsampling filter includes the first training filter and the second training filter Train the filter.
可选地,该确定单元320具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;Optionally, the determining unit 320 is specifically configured to determine the smoothness of the target image according to the feature information of the base layer image block, where the feature information includes coding block label information of the base layer image block or the base layer image block The residual information of the image block;
用于根据该目标图像块的平滑度,确定该目标上采样滤波器。It is used to determine the target up-sampling filter according to the smoothness of the target image block.
可选地,该确定单元320进一步用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;以及Optionally, the determining unit 320 is further configured to determine a candidate upsampling filter according to the first training filter, the second training filter and the traditional filter, wherein the candidate upsampling filter includes the first training filter a training filter, the second training filter, and the legacy filter; and
该编码单元330具体用于根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,该目标码流包括用于指示该目标上采样滤波器的第一指示信息,该第一指示信息用以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器的依据。The encoding unit 330 is specifically configured to perform encoding processing on the target image block according to the prediction information to generate a target code stream, and the target code stream includes first indication information for indicating the target upsampling filter, the first The indication information is used as a basis for obtaining the target up-sampling filter when decoding the encoded target image block.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该确定单元320具体用于确定该目标图像块的纹理度;The determining unit 320 is specifically configured to determine the texture degree of the target image block;
用于根据该目标图像块的纹理度,确定该目标上采样滤波器。It is used for determining the target up-sampling filter according to the texture degree of the target image block.
根据本发明实施例的用于图像处理的装置,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。According to the device for image processing in the embodiment of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, the number of upsampling filters can be reduced while improving the effect of upsampling and no transmission filter is required The coefficients and indexes can improve the coding performance and improve the effect and performance of image processing.
根据本发明实施例的用于图像处理的装置300可对应于本发明实施例的方法中的编码端,并且,该用于图像处理的装置300中的各单元即模块和上述其他操作和/或功能分别为了实现图1中的方法100的相应流程,为了简洁,在此不再赘述。The device 300 for image processing according to the embodiment of the present invention may correspond to the encoding end in the method of the embodiment of the present invention, and each unit in the device 300 for image processing is the module and the above-mentioned other operations and/or The functions are respectively for realizing the corresponding flow of the method 100 in FIG. 1 , and for the sake of brevity, details are not described here.
图5示出了根据本发明实施例的用于图像处理的装置400的示意性框图。如图5所示,该装置500包括:Fig. 5 shows a schematic block diagram of an apparatus 400 for image processing according to an embodiment of the present invention. As shown in Figure 5, the device 500 includes:
获取单元510,用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;The obtaining unit 510 is configured to determine a first training filter according to the non-smooth area image block of the enhancement layer image and the non-smooth area image block of the base layer image, so that the first training filter satisfies: according to the first training filter The similarity between the first prediction information determined by the detector and the non-smooth area image block of the base layer image and the first original information determined according to the non-smooth area image block of the enhancement layer image satisfies a first preset condition, wherein, The base layer image corresponds to the enhancement layer image;
确定单元520,用于根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;A determining unit 520, configured to determine a candidate upsampling filter according to the first training filter, where the candidate upsampling filter includes the first training filter;
用于从备选上采样滤波器中,确定目标上采样滤波器,该备选上采样滤波器包括该第一训练滤波器,并向解码单元530传输该目标上采样滤波器,该备选上采样滤波器包括该获取单元获取510的该第一训练滤波器;For determining a target upsampling filter from candidate upsampling filters, the candidate upsampling filter including the first training filter, and transmitting the target upsampling filter to the decoding unit 530, the candidate upsampling filter The sampling filter includes the first training filter acquired by the acquiring unit 510;
解码单元530,用于从该确定单元520获取该目标上采样滤波器,并根据该目标上采样滤波器和基本层图像块,确定预测信息;A decoding unit 530, configured to obtain the target upsampling filter from the determining unit 520, and determine prediction information according to the target upsampling filter and the base layer image block;
用于根据该预测信息和从目标码流中获取的残差信息,对目标图像块进行解码处理,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。Decoding the target image block according to the prediction information and the residual information obtained from the target code stream, wherein the target image block is located in the enhancement layer image, and the base layer image block is located in the base layer image , and the spatial position of the basic image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
可选地,该获取单元510还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及Optionally, the obtaining unit 510 is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter satisfies: according to The similarity between the second training filter and the second prediction information determined by the smooth area image block of the base layer image and the second original information determined by the smooth area image block of the enhancement layer image satisfies a second preset condition , where the base layer image corresponds to the enhancement layer image; and
该确定单元520进一步用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。The determining unit 520 is further configured to determine a candidate upsampling filter according to the first training filter and the second training filter, wherein the candidate upsampling filter includes the first training filter and the second training filter Train the filter.
可选地,该确定单元520具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;Optionally, the determining unit 520 is specifically configured to determine the smoothness of the target image according to the feature information of the base layer image block, where the feature information includes coding block label information of the base layer image block or the base layer image block The residual information of the image block;
根据该目标图像块的平滑度,确定该目标上采样滤波器。The target upsampling filter is determined according to the smoothness of the target image block.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该确定单元520具体用于从该目标码流中,获取用于指示该目标上采样滤波器的第一指示信息,The determining unit 520 is specifically configured to acquire first indication information for indicating the target upsampling filter from the target code stream,
用于根据该第一指示信息,确定该目标上采样滤波器。It is used for determining the target up-sampling filter according to the first indication information.
可选地,该备选上采样滤波器还包括传统滤波器,以及Optionally, the alternative upsampling filter also includes a conventional filter, and
该确定单元520具体用于确定该目标图像块的纹理度;The determining unit 520 is specifically configured to determine the texture degree of the target image block;
用于根据该目标图像块的纹理度,确定该目标上采样滤波器。It is used for determining the target up-sampling filter according to the texture degree of the target image block.
根据本发明实施例的用于图像处理的装置,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。According to the device for image processing in the embodiment of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, the number of upsampling filters can be reduced while improving the effect of upsampling and no transmission filter is required The coefficients and indexes can improve the coding performance and improve the effect and performance of image processing.
根据本发明实施例的用于图像处理的装置400可对应于本发明实施例的方法中的编码端,并且,该用于图像处理的装置400中的各单元即模块和上述其他操作和/或功能分别为了实现图3中的方法200的相应流程,为了简洁,在此不再赘述。The device 400 for image processing according to the embodiment of the present invention may correspond to the encoding end in the method of the embodiment of the present invention, and each unit in the device 400 for image processing is the module and the above-mentioned other operations and/or The functions are respectively for realizing the corresponding flow of the method 200 in FIG. 3 , and for the sake of brevity, details are not repeated here.
图6示出了根据本发明实施例的用于图像处理的编码器500的示意性框图。如图6所示,该解码器500包括:Fig. 6 shows a schematic block diagram of an encoder 500 for image processing according to an embodiment of the present invention. As shown in Figure 6, the decoder 500 includes:
总线510;bus 510;
与该总线相连的处理器520;a processor 520 connected to the bus;
与该总线相连的存储器530;A memory 530 connected to the bus;
其中,该处理器520通过该总线510,调用该存储器530中存储的程序,以根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;Wherein, the processor 520 invokes the program stored in the memory 530 through the bus 510, so as to determine the first training filter according to the non-smooth region image blocks of the enhancement layer image and the non-smooth region image blocks of the base layer image, to Make the first training filter satisfy: the first prediction information determined according to the first training filter and the non-smooth area image block of the base layer image and the first primitive determined according to the non-smooth area image block of the enhancement layer image The similarity between information satisfies a first preset condition, wherein the base layer image corresponds to the enhancement layer image;
根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;determining an alternative upsampling filter based on the first training filter, wherein the candidate upsampling filter includes the first training filter;
从该备选上采样滤波器中,确定目标上采样滤波器;From the candidate upsampling filters, a target upsampling filter is determined;
根据该目标上采样滤波器和基本层图像块,确定预测信息;determining prediction information based on the target upsampling filter and the base layer image block;
根据该预测信息,对目标图像块进行编码处理,以生成目标码流,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应According to the prediction information, the target image block is encoded to generate a target code stream, wherein the target image block is located in the enhancement layer image, the base layer image block is located in the base layer image, and the basic image block is in the The spatial position in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image
可选地,该处理单元520还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;Optionally, the processing unit 520 is further configured to determine a second training filter according to the smooth region image block of the enhancement layer image and the smooth region image block of the base layer image, so that the second training filter satisfies: according to The similarity between the second training filter and the second prediction information determined by the smooth area image block of the base layer image and the second original information determined by the smooth area image block of the enhancement layer image satisfies a second preset condition , where the base layer image corresponds to the enhancement layer image;
用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。It is used for determining a candidate upsampling filter according to the first training filter and the second training filter, wherein the candidate upsampling filter includes the first training filter and the second training filter.
可选地,该处理单元520具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;Optionally, the processing unit 520 is specifically configured to determine the smoothness of the target image according to feature information of the base layer image block, where the feature information includes coded block label information of the base layer image block or The residual information of the image block;
根据该目标图像块的平滑度,确定该目标上采样滤波器。The target upsampling filter is determined according to the smoothness of the target image block.
可选地,该处理单元520具体用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;Optionally, the processing unit 520 is specifically configured to determine a candidate upsampling filter according to the first training filter, the second training filter, and the traditional filter, where the candidate upsampling filter includes the first training filter a training filter, the second training filter and the legacy filter;
用于根据该预测信息,对该目标图像块进行编码处理,以生成目标码流,该目标码流包括用于指示该目标上采样滤波器的第一指示信息,该第一指示信息用以在解码上述编码后的目标图像块时作为获取该目标上采样滤波器的依据。is used to perform encoding processing on the target image block according to the prediction information to generate a target code stream, where the target code stream includes first indication information used to indicate the target upsampling filter, and the first indication information is used in Decoding the encoded target image block is used as a basis for obtaining the target upsampling filter.
可选地,该处理单元520具体用于根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;Optionally, the processing unit 520 is specifically configured to determine a candidate upsampling filter according to the first training filter and the traditional filter, where the candidate upsampling filter includes the first training filter and the traditional filter. filter;
用于确定该目标图像块的纹理度;Used to determine the texture degree of the target image block;
用于根据该目标图像块的纹理度,确定该目标上采样滤波器。It is used for determining the target up-sampling filter according to the texture degree of the target image block.
用于根据本发明实施例的用于图像处理的编码器,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。For the encoder for image processing according to the embodiment of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, the number of upsampling filters can be reduced while improving the effect of upsampling and there is no need for The filter coefficients and indexes are transmitted, so that the encoding performance can be improved, and the effect and performance of image processing can be improved.
根据本发明实施例的用于图像处理的编码器500可对应于本发明实施例的方法中的编码端,并且,该用于图像处理的编码器500中的各单元即模块和上述其他操作和/或功能分别为了实现图1中的方法100的相应流程,为了简洁,在此不再赘述。The encoder 500 for image processing according to the embodiment of the present invention may correspond to the encoding end in the method of the embodiment of the present invention, and each unit or module in the encoder 500 for image processing and the above-mentioned other operations and The/or functions are respectively for realizing the corresponding flow of the method 100 in FIG. 1 , and for the sake of brevity, details are not repeated here.
图7示出了根据本发明实施例的用于图像处理的解码器600的示意性框图。如图7所示,该解码器600包括:Fig. 7 shows a schematic block diagram of a decoder 600 for image processing according to an embodiment of the present invention. As shown in Figure 7, the decoder 600 includes:
总线610;bus 610;
与该总线相连的处理器620;a processor 620 connected to the bus;
与该总线相连的存储器630;A memory 630 connected to the bus;
其中,该处理器620通过该总线610,调用该存储器630中存储的程序,以用于根据增强层图像的非平滑区域图像块和基本层图像的非平滑区域图像块,确定第一训练滤波器,以使该第一训练滤波器满足:根据该第一训练滤波器和该基本层图像的非平滑区域图像块确定的第一预测信息与根据该增强层图像的非平滑区域图像块确定的第一原始信息之间的相似度满足第一预设条件,其中,该的基本层图像与该增强层图像相对应;Wherein, the processor 620 calls the program stored in the memory 630 through the bus 610, so as to determine the first training filter according to the non-smooth region image blocks of the enhancement layer image and the non-smooth region image blocks of the base layer image , so that the first training filter satisfies: the first prediction information determined according to the first training filter and the non-smooth region image block of the base layer image and the first prediction information determined according to the non-smooth region image block of the enhancement layer image A similarity between original information satisfies a first preset condition, wherein the base layer image corresponds to the enhancement layer image;
根据该第一训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器;determining an alternative upsampling filter based on the first training filter, wherein the candidate upsampling filter includes the first training filter;
从备选上采样滤波器中,确定目标上采样滤波器,该备选上采样滤波器包括该第一训练滤波器;determining a target upsampling filter from among candidate upsampling filters, the candidate upsampling filter comprising the first training filter;
根据该目标上采样滤波器和基本层图像块,确定预测信息;determining prediction information based on the target upsampling filter and the base layer image block;
根据该预测信息和从目标码流中获取的残差信息,对该目标码流进行解码处理,以获取该目标图像块,其中,该目标图像块位于该增强层图像中,该基本层图像块位于该基本层图像中,且该基本图像块在该基本层图像中的空间位置与该目标图像块在该增强层图像中的空间位置相对应。According to the prediction information and the residual information obtained from the target code stream, the target code stream is decoded to obtain the target image block, wherein the target image block is located in the enhancement layer image, and the base layer image block is It is located in the base layer image, and the spatial position of the basic image block in the base layer image corresponds to the spatial position of the target image block in the enhancement layer image.
可选地,该处理单元620还用于根据该增强层图像的平滑区域图像块和该基本层图像的平滑区域图像块,确定第二训练滤波器,以使该第二训练滤波器满足:根据该第二训练滤波器和该基本层图像的平滑区域图像块确定的第二预测信息与根据该增强层图像的平滑区域图像块确定的第二原始信息之间的相似度满足第二预设条件,其中,该的基本层图像与该增强层图像相对应;以及Optionally, the processing unit 620 is further configured to determine a second training filter according to the smooth area image block of the enhancement layer image and the smooth area image block of the base layer image, so that the second training filter satisfies: according to The similarity between the second training filter and the second prediction information determined by the smooth area image block of the base layer image and the second original information determined by the smooth area image block of the enhancement layer image satisfies a second preset condition , where the base layer image corresponds to the enhancement layer image; and
用于根据该第一训练滤波器和该第二训练滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该第二训练滤波器。It is used for determining a candidate upsampling filter according to the first training filter and the second training filter, wherein the candidate upsampling filter includes the first training filter and the second training filter.
可选地,该处理单元620具体用于根据该基本层图像块的特征信息,确定该目标图像的平滑度,其中,该特征信息包括该基本层图像块的编码块标记信息或对该基本层图像块的残差信息;Optionally, the processing unit 620 is specifically configured to determine the smoothness of the target image according to feature information of the base layer image block, where the feature information includes coded block label information of the base layer image block or The residual information of the image block;
根据该目标图像块的平滑度,确定该目标上采样滤波器。The target upsampling filter is determined according to the smoothness of the target image block.
可选地,该处理单元620具体用于根据该第一训练滤波器、该第二训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器、该第二训练滤波器和该传统滤波器;Optionally, the processing unit 620 is specifically configured to determine a candidate upsampling filter according to the first training filter, the second training filter and the traditional filter, where the candidate upsampling filter includes the first training filter a training filter, the second training filter and the legacy filter;
用于从该目标码流中,获取用于指示该目标上采样滤波器的第一指示信息,根据该第一指示信息,确定该目标上采样滤波器。。The method is used for acquiring first indication information for indicating the target up-sampling filter from the target code stream, and determining the target up-sampling filter according to the first indication information. .
可选地,该处理单元620具体用于根据该第一训练滤波器和传统滤波器,确定备选上采样滤波器,其中,该备选上采样滤波器包括该第一训练滤波器和该传统滤波器;Optionally, the processing unit 620 is specifically configured to determine a candidate upsampling filter according to the first training filter and the traditional filter, where the candidate upsampling filter includes the first training filter and the traditional filter. filter;
用于确定该目标图像块的纹理度;Used to determine the texture degree of the target image block;
根据该目标图像块的纹理度,确定该目标上采样滤波器。The target upsampling filter is determined according to the texture degree of the target image block.
根据本发明实施例的图像处理的解码器,通过根据平滑区域和非平滑区域,确定上采样滤波器,能够在提高上采样的效果的同时,减少上采样滤波器的数量并且无需传输滤波器系数以及索引,从而能够提高编码性能,进行提高图像处理的效果和性能。According to the image processing decoder of the embodiment of the present invention, by determining the upsampling filter according to the smooth area and the non-smooth area, the number of upsampling filters can be reduced while improving the effect of upsampling and there is no need to transmit filter coefficients And indexing, so as to improve the coding performance and improve the effect and performance of image processing.
根据本发明实施例的用于图像处理的解码器600可对应于本发明实施例的方法中的解码端,并且,该用于图像处理的解码器600中的各单元即模块和上述其他操作和/或功能分别为了实现图3中的方法200的相应流程,为了简洁,在此不再赘述。The decoder 600 for image processing according to the embodiment of the present invention may correspond to the decoding end in the method of the embodiment of the present invention, and each unit in the decoder 600 for image processing is a module and the above-mentioned other operations and The/or functions are respectively for realizing the corresponding flow of the method 200 in FIG. 3 , and for the sake of brevity, details are not described here again.
需要说明的是,为了使编码端与解码端(编码器、解码器)使用的目标上采样滤波器一致,所以要求编码端与解码端选择目标上采样滤波器的方法一致。换言之,可以根据所描述的编码端处理方法对应的确定解码端处理方法,或者根据所描述的解码端处理方法对应的确定编码端处理方法。It should be noted that, in order to make the target upsampling filter used by the encoding end and the decoding end (encoder, decoder) consistent, it is required that the encoding end and the decoding end select the target upsampling filter in the same way. In other words, the decoding end processing method may be determined according to the described encoding end processing method, or the encoding end processing method may be determined according to the described decoding end processing method.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" in this article is only an association relationship describing associated objects, which means that there may be three relationships, for example, A and/or B may mean: A exists alone, and A and B exist at the same time , there are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, rather than by the embodiment of the present invention. The implementation process constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and other media that can store program codes. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.
Claims (20)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210374978.5A CN103716622B (en) | 2012-09-29 | 2012-09-29 | Image processing method and device |
PCT/CN2013/084531 WO2014048374A1 (en) | 2012-09-29 | 2013-09-27 | Method and device for image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210374978.5A CN103716622B (en) | 2012-09-29 | 2012-09-29 | Image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103716622A CN103716622A (en) | 2014-04-09 |
CN103716622B true CN103716622B (en) | 2017-02-08 |
Family
ID=50387016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210374978.5A Active CN103716622B (en) | 2012-09-29 | 2012-09-29 | Image processing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103716622B (en) |
WO (1) | WO2014048374A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016192054A1 (en) * | 2015-06-03 | 2016-12-08 | 富士通株式会社 | Image coding method and apparatus using prediction information and image processing device |
CN109257605B (en) * | 2017-07-13 | 2021-11-19 | 华为技术有限公司 | Image processing method, device and system |
CN107800450A (en) * | 2017-11-13 | 2018-03-13 | 韩劝劝 | Radio plays intensity control system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101478671A (en) * | 2008-01-02 | 2009-07-08 | 中兴通讯股份有限公司 | Video encoding apparatus applied on video monitoring and video encoding method thereof |
CN101895748A (en) * | 2010-06-21 | 2010-11-24 | 华为终端有限公司 | Coding and decoding methods and coding and decoding devices |
CN102084653A (en) * | 2007-06-29 | 2011-06-01 | 弗劳恩霍夫应用研究促进协会 | Scalable video coding supporting pixel value refinement scalability |
CN102355583A (en) * | 2011-09-29 | 2012-02-15 | 广西大学 | Scalable video encoding (SVC) block-level interlayer intra prediction (ILIP) method |
CN102387366A (en) * | 2005-03-18 | 2012-03-21 | 夏普株式会社 | Methods and systems for extended spatial scalability with picture-level adaptation |
CN102598660A (en) * | 2009-04-20 | 2012-07-18 | 杜比实验室特许公司 | Adaptive interpolation filter for multi-layer video transmission |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080092425A (en) * | 2006-01-10 | 2008-10-15 | 노키아 코포레이션 | Switched filter-up-sampling mechanism for scalable video coding |
US7535383B2 (en) * | 2006-07-10 | 2009-05-19 | Sharp Laboratories Of America Inc. | Methods and systems for signaling multi-layer bitstream data |
US8774269B2 (en) * | 2006-10-25 | 2014-07-08 | Franuhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Quality scalable coding with mapping different ranges of bit depths |
-
2012
- 2012-09-29 CN CN201210374978.5A patent/CN103716622B/en active Active
-
2013
- 2013-09-27 WO PCT/CN2013/084531 patent/WO2014048374A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102387366A (en) * | 2005-03-18 | 2012-03-21 | 夏普株式会社 | Methods and systems for extended spatial scalability with picture-level adaptation |
CN102084653A (en) * | 2007-06-29 | 2011-06-01 | 弗劳恩霍夫应用研究促进协会 | Scalable video coding supporting pixel value refinement scalability |
CN101478671A (en) * | 2008-01-02 | 2009-07-08 | 中兴通讯股份有限公司 | Video encoding apparatus applied on video monitoring and video encoding method thereof |
CN102598660A (en) * | 2009-04-20 | 2012-07-18 | 杜比实验室特许公司 | Adaptive interpolation filter for multi-layer video transmission |
CN101895748A (en) * | 2010-06-21 | 2010-11-24 | 华为终端有限公司 | Coding and decoding methods and coding and decoding devices |
CN102355583A (en) * | 2011-09-29 | 2012-02-15 | 广西大学 | Scalable video encoding (SVC) block-level interlayer intra prediction (ILIP) method |
Also Published As
Publication number | Publication date |
---|---|
CN103716622A (en) | 2014-04-09 |
WO2014048374A1 (en) | 2014-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113766228B (en) | Point cloud compression method, encoder, decoder, and storage medium | |
US9510010B2 (en) | Method for decoding images based upon partition information determinations and apparatus for decoding using same | |
CN105721876A (en) | Method For Image Coding And Decoding | |
CN103108160B (en) | Monitor video data capture method, server and terminal | |
JP2016220216A (en) | Encoder and encoding method | |
US20130156346A1 (en) | Image interpolation method and apparatus | |
CN107454412B (en) | A video image processing method, device and system | |
Shen et al. | Edge-aware intra prediction for depth-map coding | |
WO2008145039A1 (en) | Methods, systems and devices for generating upsample filter and downsample filter and for performing encoding | |
CN103716629B (en) | Image processing method, device, coder and decoder | |
CN103096056A (en) | Matrix coding method and coding device and matrix decoding method and decoding device | |
KR20140123071A (en) | Distinct encoding and decoding of stable information and transient/stochastic information | |
CN103716622B (en) | Image processing method and device | |
CN103716630B (en) | Upsampling filter generation method and device | |
CN112399165B (en) | Decoding method and device, computer equipment and storage medium | |
CN103716631B (en) | For the method for image procossing, device, encoder | |
JP2018107692A (en) | Moving picture decoding apparatus, moving picture decoding method, moving picture encoding apparatus, moving picture encoding method, and computer-readable recording medium | |
CN103905812A (en) | Texture/depth combination up-sampling method | |
CN104104956A (en) | Layered video encoding and decoding method, encoding device and decoding device | |
Biadgie et al. | Multi-resolution lossless image compression for progressive transmission and multiple decoding using an enhanced edge adaptive hierarchical interpolation | |
US20250113037A1 (en) | Methods and non-transitory computer readable storage medium for adaptive spatial resampling towards machine vision | |
US20250106383A1 (en) | Competition based displacement skip for mesh compression | |
WO2006084419A1 (en) | Method for reducing bit rate requirements for encoding multimedia data | |
Kang | A fast and dynamic region-of-interest coding method based on the patterns in jpeg2000 images | |
PL | A Study on Image Compression Technology |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |