Professional Documents
Culture Documents
Robust Measurement of The Blocking Artefact
Robust Measurement of The Blocking Artefact
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/221226029
Conference Paper in Proceedings of SPIE - The International Society for Optical Engineering · February 2009
DOI: 10.1117/12.805726 · Source: DBLP
CITATIONS READS
2 35
2 authors, including:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Giovanni (Gianni) Ramponi on 15 July 2014.
ABSTRACT
A method is presented to measure the intensity of the blocking artefact in compressed pictures or video frames.
First, a way is devised to artificially introduce pure blocking, which closely resembles the real one subsequent
to JPEG compression. Then a modified no-reference measurement is proposed that requires less computations
than other formerly presented methods, permits to take into account the whole image or frame area, and is
not affected by interlaced video. Some first experiments indicate that the measured values relate closely to the
introduced blockiness effect. The robustness of the metric to the influence of other typical JPEG artefacts is
also checked. Further, the effect on blockiness of some enhancement strategies is measured. Pictures enhanced
with methods introducing the most severe blockiness are found to have the highest value of the proposed metric.
Finally the problem of blockiness measurement in video sequences is addressed. In this case the blocking grid is
no longer regular. In fact, blocks of different size could be used in encoding, and single blocks could be shifted
in referenced (P and B) frames due to motion compensation. A method is devised for grid detection.
Keywords: Blockiness, Still and video pictures, Artefact generation, Grid detection
1. INTRODUCTION
Blockiness in coded images and video is quite an annoying artefact, for at least two main reasons: it is very
visible even if it has moderate objective strength, especially in uniform areas of the picture; and, notwithstanding
the large amount of techniques which have been proposed, its cancellation is not yet a solved problem, due to
the negative effects on image sharpness which often result.
We focus our attention here on techniques which can be used to detect and quantify the presence of blockiness
artefacts, with metrics that take into account the response of the human visual system (HVS) in order to yield
significant results. We deal with still images at this stage; further developments will be devoted to single frames
of video sequences; temporal effects will be considered in a future work.
Some blockiness artefact detection algorithms that may be found in the literature are able to integrate an
overall video quality metric with a blocking dominant region segmentation, e.g.1 Most, however, are used with
the purpose of either specifically find the location of annoying blocking artefacts in an image or generically
determine the amount of blockiness disturbance present in the data. In the former case many of the most
recent operators act directly in the compressed, transform domain;2–4 some, which may be a part of a sharpness
enhancement method,5 are located after image decoding and work in the data domain. We are interested here
in algorithms whose output is an overall figure of merit for the image, as far as blockiness is concerned. For
example, methods of this kind are those in,6 in the frequency domain, or,7 in the data domain. For our purposes,
we specifically refer to the method suggested in,8 modified and improved in.9 We first deal with methods to
generate blocking on an image, in order to make some test images available for the evaluation of the performance
of different blockiness measurement algorithms, and we suggest a simple approach. Then, we propose a metric for
the detection and measurement of the blockiness artefact, which includes sub-operators that make its response
closer to the one of the HVS and, at the same time, more robust to other disturbances. Further, the metric is
used as a tool to be inserted in an image visualization chain in order to understand if a typical operator that
is applied to the image, i.e. detail sharpening, is compatible with the amount of image blockiness. Practical
examples demonstrate the effectiveness of the novel contributions that are provided.
In the second part of our work we deal with blockiness detection and evaluation in video sequences. In this case
Further author information:
G.R.: E-mail: ramponi@units.it,
L.A.: E-mail: leonardo.abate@deei.units.it
Image Processing: Algorithms and Systems VII, edited by Jaakko T. Astola, Karen O. Egiazarian
Nasser M. Nasrabadi, Syed A. Rizvi, Proc. of SPIE-IS&T Electronic Imaging, SPIE Vol. 7245, 72450K
© 2009 SPIE-IS&T · CCC code: 0277-786X/09/$18 · doi: 10.1117/12.805726
- generate pure artefacts, i.e. in our case they should yield only blockiness and not high-frequency errors or
blurriness or other distortions which may affect the measurement;
- be realistic, i.e. the generated artefacts should visually correspond to actual defects which can be seen in
real-world image representation;
- be computationally simple, in order to permit a real-time operation in their prospective usage in video
blockiness evaluation.
If limiting the computational load is mandative, a simple approach is to generate a set of blocks having random
luminance and to superimpose them on the image. The luminance of the various blocks can have a uniform
distribution in a range that increases with the strength of the desired artefact. Superposition may be additive,
with zero-mean blocks, or multiplicative, with blocks having an average value of one. In the latter case, of course,
the artefacts are stronger in bright portions of the scene; since it is known that the HVS has reduced sensitivity
to luminance changes where the average luminance is higher (Weber’s or Michelson’s formulas), this may affect
the measurement.
If realistic blockiness is mandative instead, one can resort to JPEG compression with a varying quality
factor. In the real world, indeed, JPEG compression is the main source of blockiness artefacts. It can be
objected however that in this way also other defects will be generated, negating the purity criterion. Purity of
the artefact is achieved with the method proposed in;13 it is an improved version of the approach described in
ITU-T Recommendation P.930.14 In this method, the average of each block in the picture is calculated, together
with the average of its adjacent blocks, and the difference of the two is calculated; this difference is scaled and
added to the original center block. Some corrections permit to avoid saturations and excessive blockiness.
A compromise among the mentioned criteria is proposed here. The blocking effect is achieved as follows: the
test image is divided into blocks, which are transformed with a 2-D DCT; the resulting coefficients are quantized
Figure 1. Boat picture after JPEG compression (left) and after synthetic blockiness introduction (right)
Figure 1 shows a detail of the Boat image, after synthetic blocking artefact introduction (left) and after
JPEG compression (right), using the same quality factor Q=8 (a small value has been chosen in order to make
the result better visible). It is clearly seen that the image on the right has the same blocking appearance as the
one on the left, while the high-frequency artefacts that are typical of JPEG compression and that could affect
the subsequent blockiness measurement are not present. Noise is also visible in the left image, which is present
in the original data and is attenuated in the JPEG version.
0.1 10 100
log Background Luminance (cd/mA2)
Spatial Frequency (cycles/degree)
- it avoids the need of introducing tweakings in order to cope with both interlaced and progressive data;
The proposed method has proven to be able to sense the presence and the intensity of different types of
synthetic blocks and, more importantly, to quantify the blockiness introduced by the JPEG compression, giving
output values which monotonously increase for decreasing values of the quality factor used in the JPEG algorithm.
By measuring the artefact intensity of a JPEG compressed image and of an image with synthetic blocking
added using the above described modified-quantization-table method, we can also verify the robustness of the
proposed technique to other artefacts: the output of the measurement system should be the same on the two
images, for different values of the quality factor. Some first experiments, whose results are shown in the following,
indicate that this is a difficult issue. It can be seen however that the robustness can be increased by a suitable
data preprocessing, which has also the effect of making the metric closer to human perception. Two techniques
are proposed:
- a log mapping can be applied to the image, which complies with Weber’s law16 and makes dark areas more
important than bright ones;
- smooth areas operation: strongly textured and detailed portions of the image, where blockiness is percep-
tually less important, can be excluded from the measurements. For the latter purpose, we just operate
along a rasterized column vector of image data; it is first lowpass filtered, and the absolute values of the
difference between the original and the filtered data is evaluated. If this difference is larger than a threshold
(which is a fraction of the s.d. of the data), the sample is discarded.
250
200
blj
blj
blq
blq 200 -
150
150-
100 100-
50-
E
50
0-
-50
20 40 60 80 100 20 40 60 80 100
JPEG qualityfactor JPEG qualiti factor
Figure 3. Measured blockiness of Lena (left) and boat (right). blj: real JPEG compression blq: synthetic blocking
If the smooth areas operation option is activated, one obtains the two plots below. Since the ’blj’ and ’blq’
plots are closer one to each other, we can say that this metric is more robust to artefacts other than the blocking
effect. The price to pay is a reduced uniformity in the measurements, which are no longer monotonous with
respect to the quality factor.
160
C0
160
a)
140
140
120 120
100
100 63
0
E
80
20 40 60 80 100 20 40 60 80 100
JPEG qualityfactor JPEG qualityfactor
Figure 4. Measured blockiness, smooth area option activated. Lena (left) and boat (right). blj: real JPEG compression;
blq: synthetic blocking
1200
blj
1000 -- - - blo enh
blo urn
800
a,
600
AD
13
400
200
200
0 20 40 60 80 100
JPEG qualityfactor
Figure 5. Measured blockiness after enhancement. blj: real JPEG compression; blo enh: coring applied; blo um: unsharp
masking applied
d(j) ≡ I(i, j + 1) − I(i, j) for any row of index i.
Among this set of candidates, we take as indices of block borders those satisfying some further conditions:
1. To be detected, a block discontinuity has to be large enough. The first condition is therefore:
2. Blocks are most visible in generally uniform areas. The difference between pixel pairs adjacent to a block
border is usually small. This can be expected at least on one side of the discontinuity. We set therefore:
2
C2 : min d(id + s · j) < T h2maxsteep (3)
{s=−1,1}
j=1
id ∈ Ic , meaning that at least one of the sums of the two preceding and the two subsequent differences
must be below a threshold.
3. In a line section containing a smooth edge, or another gradual intensity variation, a block border could be
detected if its discontinuity overwhelms those of the natural variation, i.e. if the following statement is true:
d(id )
C3 : > T h3minratio (4)
min{j=−1,1} d(id + j)
4. For a pixel on a block border, the difference with its neighbour across the border is much larger than
that with its neighbour along the block boundary, i.e., if we define d (i, j) = I(i, j + 1) − I(i, j) and
h
dv (i, j) = I(i + 1, j) − I(i, j), then, in order for a candidate jd ∈ Ic to be chosen as a block discontinuity
location, the following condition must hold:
dv (i, jd )
C4 : < T h4maxangle (5)
dh (i, jd )
We decide that a candidate (local maximum) is a block border if the following combination of the former
conditions
is true:
C1 ∧ (C2 ∨ C3 ) ∧ C4
meaning that a local maximum in the discontinuity is deemed to be a block border if it is large enough and
lying inside a smooth area, or if it is inside an area of varying intensity, but it is much larger than this natural
variation. Further, an essential condition is that the cross-block variation is much larger than the variation along
the block border.
This method detects block discontinuities in each line (row or column) independently, without exploiting the
correlation among lines crossed by a block boundary. In fact, even if one condition, for example smoothness or
minimum discontinuity, does not hold for a local maximum in one line, a blocking artefact could however be
visible in that position, because the condition holds for all neighbouring lines, and the eye fills the gap. This
circumstance is exploited in the extended method proposed in the following.
• One line is taken at a time, to detect its block discontinuities. The local maxima of its differences are found
like in the previous example.
• In the found locations not only the current line but also its closest neighbours (for example, (N-1)/2 lines
above and (N − 1)/2 lines below) are examined.
This way, if a line falls short to satisfy a condition, this can be compensated for by its neighbours.
3.3 Results
Figure 7. Detail of a frame affected by blockiness (above) and detected block discontinuities (below)
The detected bocking artefact positions are shown in Figure 7, superimposed on the frame. It can be seen
that, with the exception of too complex or too light block borders, the image blocks are effectively detected.
Once the block boundaries are individuated, any of the methods proposed so far to quantify the blockiness
intensity can be used.
4. CONCLUSION
The problem of measuring the intensity of the blocking artefact was addressed in this paper. In the first part the
artefact was measured in still pictures. First a way was found to generate a synthetic and pure artefact, then a
new efficient detection strategy was introduced and measurements were performed on naturally and artificially
affected pictures. The two main requirements for the method, i.e. robustness to other artefacts and ability to
follow the compression factor monotonically, were found slightly difficult to pursue at the same time, but were
effectively achieved individually. Besides, the measurement properly detects the effects of image enhancement
on blockiness. In the second part, the problem of block detection in video frames was addressed. This problem
is typical of video, where motion compensation intervenes, so that the position of the blocks is unknown. The
proposed method quite effectively estimates this position, and enables a more efficient application of existing
measurements methods which assume it to be known.
5. ACKNOWLEDGEMENTS
The second author gratefully acknowledges the financial and technical support of Philips Consumer Electronic,
Eindhoven.
REFERENCES
[1] Yu, Z., Wu, H., Winkler, S., and Chen, T., “Vision-model-based impairment metric to evaluate blocking
artifacts in digital video,” in [Proceedings of the IEEE ], 90, 154–169 (2002).
[2] Triantafyllidis, G., Tzovaras, D., and Strintzis, M., “Blocking artifact detection and reduction in compressed
data,” IEEE Trans. on Circuits and Systems for Video Techn. 12, 877–890 (2002).