This application claims the benefit, under 35 U.S.C. §365 of International Application PCT/CN2010/000189, filed Feb. 11, 2010, which was published in accordance with PCT Article 21(2) on Aug. 18, 2011 in English
The invention relates to image processing. More precisely, the invention concerns a method for processing an image divided into blocks.
Blockiness is one of the main artifacts in images encoded by block based codecs. Accurately determining the blockiness level of an image or of image blocks is necessary to evaluate the image quality and consequently helps the processing of the image. As an example, when filtering an image, a stronger filter is applied on blocks with high blockiness levels while lower or no filter is applied on the other blocks, i.e. those with low blockiness levels.
Blockiness can be defined as the discontinuity at the boundaries of adjacent blocks in an image. Therefore, many known methods for determining a blockiness level operate at macroblocks' boundaries. These methods do not appropriately manage blockiness propagation. Indeed, due to motion compensation, blockiness artifacts are propagated from reference images into predicted images. Consequently, blockiness artifacts in the predicted images are not necessarily aligned with macroblock boundaries. In this case, known methods fail to determine an accurate blockiness level. In addition, such known methods do not accurately determine blockiness level when a deblocking filter is applied. Such a deblocking filter is for example used when encoding a video according to H.264 video coding standard. When a deblocking filter is applied, the discontinuity at the macroblock boundaries is decreased. In this case, known methods fail to determine accurate blockiness levels solely based on the difference at the boundaries. Finally, such known methods fail to accurately determine the blockiness level of images with large plain or complicated texture.
The object of the invention is to overcome at least one of these drawbacks of the prior art.
To this aim the invention relates to a method for processing an image divided into blocks of pixels comprising the steps of:
The method of processing is not influenced by blockiness propagation. Therefore, its efficiency is increased. Advantageously, the method further comprises determining an image blockiness level for the image by averaging the block blockiness levels and wherein the image is processed on the basis of the image blockiness level.
According to a particular characteristic, the processing step comprises one of the steps belonging to the set comprising:
According to an aspect of the invention, the identification step comprises, when a deblocking filter is applied on the image, identifying the detected largest sub-block as natural texture when the detected largest sub-block reaches at least two opposite block borders.
According to another aspect of the invention, the identification step comprises, when no deblocking filter is applied on the image or when no information is provided on if deblocking filter is applied or not, identifying the detected largest sub-block as natural texture when the detected largest sub-block exceeds at least two opposite block borders.
Therefore, the method of processing is not badly influenced by the use of a deblocking filter.
As an example, the block blockiness level BBL for a block is calculated as follows:
where T1 and T2 are threshold values and N is the number of pixels within the detected largest sub-block.
As a variant, the block blockiness level BBL for a block is calculated as follows:
where T1 and T2 are threshold values and N is the number of pixels within the detected largest sub-block.
Other features and advantages of the invention will appear with the following description of some of its embodiments, this description being made in connection with the drawings in which:
With reference to
At step 10, the largest sub-block whose pixels have an equal luminance value is detected within the current block. As an example illustrated on
detecting the longest line of pixels with equal luminance value in every horizontal row of the current block and recording the start and end position of the longest line and the corresponding equal luminance value;
comparing, for each recorded equal luminance value, the recorded equal luminance values of the neighboring rows and merging into one sub-block the adjacent detected longest lines with the same recorded equal luminance values.
The rightmost start position (RSP) and the leftmost end position (LEP) of the horizontal rows are recorded as the new start and end positions of the merged sub-block, separately. The largest sub-block in the current block is the merged sub-block with the maximum number of pixels. On
According to a variant, vertical rows and longest columns are considered instead of horizontal rows and longest lines.
At step 12, the detected largest sub-block is identified as a natural texture or a non natural texture. When a deblocking filter is applied (such as for images encoded according to H.264 using default deblocking filter or for images encoded according to MPEG2 with a de-blocking filter applied as post-processing), the detected largest sub-block is identified as a natural texture when the detected largest sub-block reaches at least two opposite block borders of the current block (e.g. top and bottom borders and/or left and right borders) and as a non natural texture otherwise.
When no deblocking filter is applied (such as for images encoded according to MPEG2 or for images encoded according to H.264 with deblocking filter disabled, or for the images for which no information is provided on if deblocking filter is applied or not, i.e. when we do not know if a deblocking filter is or is not used) the detected largest sub-block is identified as a natural texture when the detected largest sub-block exceeds at least two opposite block borders of the current block (e.g. top and bottom borders and/or left and right borders) and as a non natural texture otherwise. Here ‘exceeds’ means that the largest sub-block not only reaches the borders of the current block, but also has the same luminance value with at least one line of pixels of the neighboring blocks next to the borders.
At step 14, a block blockiness level BBL is determined for the current block on the basis of the number of pixels within the detected largest sub-block and on the basis of the results of the identification step 12. The block blockiness level BBL for the current block is calculated for example as follows:
where T1 and T2 are threshold values and N is the number of pixels within the detected largest sub-block. The default value of (T1, T2) is (30, 80). For the images with very complicated texture, T1 and T2 can be adjusted a little lower, but not lower than (20, 70). For the images with large plain texture, they can be adjusted a little higher, but not higher than (50, 100). The case N<T1 refers to the case where the size of the detected largest sub-block is small. In this case the block blockiness level is set to zero.
Another example to calculate block blockiness level BBL is as below:
where T1 and T2 are threshold values and N is the number of pixels within the detected largest sub-block. The thresholds (T1, T2) can be set in the same way as in the above example. According to other embodiments, it can set more thresholds to divide the block blockiness level into finer granularity.
If all blocks of the image have been considered then the method continues to step 16, otherwise the next block in the image is considered as the new current block and the method goes back to step 10.
At step 16, the image is processed on the basis of the block blockiness levels BBL. According to an advantageous embodiment, the image is filtered on a block basis, the blocks having a high blockiness level being filtered more strongly than the block having a low blockiness level. According to a variant, the image is encoded with encoding parameters adapted on the basis of the blockiness level. As an example, the quantization parameter is adapted on a block level. To get a stable quality, the blocks having a high blockiness level are encoded with a lower quantization parameter than the blocks having a low blockiness level. According to another embodiment the image is distributed by over a channel. Knowing the image quality in the user end thanks to the BBL, the video distributor adjusts the image coding parameters (e.g. quantization parameter, deblocking filter parameters) and possibly the channel bandwidth on the basis of these BBL. In addition, the distributors can charge differently the end user according to the received video quality level evaluated by the block blockiness levels or by a video blockiness level. Advantageously, the video blockiness level is determined on the basis of the block blockiness levels determined for the blocks of all the images of the video. As an example, the video blockiness level is determined as the average of these block blockiness levels BBL. According to a variant, the video blockiness level VBLis determined as a function of these block blockiness levels BBL considering spatial and temporal masking.
According to another embodiment illustrated on
Each of these elements of
Algorithms of the processing method according to the invention are stored in the ROM 22. When switched on, the CPU 21 uploads the program 220 in the RAM and executes the corresponding instructions. RAM 23 comprises:
According to a variant of the invention, the digital part of the processing device 2 is implemented in pure hardware configuration (e.g. in one or several FPGA, ASIC or VLSI with corresponding memory) or in a configuration using both VLSI and DSP.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN2010/000189 | 2/11/2010 | WO | 00 | 8/9/2012 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2011/097752 | 8/18/2011 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
6417861 | Deering et al. | Jul 2002 | B1 |
20090010554 | Eskelinen | Jan 2009 | A1 |
20090220152 | Tiwari et al. | Sep 2009 | A1 |
20100033633 | Dane et al. | Feb 2010 | A1 |
Number | Date | Country |
---|---|---|
1285214 | Nov 2006 | CN |
1867075 | Nov 2006 | CN |
101472177 | Jul 2009 | CN |
WO2006082276 | Aug 2006 | WO |
WO2009136437 | Nov 2009 | WO |
Entry |
---|
Search Rept:Nov. 25, 2010. |
Number | Date | Country | |
---|---|---|---|
20120314952 A1 | Dec 2012 | US |