CN1668106A - Method and device for removing block effect of image frame by loop filtering - Google Patents
Method and device for removing block effect of image frame by loop filtering Download PDFInfo
- Publication number
- CN1668106A CN1668106A CN 200410028297 CN200410028297A CN1668106A CN 1668106 A CN1668106 A CN 1668106A CN 200410028297 CN200410028297 CN 200410028297 CN 200410028297 A CN200410028297 A CN 200410028297A CN 1668106 A CN1668106 A CN 1668106A
- Authority
- CN
- China
- Prior art keywords
- pixel
- pixel data
- threshold
- difference
- borders
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 48
- 230000000694 effects Effects 0.000 title claims description 16
- 238000001914 filtration Methods 0.000 title abstract description 17
- 238000003672 processing method Methods 0.000 claims abstract description 13
- 238000013139 quantization Methods 0.000 claims description 19
- 230000000903 blocking effect Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 12
- 239000013598 vector Substances 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 6
- 230000001953 sensory effect Effects 0.000 description 6
- 230000007423 decrease Effects 0.000 description 5
- 230000001360 synchronised effect Effects 0.000 description 4
- 230000002457 bidirectional effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
技术领域technical field
本发明提供一种用来处理图像画面的区块效应的方法与装置,尤其指一种以感觉阈值(perceptual threshold)方式的回路滤波来处理图像画面的区块效应的方法与装置。The present invention provides a method and a device for processing the block effect of an image frame, especially a method and a device for processing the block effect of an image frame by perceptual threshold loop filtering.
背景技术Background technique
目前通行的几种图像编码标准以区块为单位对一图像画面进行编码,并且每一区块的数据通常需经由量化运算的处理以增进编码过程的数据压缩率,因此该图像画面于解码后的区块边界通常具有不连续现象,所谓区块效应(blocking artifact)。为了使这种起因于图像编码而产生的不连续现象能够趋缓以改进图像画面的质量,最新进的视频信号编码标准——H.264采用回路滤波器来处理图像画面的区块效应。相关数据请参阅H.264视频信号编码标准的文件。Several currently prevailing image coding standards encode an image picture in units of blocks, and the data of each block usually needs to be processed by quantization operations to improve the data compression rate of the encoding process, so the image picture is decoded The block boundary of the block usually has a discontinuity phenomenon, the so-called block effect (blocking artifact). In order to ease the discontinuity caused by image coding and improve image quality, the latest video signal coding standard——H.264 uses a loop filter to deal with the block effect of image frames. For relevant data, please refer to the document of the H.264 video signal coding standard.
上述的回路滤波器为设置于编码回路或解码回路中的滤波器,其具有比设置于编码回路或解码回路之外的后级滤波器更佳的处理效率,并且不必如后级滤波器需设置额外的缓冲器。图1为具有回路滤波器的图像处理系统110、130与一传输/存储介质120的组合的示意图。图像处理系统110为一编码回路110,用来将输入端子111所输入的图像数据进行编码。而传输/存储介质120用来传输或存储编码回路110所产生的编码视频信号。图像处理系统130为一解码回路130,用来解码自传输/存储介质120输入的编码视频信号,并且于输出端子133输出解码后的图像数据。其中传输/存储介质120可以是网际网络等传输通道,也可以是CD或DVD等存储装置。编码回路110具有一编码单元112、一重建单元114、与一回路滤波器116。解码回路130具有一解码单元132与一回路滤波器136。依照MPEG标准的图像处理所需,具有部分图像信息的预测帧(P Frame、Predictive Frame)必须通过编码回路110或解码回路130对具有完整图像信息的内编码帧(I Frame、Intra Frame)进行比较,以完成所述预测帧的编码或解码。而回路滤波器116、136则可以在编码回路110或解码回路130进行编码或解码操作时一并完成所述回路滤波器所被赋予的滤波任务,因此其处理效率胜过所述后级滤波器的处理效率。The above-mentioned loop filter is a filter set in the encoding loop or decoding loop, which has better processing efficiency than the post-stage filter arranged outside the encoding loop or decoding loop, and does not need to be set as the post-stage filter additional buffer. FIG. 1 is a schematic diagram of a combination of an image processing system 110 , 130 with a loop filter and a transmission/storage medium 120 . The image processing system 110 is an encoding circuit 110 for encoding the image data input from the input terminal 111 . The transmission/storage medium 120 is used to transmit or store the encoded video signal generated by the encoding circuit 110 . The image processing system 130 is a decoding loop 130 for decoding the encoded video signal input from the transmission/storage medium 120 and outputting the decoded image data at the output terminal 133 . The transmission/storage medium 120 may be a transmission channel such as the Internet, or a storage device such as a CD or DVD. The encoding loop 110 has an
与后级滤波相比较,虽然H.264视频信号编码标准具有回路滤波的先天优势,运算的复杂度却成为H.264视频信号编码标准的瓶颈。以一符合H.264视频信号编码标准的解码器为例,用来去除区块效应的回路滤波器即占了整个解码回路约33%的工作量。Compared with post-stage filtering, although the H.264 video signal coding standard has inherent advantages of loop filtering, the computational complexity has become the bottleneck of the H.264 video signal coding standard. Taking a decoder conforming to the H.264 video signal encoding standard as an example, the loop filter used to remove blocking artifacts accounts for about 33% of the workload of the entire decoding loop.
发明内容Contents of the invention
因此本发明的主要目的在于提供一种以感觉阈值方式的回路滤波来处理图像画面的区块效应的方法与装置,以解决上述问题。Therefore, the main object of the present invention is to provide a method and device for processing the block effect of image frames by in-loop filtering in the form of perceptual threshold, so as to solve the above-mentioned problems.
本发明提供一种图像处理方法,用来处理一图像画面中两区块之间的区块效应(blocking artifact)。该图像处理方法具有:存储对应该两区块的像素数据;以及根据一第一阈值比较该两区块的边界两侧的两边界像素(boundary edge pixel)来决定是否调整该两边界像素的像素数据,若该两边界像素的像素数据所对应的差值符合该第一阈值,调整该两边界像素的像素数据以减少该两边界像素的像素数据所对应的差异。The invention provides an image processing method for processing the blocking artifact between two blocks in an image frame. The image processing method includes: storing pixel data corresponding to the two blocks; and comparing two boundary pixels (boundary edge pixels) on both sides of the boundary of the two blocks according to a first threshold to determine whether to adjust the pixels of the two boundary pixels If the difference corresponding to the pixel data of the two border pixels meets the first threshold, adjust the pixel data of the two border pixels to reduce the difference corresponding to the pixel data of the two border pixels.
本发明于提供上述方法的同时,亦对应地提供一种图像处理系统的回路滤波器,用来处理一图像画面中两区块之间的区块效应。该回路滤波器具有:一存储单元,用来存储对应该两区块的像素数据;一比较单元,电连接至该存储单元,用来依据一第一阈值比较该两区块的边界两侧的两边界像素(boundary edge pixel)来决定是否调整该两边界像素的像素数据,若该两边界像素的像素数据所对应的差值符合该第一阈值,该比较单元决定调整该两边界像素的像素数据以减少该两边界像素的像素数据所对应的差异;以及一运算单元(arithmetic unit),电连接至该比较单元与该存储单元,用来调整该两边界像素的像素数据。While providing the above method, the present invention also correspondingly provides a loop filter of an image processing system for processing the block effect between two blocks in an image frame. The loop filter has: a storage unit, used to store pixel data corresponding to the two blocks; a comparison unit, electrically connected to the storage unit, used to compare the two sides of the boundary of the two blocks according to a first threshold Two boundary pixels (boundary edge pixel) to determine whether to adjust the pixel data of the two boundary pixels, if the difference corresponding to the pixel data of the two boundary pixels meets the first threshold, the comparison unit decides to adjust the pixels of the two boundary pixels data to reduce the difference corresponding to the pixel data of the two boundary pixels; and an arithmetic unit (arithmetic unit), electrically connected to the comparison unit and the storage unit, for adjusting the pixel data of the two boundary pixels.
本发明的好处之一是,本发明以回路滤波来处理图像画面的区块效应,与后级滤波相比较,回路滤波具有较佳的处理效能。One of the advantages of the present invention is that the present invention uses in-loop filtering to process the block effect of the image frame. Compared with the post-stage filtering, the in-loop filtering has better processing performance.
本发明的另一好处是,本发明以感觉阈值的方式决定是否调整该两边界像素的像素数据,因此对于人眼不易辨识的区块效应可以快速决定不予处理,以增进该图像画面的处理效能。Another advantage of the present invention is that the present invention decides whether to adjust the pixel data of the two boundary pixels in the form of sensory threshold, so it can quickly decide not to process the block effect that is difficult for human eyes to improve the processing of the image frame efficacy.
附图说明Description of drawings
图1为常规的图像处理系统与一传输/存储介质的组合的示意图。FIG. 1 is a schematic diagram of a combination of a conventional image processing system and a transmission/storage medium.
图2为本发明的图像处理方法的流程示意图。FIG. 2 is a schematic flow chart of the image processing method of the present invention.
图3为图2的方法的内(intra)编码滤波的流程示意图。FIG. 3 is a schematic flowchart of intra coding filtering of the method in FIG. 2 .
图4为图2的方法之间(inter)编码滤波的流程示意图。FIG. 4 is a schematic flow chart of the inter-method (inter) encoding and filtering in FIG. 2 .
图5为图2的方法所处理的相关区块的示意图。FIG. 5 is a schematic diagram of related blocks processed by the method of FIG. 2 .
图6为图2的像素序列的示意图。FIG. 6 is a schematic diagram of the pixel sequence in FIG. 2 .
图7为图2的方法所处理的像素数据的示意图。FIG. 7 is a schematic diagram of pixel data processed by the method of FIG. 2 .
图8为图4的方法的边界强度对照表。FIG. 8 is a boundary strength comparison table of the method in FIG. 4 .
图9为本发明的感觉回路滤波器的示意图。FIG. 9 is a schematic diagram of the sensory loop filter of the present invention.
图10为一应用图9的感觉回路滤波器的图像编码系统的示意图。FIG. 10 is a schematic diagram of an image coding system applying the perceptual loop filter of FIG. 9 .
图11为一应用图9的感觉回路滤波器的图像解码系统的示意图。FIG. 11 is a schematic diagram of an image decoding system applying the perceptual loop filter of FIG. 9 .
附图符号说明
具体实施方式Detailed ways
请同时参考图2、图3、与图4,图2、图3、与图4皆为本发明的图像处理方法的流程示意图,其中图3与图4分别显示图2的步骤201a、201b的详细流程。本发明的方法首先于步骤200决定帧类型(frame type),步骤200为本领域所熟知。当一目前待处理的帧为一内编码帧(Intra frame)时,执行步骤201a,否则,该目前待处理的帧为一间编码帧(Inter frame),就执行步骤201b。上述的内编码帧的种类具有:内编码片段(Intraslice)与同步内编码片段(SI slice、Synchronized Intra slice)。而上述之间编码帧的种类具有:预测编码片段(Pslice、Predicted slice)、双向预测编码片段(Bslice、Bidirectional predicted slice)、与同步预测编码片段(SP slice、Synchronized Predicted slice)。由于步骤201b的内容与步骤201a的部分细节相似,以下将先说明步骤201a,再说明步骤201b。Please refer to FIG. 2, FIG. 3, and FIG. 4 at the same time. FIG. 2, FIG. 3, and FIG. 4 are all schematic flow charts of the image processing method of the present invention, wherein FIG. 3 and FIG. 4
请同时参考图3、图4、图5、与图6。图5为图3与图4的方法所处理的相关区块的示意图,图6为图3的像素序列的示意图。于本实施例中,图3与图4的方法所处理的图像画面以图5所示的宏区块(macroblock)300为组成的单位,每一宏区块300具有十六个区块(block)315、316、......、348,其中每一区块具有4×4个亮度的像素数据(luminance pixel data)或2×2个色彩的像素数据(chromatic pixel data)。图6的纵轴代表所述像素数据的大小,而图6的横轴则代表一垂直向量n,其中垂直向量n垂直于该图像画面中两相邻区块P、Q(未标示于相关图示)的边界401。Please refer to FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 at the same time. FIG. 5 is a schematic diagram of related blocks processed by the methods of FIG. 3 and FIG. 4 , and FIG. 6 is a schematic diagram of the pixel sequence in FIG. 3 . In this embodiment, the image frames processed by the methods shown in FIG. 3 and FIG. 4 are composed of macroblocks (macroblock) 300 shown in FIG. 5 , and each
图3、图4、与图6所示的像素数据pi、qi(i=0、1、......)分别对应于该两相邻区块P、Q,其中像素数据p0、q0分别代表该两区块P、Q中排列于垂直向量n上最靠近该两区块P、Q的边界401的边界像素(boundary edgepixel)的数据,而像素数据p1、q1则分别代表排列于垂直向量n上其次靠近边界401的边界内部像素(interior edge pixel)的数据,依此类推。例如以图5的区块326、336作为该两相邻区块P、Q,图5所显示的垂直向量m为垂直于边界303的垂直向量之一,则图6所示的边界401即为图5所示的边界303,并且图6所示的垂直向量n即为图5所示的垂直向量m。此时图6的像素数据p0、p1、......代表自图5的区块326中靠近边界303处起依序往远离边界303方向而排列于垂直向量m上的像素的数据,而图6的像素数据q0、q1、......代表自图5的区块336中靠近边界303处起依序往远离边界303方向而排列于垂直向量m上的像素的数据。随着不同的垂直向量m的选择,该图像画面的每一宏区块300的每一区块315、316、......、348的边界301、302、......、308上的区块效应(blocking artifact)可由图3与图4所示的图像处理方法逐一处理以移除的。The pixel data p i , q i (i=0, 1, . . . ) shown in FIG. 3 , FIG. 4 , and FIG. 6 respectively correspond to the two adjacent blocks P, Q, wherein the pixel data p 0 and q 0 respectively represent the data of the boundary pixel (boundary edge pixel) of the two blocks P and Q arranged on the vertical vector n closest to the boundary 401 of the two blocks P and Q, and the pixel data p 1 , q 1 Then respectively represent the data of the interior edge pixel (interior edge pixel) arranged on the vertical vector n which is next to the boundary 401 , and so on. For example, the
如图3所示,本发明提供一种图像处理方法,用来处理一图像画面中两区块P、Q之间的区块效应。其中该图像处理方法为一视频信号编码过程或视频信号解码过程的回路滤波方法。以下步骤的顺序并非限定本发明的范围,该图像处理方法的步骤201a的细节说明如下。As shown in FIG. 3 , the present invention provides an image processing method for processing the block effect between two blocks P and Q in an image frame. Wherein the image processing method is a video signal encoding process or a loop filtering method in the video signal decoding process. The order of the following steps does not limit the scope of the present invention, and the details of
步骤202:存储对应该两区块P、Q的像素数据pi、qi(i=0、1、2);Step 202: Store pixel data p i , q i (i=0, 1, 2) corresponding to the two blocks P, Q;
步骤204:根据一显著差异阈值(Noticeable Difference Threshold)ΔI比较该两区块P、Q的边界401两侧的两边界像素的像素数据p0、q0来决定是否调整该两边界像素的像素数据p0、q0,若该两边界像素的像素数据p0、q0所对应的差值p0-q0小于显著差异阈值ΔI,则进入提早终止(EarlyTermination)状态290以节省时间来处理后续的像素数据,否则进入步骤206,其中显著差异阈值ΔI亦可称为临界显著差异(JND、Just NoticeableDifference)ΔI;Step 204: According to a noticeable difference threshold (Noticeable Difference Threshold) ΔI, compare the
步骤206:根据一可辨不连续阈值(Recognizable DiscontinuityThreshold)T(ΔQ,ΔI)比较该两区块P、Q的边界401两侧的两边界像素的像素数据p0、q0来决定是否调整该两边界像素的像素数据p0、q0,若该两边界像素的像素数据p0、q0所对应的差值p0-q0小于可辨不连续阈值T(ΔQ,ΔI),则进入步骤208,否则进入提早终止状态290以节省时间来处理后续的像素数据,其中可辨不连续阈值T(ΔQ,ΔI)亦可称为可辨不连续限制(Recognizable Discontinuity Limit)T(ΔQ,ΔI);Step 206: According to a Recognizable Discontinuity Threshold (Recognizable DiscontinuityThreshold) T(ΔQ, ΔI), compare the
步骤208:根据一调整阈值(Adjustment Threshold)Δ0/2比较该两边界像素中的一像素的像素数据p0或q0与一紧邻的边界内部像素的像素数据p1或q1来决定是否调整该两边界像素的像素数据p0、q0,若区块P的像素数据差值p1-p0小于调整阈值Δ0/2或区块Q的像素数据差值q1-q0小于调整阈值Δ0/2,则进入步骤210,否则进入提早终止状态290以节省时间来处理后续的像素数据;Step 208: According to an adjustment threshold (Adjustment Threshold) Δ 0 /2, compare the pixel data p 0 or q 0 of a pixel among the two boundary pixels with the pixel data p 1 or q 1 of an adjacent internal pixel of the boundary to determine whether Adjust the pixel data p 0 and q 0 of the two border pixels, if the pixel data difference p 1 -p 0 of the block P is less than the adjustment threshold Δ 0 /2 or the pixel data difference q 1 -q 0 of the block Q is less than Adjust threshold Δ 0 /2, then enter step 210, otherwise enter early termination state 290 to save time to process subsequent pixel data;
步骤210:调整该两边界像素的像素数据p0、q0以减少该两边界像素的像素数据p0、q0所对应的差值p0-q0,其中差值p0-q0为亮度差异(luminancedifference)或色彩差异(chromatic difference)。本步骤调整结果如下:Step 210: Adjust the pixel data p 0 and q 0 of the two boundary pixels to reduce the difference p 0 -q 0 corresponding to the pixel data p 0 and q 0 of the two boundary pixels, wherein the difference p 0 -q 0 is Luminance difference or chromatic difference. The adjustment results of this step are as follows:
p0’=p0+kΔ0 p 0 '=p 0 +kΔ 0
q0’=q0-kΔ0 q 0 '=q 0 -kΔ 0
并且于调整后分别执行步骤212p、212q;And execute steps 212p and 212q respectively after adjustment;
步骤212p:根据显著差异阈值ΔI比较该两边界像素中的一调整后的边界像素的像素数据p0’与一紧邻的边界内部像素的像素数据p1来决定是否调整该边界内部像素的像素数据p1,若差值p1-p0’小于显著差异阈值ΔI,则进入提早终止状态291p以节省时间来处理后续的像素数据,否则进入步骤214p;Step 212p: Compare the pixel data p 0 ' of an adjusted boundary pixel among the two boundary pixels with the pixel data p 1 of an adjacent boundary internal pixel according to the significant difference threshold ΔI to determine whether to adjust the pixel data of the boundary internal pixel p 1 , if the difference p 1 -p 0 ' is less than the significant difference threshold ΔI, enter the early termination state 291p to save time for processing subsequent pixel data, otherwise enter step 214p;
步骤214p:计算该紧邻的边界内部像素的像素数据的预期调整值p1’=p1+0.5kΔ0,并且比较该边界内部像素的像素数据p1与其预期调整值p1’何者较接近该调整后的边界像素的像素数据p0’与一紧邻该边界内部像素的像素数据p2的平均值pm,以决定是否调整该边界内部像素的像素数据p1,若差值p1’-pm小于p1-pm,则进入步骤216p,否则像素数据p1将不被更新。如图7所示,平均值pm为像素数据p0’与像素数据p2的中点;Step 214p: Calculate the expected adjustment value p 1 ′=p 1 +0.5kΔ 0 of the pixel data of the pixel immediately inside the boundary, and compare the pixel data p 1 of the pixel inside the boundary with its expected adjustment value p 1 ’ whichever is closer to the The average value p m of the adjusted pixel data p 0 ' of the boundary pixel and the pixel data p 2 of a pixel immediately adjacent to the boundary is used to determine whether to adjust the pixel data p 1 of the pixel inside the boundary, if the difference p 1 '- If p m is less than p 1 -p m , go to step 216p, otherwise the pixel data p 1 will not be updated. As shown in Figure 7, the average value p m is the midpoint between pixel data p 0 ' and pixel data p 2 ;
步骤216p:将该边界内部像素的像素数据p1调整为其预期调整值p1’=p1+0.5kΔ0;Step 216p: Adjust the pixel data p 1 of the pixels inside the boundary to its expected adjustment value p 1 '=p 1 +0.5kΔ 0 ;
步骤212q:根据显著差异阈值ΔI比较该两边界像素中的一调整后的边界像素的像素数据q0’与一紧邻的边界内部像素的像素数据q1来决定是否调整该边界内部像素的像素数据q1,若差值q1-q0’小于显著差异阈值ΔI,则进入提早终止状态291q以节省时间来处理后续的像素数据,否则进入步骤214q;Step 212q: According to the significant difference threshold ΔI, compare the pixel data q 0 ' of an adjusted boundary pixel among the two boundary pixels with the pixel data q 1 of an adjacent boundary internal pixel to determine whether to adjust the pixel data of the boundary internal pixel q 1 , if the difference q 1 -q 0 ′ is less than the significant difference threshold ΔI, enter the early termination state 291q to save time for processing subsequent pixel data, otherwise enter step 214q;
步骤214q:计算该紧邻的边界内部像素的像素数据的预期调整值q1’=q1-0.5kΔ0,并且比较该边界内部像素的像素数据q1与其预期调整值q1’何者较接近该调整后的边界像素的像素数据q0’与一紧邻该边界内部像素的像素数据q2的平均值qm,以决定是否调整该边界内部像素的像素数据q1,若差值q1’-qm小于q1-qm,则进入步骤216q,否则像素数据q1将不被更新;以及Step 214q: Calculate the expected adjustment value q 1 ′=q 1 −0.5kΔ 0 of the pixel data of the pixel immediately inside the boundary, and compare the pixel data q 1 of the pixel inside the boundary with its expected adjustment value q 1 ’ whichever is closer to the The average value q m of the adjusted pixel data q 0 ' of the boundary pixel and the pixel data q 2 of a pixel immediately adjacent to the boundary is used to determine whether to adjust the pixel data q 1 of the pixel inside the boundary. If the difference q 1 '- q m is less than q 1 -q m , then enter step 216q, otherwise the pixel data q 1 will not be updated; and
步骤216q:将该边界内部像素的像素数据q1调整为其预期调整值q1’=q1-0.5kΔ0;Step 216q: adjust the pixel data q 1 of the pixels inside the boundary to its expected adjustment value q 1 '=q 1 -0.5kΔ 0 ;
上述的显著差异阈值ΔI依据韦伯定律(Weber’s Law)所定义。韦伯定律陈述:增量阈值(increment threshold)对背景强度的比值为定值。于本实施例中,该两区块P、Q的平均亮度可以分别定义为Ip、Iq。依据韦伯定律,在背景亮度为Ip时,人眼几乎不可分辨的临界显著差异ΔIp对环境的亮度Ip的比值恒为定值k。同样地,在背景亮度为Iq时,人眼几乎不可分辨的临界显著差值ΔIq与环境的亮度Iq的比值恒为定值k。如图3的参数定义所示,本发明的方法所使用的显著差异阈值ΔI为该两区块P、Q的临界显著差值ΔIp、ΔIq的平均值(ΔIp+ΔIq)/2。也就是说显著差异阈值ΔI=(ΔIp+ΔIq)/2=(kIp+kIq)/2。如前面所述,本发明的方法不但适用于亮度的像素数据pi、qi,亦适用于色彩的像素数据pi、qi。因此当本发明的方法所处理的像素数据pi、qi为色彩的像素数据pi、qi时,就将该两区块P、Q的像素数据平均值分别定义为Ip、Iq,再按照前述定义计算显著差异阈值ΔI=(ΔIp+ΔIq)/2=(kIp+kIq)/2。The above significant difference threshold ΔI is defined according to Weber's Law. Weber's law states that the ratio of the increment threshold to the background intensity is constant. In this embodiment, the average brightness of the two blocks P and Q can be defined as I p and I q respectively. According to Weber's law, when the background brightness is I p , the ratio of the critical significant difference ΔI p that is almost indistinguishable by human eyes to the brightness I p of the environment is constant at a constant value k. Similarly, when the background brightness is I q , the ratio of the critical significant difference ΔI q that is almost indistinguishable by the human eye to the ambient brightness I q is always a constant value k. As shown in the parameter definition in Figure 3, the significant difference threshold ΔI used in the method of the present invention is the average value (ΔI p +ΔI q )/2 of the critical significant difference ΔI p and ΔI q of the two blocks P and Q . That is to say, the significant difference threshold ΔI=(ΔI p +ΔI q )/2=(kI p +kI q )/2. As mentioned above, the method of the present invention is not only applicable to the pixel data p i , q i of brightness, but also applicable to the pixel data p i , q i of color. Therefore, when the pixel data p i and q i processed by the method of the present invention are color pixel data p i and q i , the average values of the pixel data of the two blocks P and Q are respectively defined as I p and I q , and then calculate the significant difference threshold ΔI=(ΔI p +ΔI q )/2=(kI p +kI q )/2 according to the aforementioned definition.
如步骤216p所述,该边界内部像素的像素数据p1的调整量0.5kΔ0为步骤210所述的边界像素的像素数据p0的调整量kΔ0的一半。又如步骤216q所述,该边界内部像素的像素数据q1的调整量-0.5kΔ0为步骤210所述的边界像素的像素数据q0的调整量-kΔ0的一半。尤须注意的是,虽然图3的参数定义显示:可辨不连续阈值T(ΔQ,ΔI)定义为该两区块P、Q的量化参数(Quantization Parameter)的差值ΔQ与显著差异阈值ΔI的线性组合(αΔQ+βΔI),并且于本实施例中可以采用最简单的参数α=β=1来实施,此并非限定本发明的范围。在本发明的另一实施例中,可辨不连续阈值T(ΔQ,ΔI)也可以由ΔQ与ΔI的更高次多式或是ΔQ与ΔI的其它种类的函数所构成,其中当该两区块P、Q的量化系数的差值ΔQ或临界显著差值ΔI增加时,可辨不连续阈值T(ΔQ,ΔI)亦对应地增加,并且当该两区块P、Q的量化系数的差值ΔQ或临界显著差值ΔI减少时,可辨不连续阈值T(ΔQ,ΔI)亦对应地减少。因此本发明的方法还包含有:当该两区块P、Q的量化系数的差值ΔQ或临界显著差值ΔI增加时,增加可辨不连续阈值T(ΔQ,ΔI);以及当该两区块P、Q的量化系数的差值ΔQ或临界显著差值ΔI减少时,减少可辨不连续阈值T(ΔQ,ΔI)。As described in step 216p, the adjustment amount 0.5kΔ0 of the pixel data p1 of the pixel inside the boundary is half of the adjustment amount kΔ0 of the pixel data p0 of the boundary pixel described in step 210. As described in step 216q, the adjustment amount −0.5kΔ0 of the pixel data q1 of the pixel inside the boundary is half of the adjustment amount −kΔ0 of the pixel data q0 of the boundary pixel described in step 210. In particular, it should be noted that although the parameter definition in Figure 3 shows that the distinguishable discontinuity threshold T(ΔQ, ΔI) is defined as the difference ΔQ and the significant difference threshold ΔI of the quantization parameters (Quantization Parameter) of the two blocks P and Q The linear combination of (αΔQ+βΔI), and in this embodiment can be implemented by using the simplest parameter α=β=1, which does not limit the scope of the present invention. In another embodiment of the present invention, the distinguishable discontinuity threshold T(ΔQ, ΔI) can also be formed by a higher-order polynomial of ΔQ and ΔI or other types of functions of ΔQ and ΔI, wherein when the two When the difference ΔQ or the critical significant difference ΔI of the quantization coefficients of blocks P and Q increases, the distinguishable discontinuity threshold T(ΔQ, ΔI) also increases correspondingly, and when the quantization coefficients of the two blocks P and Q When the difference ΔQ or the critically significant difference ΔI decreases, the discernible discontinuity threshold T(ΔQ, ΔI) also decreases correspondingly. Therefore, the method of the present invention also includes: when the difference ΔQ or the critical significant difference ΔI of the quantization coefficients of the two blocks P and Q increases, increasing the distinguishable discontinuity threshold T(ΔQ, ΔI); When the difference ΔQ or the critically significant difference ΔI of the quantization coefficients of blocks P and Q decreases, the discernible discontinuity threshold T(ΔQ, ΔI) is decreased.
请同时参考图2、图4、与图8,图8为图4的方法的边界强度(BS、BoundaryStrength)对照表,其中该边界强度对照表为业界所熟知,其定义如同JVT(H.264)标准所定义。如图2所示,当该目前待处理的帧为一间编码帧时,执行步骤201b。然而在执行步骤201b之初,首先根据图8所示的边界强度对照表检查该目前待处理的帧的边界强度BS是否为零,若边界强度BS为零,依照图4所示的细节执行步骤201b,否则该待处理的帧将不被更新。如图4所示,该图像处理方法的步骤201b的细节说明如下。Please refer to Figure 2, Figure 4, and Figure 8 at the same time. Figure 8 is the boundary strength (BS, BoundaryStrength) comparison table of the method in Figure 4. The boundary strength comparison table is well known in the industry, and its definition is similar to that of JVT (H.264 ) standard defined. As shown in FIG. 2 , when the current frame to be processed is an encoded frame,
步骤202:存储对应该两区块P、Q的像素数据pi、qi(i=0、1、2);Step 202: Store pixel data p i , q i (i=0, 1, 2) corresponding to the two blocks P, Q;
步骤206’:根据一阈值T比较该两区块P、Q的边界401两侧的两边界像素的像素数据p0、q0来决定是否调整该两边界像素的像素数据p0、q0,若该两边界像素的像素数据p0、q0所对应的差值p0-q0小于阈值T,则进入步骤208’,否则进入提早终止状态290以节省时间来处理后续的像素数据。其中本步骤的阈值T的定义如图4所示的参数定义;Step 206': compare the
步骤208’:根据一调整阈值Δ0/2比较该两边界像素中的一像素的像素数据p0或q0与一紧邻的边界内部像素的像素数据p1或q1来决定是否调整该两边界像素的像素数据p0、q0,若区块P的像素数据差值p1-p0小于调整阈值Δ0/2或区块Q的像素数据差值q1-q0小于调整阈值Δ0/2,则进入步骤210’,否则进入提早终止状态290以节省时间来处理后续的像素数据。其中参数Δ0的定义如图4所示,因此本步骤的调整阈值Δ0/2的定义亦对应地变更;Step 208': Compare the pixel data p0 or q0 of a pixel of the two boundary pixels with the pixel data p1 or q1 of an adjacent internal pixel according to an adjustment threshold Δ0 /2 to determine whether to adjust the two For the pixel data p 0 and q 0 of the boundary pixels, if the pixel data difference p 1 -p 0 of the block P is less than the adjustment threshold Δ 0 /2 or the pixel data difference q 1 -q 0 of the block Q is less than the adjustment threshold Δ 0/2 , then enter step 210', otherwise enter early termination state 290 to save time to process subsequent pixel data. Wherein the definition of parameter Δ 0 is as shown in Figure 4, so the definition of the adjustment threshold Δ 0/2 of this step also changes correspondingly;
步骤210’:调整该两边界像素的像素数据p0、q0以减少该两边界像素的像素数据p0、q0所对应的差值p0-q0,其中差值p0-q0为亮度差异或色彩差异。本步骤调整结果如下:Step 210': Adjust the pixel data p 0 and q 0 of the two boundary pixels to reduce the difference p 0 -q 0 corresponding to the pixel data p 0 and q 0 of the two boundary pixels, wherein the difference p 0 -q 0 For brightness difference or color difference. The adjustment results of this step are as follows:
p0’=p0+kΔ0 p 0 '=p 0 +kΔ 0
q0’=q0-kΔ0 q 0 '=q 0 -kΔ 0
其中参数Δ0的定义如图4所示,因此本步骤的调整结果亦对应地变更。The definition of the parameter Δ0 is shown in FIG. 4, so the adjustment result of this step is changed accordingly.
于本实施例中,当该两区块P、Q的量化系数的平均值小于十六时,则不予处理该两区块P、Q的边界401的区块效应,以节省时效来处理该图像画面的其它边界的区块效应。In this embodiment, when the average value of the quantization coefficients of the two blocks P and Q is less than 16, the block effect of the boundary 401 of the two blocks P and Q will not be processed to save time. Blocking effects on other borders of the image frame.
请同时参阅图9、图10、与图11,图9为本发明的感觉回路滤波器600的示意图,图10与图11分别为一应用图9的感觉回路滤波器600的图像处理系统的示意图。本发明于提供上述方法的同时,亦对应地提供一种图像处理系统的回路滤波器600,用来处理一图像画面中两区块P、Q之间的区块效应。其中该图像处理系统为一视频信号编码器700或一视频信号解码器800。如前述方法的说明,由于本发明运用了与人眼能否分辨有关的显著差异阈值ΔI与可辨不连续阈值T(ΔQ,ΔI),因此回路滤波器600亦可称为感觉回路滤波器(PLF、Perceptual Loop Filter)600。回路滤波器600包含有:一存储单元610,用来存储对应该两区块P、Q的像素数据pi、qi;以及一比较单元620,电连接至存储单元610,用来依据一显著差异阈值ΔI比较该两区块P、Q的边界401两侧的两边界像素的像素数据p0、q0,来决定是否调整该两边界像素的像素数据p0、q0。若该两边界像素的像素数据p0、q0所对应的差值p0-q0小于显著差异阈值ΔI,则比较单元620如步骤204所述,决定进入提早终止状态290以节省时间来处理后续的像素数据,否则如步骤206所述,比较单元620根据一可辨不连续阈值T(ΔQ,ΔI)比较该两区块P、Q的边界401两侧的两边界像素的像素数据p0、q0来决定是否调整该两边界像素的像素数据p0、q0。若该两边界像素的像素数据p0、q0所对应的差值p0-q0小于可辨不连续阈值T(ΔQ,ΔI),则比较单元620决定如步骤208再行进一步比较,否则比较单元620决定进入提早终止状态290以节省时间来处理后续的像素数据。如前面所述,像素数据p0、q0可以是亮度的像素数据p0、q0,也可以是色彩的像素数据p0、q0。因此上述的差值p0-q0可以是亮度差异或色彩差异。Please refer to FIG. 9, FIG. 10, and FIG. 11 at the same time. FIG. 9 is a schematic diagram of the
回路滤波器600还包含有:一运算单元(arithmetic unit)630,电连接至比较单元620与存储单元610,用来调整该两边界像素的像素数据pi、qi。如步骤208所述,比较单元620还根据一调整阈值Δ0/2比较该两边界像素中的一像素的像素数据p0或q0与一紧邻的边界内部像素的像素数据p1或q1来决定是否调整该两边界像素的像素数据p0、q0。若区块P的像素数据差值p1-p0小于调整阈值Δ0/2或区块Q的像素数据差值q1-q0小于调整阈值Δ0/2,则比较单元620决定如步骤210所述,以运算单元630调整该两边界像素的像素数据p0、q0以减少该两边界像素的像素数据p0、q0所对应的差值p0-q0。比较单元620另可执行步骤212zp、214p,以决定是否如步骤216p所述,将该边界内部像素的像素数据p1以运算单元630调整为其预期调整值p1’=p1+0.5kΔ0。如前面所述,该边界内部像素的像素数据p1的调整量0.5kΔ0为步骤210所述的边界像素的像素数据p0的调整量kΔ0的一半。同样地,比较单元620亦可执行步骤212q、214q,以决定是否如步骤216q所述,将该边界内部像素的像素数据q1以运算单元630调整为其预期调整值q1’=q1-0.5kΔ0。亦如前面所述,该边界内部像素的像素数据q1的调整量-0.5kΔ0为步骤210所述的边界像素的像素数据q0的调整量-kΔ0的一半。The
于本实施例中,当该两区块P、Q的量化系数的差值ΔQ或显著差异阈值ΔI增加时,比较单元620增加可辨不连续阈值T(ΔQ,ΔI);当该两区块P、Q的量化系数的差值ΔQ或显著差异阈值ΔI减少时,比较单元620减少可辨不连续阈值T(ΔQ,ΔI)。In this embodiment, when the difference ΔQ or the significant difference threshold ΔI between the quantization coefficients of the two blocks P and Q increases, the
如前述方法的说明,本实施例中的各元件于执行206’、208’、210’时的差值仅在于阈值T与参数Δ0的选用,不再重复赘述。As described above, the difference between the elements in this embodiment when executing 206', 208', and 210' is only in the selection of the threshold T and the parameter Δ0 , which will not be repeated here.
在一般图像处理的量化运算过程中,各个区块所选用的量化系数越大,图像质量越差;所述量化系数越小,图像质量越佳。图像质量较佳所对应的量化系数范围约为二十二以下。本发明的方法与装置在量化系数约为二十二以下的状况下,处理后的图像质量皆能媲美符合H.264视频信号编码标准的回路滤波器所处理后的图像质量。In the quantization operation process of general image processing, the larger the quantization coefficient selected for each block, the worse the image quality; the smaller the quantization coefficient, the better the image quality. The range of quantization coefficients corresponding to better image quality is about 22 or less. The method and device of the present invention can achieve the same quality of the processed image as that processed by the loop filter conforming to the H.264 video signal coding standard under the condition that the quantization coefficient is less than 22.
本发明的好处之一是,本发明以回路滤波来处理图像画面的区块效应,与后级滤波相比较,回路滤波具有较佳的处理效能。One of the advantages of the present invention is that the present invention uses in-loop filtering to process the block effect of the image frame. Compared with the post-stage filtering, the in-loop filtering has better processing performance.
本发明的另一好处是,本发明以感觉阈值的方式决定是否调整该两边界像素的像素数据,因此对于人眼不易辨识的区块效应可以快速决定不予处理,以增进该图像画面的处理效能。Another advantage of the present invention is that the present invention decides whether to adjust the pixel data of the two boundary pixels in the form of sensory threshold, so it can quickly decide not to process the block effect that is difficult for human eyes to improve the processing of the image frame efficacy.
本发明的又一好处是,本发明的方法与相关装置的运算简易,并且以水平、垂直两方向排列的区块所组成的图像画面而言,每一区块边界的一侧且与该区块边界垂直方向上最多只有两像素的像素数据需要被调整,因此其处理效能优于常规H.264标准的处理效能。Another benefit of the present invention is that the calculation of the method and related devices of the present invention is simple and simple, and in terms of the image frame formed by the blocks arranged in the horizontal and vertical directions, one side of the border of each block is connected to the area. Only two pixels of pixel data in the vertical direction of the block boundary need to be adjusted, so the processing performance is better than that of the conventional H.264 standard.
以上所述仅为本发明的较佳实施例,凡依本发明权利要求所进行的等效变化与修改,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200410028297 CN1668106A (en) | 2004-03-09 | 2004-03-09 | Method and device for removing block effect of image frame by loop filtering |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200410028297 CN1668106A (en) | 2004-03-09 | 2004-03-09 | Method and device for removing block effect of image frame by loop filtering |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN1668106A true CN1668106A (en) | 2005-09-14 |
Family
ID=35038949
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200410028297 Pending CN1668106A (en) | 2004-03-09 | 2004-03-09 | Method and device for removing block effect of image frame by loop filtering |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1668106A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2007033551A1 (en) * | 2005-09-19 | 2007-03-29 | Huawei Technologies Co., Ltd. | A loop filtering method for use in image encoding process |
| US8131105B2 (en) | 2006-11-28 | 2012-03-06 | Realtek Semiconductor Corp. | Image processing method and device for performing block effect reduction |
| CN101527842B (en) * | 2008-03-07 | 2012-12-12 | 瑞昱半导体股份有限公司 | Image processing method and device for filtering block effect |
| CN103530895A (en) * | 2012-07-06 | 2014-01-22 | 北京大学 | Method and device for detecting mosaic |
-
2004
- 2004-03-09 CN CN 200410028297 patent/CN1668106A/en active Pending
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2007033551A1 (en) * | 2005-09-19 | 2007-03-29 | Huawei Technologies Co., Ltd. | A loop filtering method for use in image encoding process |
| CN100438629C (en) * | 2005-09-19 | 2008-11-26 | 华为技术有限公司 | Loop Filtering Method in Image Coding Processing |
| US8131105B2 (en) | 2006-11-28 | 2012-03-06 | Realtek Semiconductor Corp. | Image processing method and device for performing block effect reduction |
| CN101527842B (en) * | 2008-03-07 | 2012-12-12 | 瑞昱半导体股份有限公司 | Image processing method and device for filtering block effect |
| CN103530895A (en) * | 2012-07-06 | 2014-01-22 | 北京大学 | Method and device for detecting mosaic |
| CN103530895B (en) * | 2012-07-06 | 2016-07-13 | 北京大学 | A method and device for detecting mosaics |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7672452B2 (en) | Encoding device, decoding device, program, and method | |
| CN101040532B (en) | deblocking filter | |
| CN105706449B (en) | Sample adaptive offset control | |
| CN1659784A (en) | Chroma deblocking filter | |
| JP2008503918A (en) | Method and apparatus for video codec quantization | |
| CN1555652A (en) | Adaptive filtering based on boundary strength | |
| CN1921628A (en) | Motion vector detection apparatus and motion vector detection method | |
| JP7749153B2 (en) | Encoding device, decoding device, and program | |
| CN1547853A (en) | Filtering method and device for eliminating blockiness and/or ringing noise | |
| CN101039434A (en) | Video coding apparatus | |
| CN1668106A (en) | Method and device for removing block effect of image frame by loop filtering | |
| US20050196066A1 (en) | Method and apparatus for removing blocking artifacts of video picture via loop filtering using perceptual thresholds | |
| CN1992899A (en) | Information processing apparatus | |
| WO2022217417A1 (en) | Encoding method, decoding method, encoder, decoder and storage medium | |
| CN1191717C (en) | Method and device for reducing blocking artifact in the DCT domain | |
| CN101080007A (en) | Method for reducing video decoding complexity via decoding quality | |
| JP5298487B2 (en) | Image encoding device, image decoding device, and image encoding method | |
| KR100917207B1 (en) | How to filter block boundary area | |
| CN101060632A (en) | Method and related device for decoding video signal | |
| US20070286521A1 (en) | Deblocking method and multimedia processing device | |
| CN1584934A (en) | Buffer Management Method in Dynamic Image Coding | |
| HK1070223B (en) | Adaptive filtering based upon boundary strength |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |