a predictive algorithm for multimedia data … paper a predictive algorithm for multimedia data...
TRANSCRIPT
REGULAR PAPER
A predictive algorithm for multimedia data compression
Reza Moradi Rad • Abdolrahman Attar •
Asadollah Shahbahrami
Published online: 24 July 2012
� Springer-Verlag 2012
Abstract In lossless image compression, many prediction
methods are proposed so far to achieve better compression
performance/complexity trade off. In this paper, we con-
centrate on some well-known and widely used low-com-
plexity algorithms exploited in many modern compression
systems, including MED, GAP, Graham, Ljpeg, DARC,
and GBSW. This paper proposes a new gradient-based
tracking and adapting technique that outperforms some
existing methods. This paper aims to design an efficient
highly adaptive predictor that can be incorporated in
modeling step of image compression systems. This claim is
proved by testing the proposed method upon a wide variety
of images with different characteristics. Six special sets of
images including face, sport, texture, sea, text, and medical
constitute our dataset.
Keywords Image compression � Predictive coding �Multimedia � Lossless compression
1 Introduction
Nowadays, libraries, museums, and films are converting
more and more data into digital form especially into image
format. This needs large digital devices to store and a large
bandwidth to transmit through the networks. In order to
alleviate these requirements, compression techniques are
used. Image compression emerges to answer this essential
question: can we represent multimedia data with fewer
amounts of bits than the original data? Multimedia data
compression can be defined as ‘‘reducing the amount of
data required to represent the multimedia data’’. Many
compression techniques have been proposed in the litera-
ture, which can be classified into two groups: lossless and
lossy [24, 26]. In lossless compression, the quality of the
decoded multimedia data is the same as the original data.
The compression ratio of this category is generally limited.
In lossy compression, unnecessary data are deleted from
the original data. Therefore, the quality of the decoded
multimedia data is almost the same as the original data and
the compression ratio of this group is higher than the
previous one [29, 30, 31].
Predictive data coding is the most well-known technique
in lossless data compression for its efficiency, simplicity,
and robustness [1–3]. Prediction is a process to estimate the
unknown (future) values using the available and known
(past and present) values. In predictive coding, the essential
function is to extract the relationship and similarity of
neighboring values; for example, similarity of neighboring
pixels in an image; and reduce numbers of values that
should be known to represent a data. Most predictive data
compression techniques include two major steps [14]:
Modeling (prediction): In the first step, essential func-
tion is prediction of unknown values. An efficient mecha-
nism and predictor function are extracted to produce the
predicted data.
Coding: In the second step, essential function represents
errors (produced by subtracting original and predicted data)
in minimal form.
Researchers usually use Hoffman, Arithmetic, and some
other entropy coding schemas for the second step. While
R. M. Rad � A. Attar � A. Shahbahrami (&)
Department of Computer Engineering, Faculty of Engineering,
University of Guilan, P.O. Box: 3756-41635, Rasht, Iran
e-mail: [email protected]
R. M. Rad
e-mail: [email protected]
A. Attar
e-mail: [email protected]
123
Multimedia Systems (2013) 19:103–115
DOI 10.1007/s00530-012-0282-0
the story of first step differs, a lot of prediction schema and
functions have been proposed for this step. This work
concentrates on the first step, prediction or modeling, for
image data.
This paper is an extended and updated version of our
published conference paper [28] with more experimental
results and explanation than it. This paper is organized as
follows. Section 2 presents some background information,
predictive image compression and scan ordering. In Sect. 3
some related work are discussed. The proposed predictive
data compression is presented in Sect. 4. The benchmarks
and tested images are explained in Sect. 5. Experimental
results are presented in Sect. 6 followed by conclusions in
Sect. 7.
2 Background
In this section, some background information is presented.
2.1 Predictive image compression
In the prediction step we need a model to estimate the
unknown values to reduce the error as much as possible. A
simple schema of the prediction image compression is
depicted in Fig. 1.
Figure 2 shows different neighboring pixels in different
directions for unknown pixel of X. The symbols of W, NW,
N, and NE denote to West, North-West, North, and North-
East, respectively. Linear and non-linear are two types of
predictors that are used by various prediction methods.
Linear prediction is the simplest type of prediction algo-
rithms, while they cannot be efficiently used in some
applications. For example, in natural and sport images we
encounter abrupt changes in image intensity. The edge is
another example for non-stationary features of images.
The predictor must accurately work in non-stationary
situation according to local characteristics of an image.
Another way to address the non-linearity features of image
is to switch between linear predictors based on image local
information. In this case, final predictors constitute linear
functions, but the switching mechanisms make it similar to
non-linear performance. Predictor schemes can be
backward or forward, depending on whether they make
their decision on past or future pixels of images,
respectively.
In forward prediction, a few past pixels are known (for
example, one row and column) and the predictor estimates
unknown pixels. In backward prediction there is no hidden
information for predictor and the predictor tries to find the
best way to estimate and code each pixel regarding whole
image pixels. In other words, the predictor looks ahead and
finds how to estimate the unknown data to prevent the
worst prediction errors. Note that backward schema is a
trade-off between accuracy and overhead [18].
As a first look at backward and forward prediction, it is
obvious that backward schema is not desirable for trans-
mission, while forward schema is suitable for both storage
and transmission. Forward schema generally requires sin-
gle pass scanning, while backward schema requires at least
two pass scanning. That is why we concentrate on forward
schema in this work.
Another important feature for predictors is the level of
adaptivity. The predictors should be able dynamically
adjust and constitute final predictor according to local
information around current position. Adaptive predictor is
expected at least to be able to adaptively weigh specific
neighboring pixels.
2.2 Scan ordering
Scan ordering is the way of tracing the known image pixels
to estimate the unknown pixels [6, 25]. Predictive coding
algorithms employ various scan ordering. For instance,
history-based blending (HBB) [5] uses rain scan-ordering
and Jpeg uses zig-zag scan ordering, while MED, GAP
techniques use raster scanning. Although in [18] it has been
indicated that Hilbert space filling curve is the best scan
ordering technique in theory, in [27] it has been reported
that Hilbert space filling curve scan is impractical for gray-
scale lossless image compression. The researchers in [6]
investigate the effect of various scan ordering algorithms
such as raster scan, zigzag scan, Hilbert plane-filling scan,
block-wise scan, and resolution pyramid, or sub-sampling
scan on predictive image. The results showed that scan-
ordering has no special effect on the efficiency of predic-
tive coding. As pointed in [18, 25] most prediction schemas
employ raster scan ordering. In this paper, we used raster
scan ordering; scanning from left to right and top to down.Fig. 1 A simple schema of predicting image compression
Fig. 2 Neighboring pixels of predicted pixel X
104 R. M. Rad et al.
123
We tried just to focus on prediction mechanism. Figures 3,
4, 5 and 6 depict raster scan ordering, zig-zag scan order-
ing, rain-scan ordering, and Hilbert space filling curve scan
ordering for a block of size 8 9 8, respectively.
3 Related work
Many predictors such as Ljpeg, median edge detection
(MED), gradient adjusted prediction (GAP), differential
adaptive run coding (DARC), Graham, and gradient-based
selection and weighting (GBSW) for predictive image
compression have been presented by researchers [7, 12,
13, 19, 21]. In this section, some of them are briefly
discussed.
3.1 Ljpeg
Old lossless JPEG standard (Ljpeg) predictor [21] uses
three neighboring pixels (N, W, and NW) to estimate the
unknown pixels. Ljpeg exploits following predictors 0, W,
N, NW, W ? N-NW, W ? [(N-NW)/2], N ? [(W-
NW)/2], and (W ? N)/2 for prediction. Ljpeg predicts the
image using above-mentioned predictors and then chooses
the predictor which produces the lowest error (subtracting
the original image from predicted image) as a final
predictor.
It is considered as a global forward adaption predictor
[18], because first it should scan all image pixels (not
suitable for stream data) and select one predictor which is
fixed for an image.
Ljpeg performance is far from being flexible and pow-
erful enough to provide satisfactory prediction [18, 22]
because it has seven linear predictors and has to select one
of them for whole image pixels in different situations. For
example, an image probably has different characteristics
such as smooth, noisy, and edge region, so a fixed predictor
cannot have an acceptable prediction. We believe that lack
of adaptivity is one of the major reasons for Ljpeg failure.
3.2 MED
The MED [7] is a non-linear predictor that uses three
neighboring pixels to estimate unknown pixel. It detects
horizontal or vertical edges using three neighboring pixels
(N, W, and NW). The predicted pixel value is computed by
the following equation.
X ¼minðN;WÞ if NW � maxðN;WÞmaxðN;WÞ if NW � minðN;WÞN þW � NW Otherise
8<
:
where max(N, W) and min(N, W) are the functions which
return the maximum and minimum values of N and W,
respectively. MED algorithm according to the values of
function max, min, and pixel NW switches between three
conditions. In fact the predictor can be summarized to
medianSelector (N, W, N ? W-NW) where medianS-
elector is a function returning median value of N, W, and
N ? W-NW values [7, 17]. It is noted that MEDFig. 3 Raster scan ordering
Fig. 4 Zigzag scan ordering
Fig. 5 Rain scan ordering
Fig. 6 Hilbert space filling curve scan ordering
A predictive algorithm for multimedia data compression 105
123
algorithm output value always is limited on range [min(N,
W), max(N, W)] [15] and it can never predict out of this
range.
MED is also sometimes called median adaptive pre-
dictor (MAP), but MAP differs a bit, so that it produces the
median value for a set of predictors as output (not neces-
sarily predictors mentioned above) [18].
The MED algorithm is a simple algorithm and its com-
plexity is almost less than other algorithms [2, 4, 8–10].
3.3 Graham
Graham [19] is a non-linear predictor that uses three
neighboring pixels to estimate unknown pixels. Graham
algorithm estimates the gradient orientation by computing
vertical and horizontal gradient orientation parameters
named dv and dh, respectively.
dv ¼ W� NWj j dh ¼ N� NWj j
This simple predictor confines to only pixel N or pixel W
for final predictor without any weighting, and by
considering the values of dv and dh switches between one
of the northern pixel or western pixel.
X ¼ N dv [ dh
W dv� dh
�
In the Graham algorithm no new values are produced by
predictor, therefore it assigns existing values to unknown
pixels. It outperforms static predictors such as Ljpeg [4].
For vertical and horizontal edges, N and W are selected,
respectively.
3.4 Authors’ previous work
We have proposed a simple non-linear predictor which
switches between two predictor functions in [12, 13]. By
using three neighboring pixels, it considers two point of
views for prediction: aggressive view (v1) and conserva-
tive view (v2). The aggressive view can be considered an
inconsistent situation, so that the maximum change level
can be expected but in conservative view we encounter
consistent situation, so that minimum change level and
the most similar value to the neighboring pixels are
expected. So, when pixel NW does not have a value
between pixel N and W, average of v1 and v2 is esti-
mated for unknown pixel value, and otherwise v2 is
estimated. The predicted value is computed using the
following equations.
v1 = N + W� NW, v2 = average(N, W, NW)
X¼ðv1þv2Þ=2 if NW�maxðN,WÞ or NW�minðN,WÞv2 Otherwise
�
Its complexity is as low as MED and we believe it performs
well in noisy situations.
3.5 DARC
The DARC [20] is a non-linear adaptive predictor that uses
three neighboring pixels to estimate the unknown pixels.
DARC computes two parameters to weigh the pixels N and
W in the formation of final predictor. Parameters dh and dv
which represent the gradient orientation in vertical and
horizontal, respectively, are computed as following
equations:
dv ¼ W� NWj jdh ¼ N� NWj j
Then final predictor predicts the unknown pixel by the
following equation:
X ¼ dv
dv þ dh
� �
Wþ dh
dv þ dh
� �
N
The above equation shows that the weighting of the pixels
is according to dv and dh so that they try to keep gradient
orientation. Each of dv or dh, according to their values,
determines the importance and portion of pixel W or N in
predictor, because the sum of coefficients of pixels N and
W equals one. It means the unknown pixel is predicted in a
way that the more valuable pixel in a special situation
weighted more than other one in final predictor. DARC’s
complexity is as low as MED.
3.6 GAP
Gradient adjusted prediction (GAP) is a non-linear adap-
tive predictor that uses seven neighboring pixels to esti-
mate unknown pixel value [2, 6, 11]. The GAP algorithm
weighs the neighboring pixels according to local gradient
and classifies the edges to three classes namely, sharp,
normal, and weak. The GAP algorithm performs this
operation by computing dh and dv using the following
equations.
dh ¼ W�WWj j þ N� NWj j þ NE� Nj jdv¼W� NWj jþ N� NNj jþ NE� NNEj j
After computing the pixels orientation around the unknown
pixel, and according to their values it forms the final pre-
dictor by four neighboring pixels containing N, W, NW,
and NE with different weights. The predictor coefficients
106 R. M. Rad et al.
123
and thresholds given in algorithm were empirically chosen.
The GAP algorithm is described as follows.
Clearly, GAP adapts itself to the gradients of horizontal
and vertical edges. Final predictor function predictive
values are adjusted by the gradients (dv and dh), hence the
predictor is named ‘gradient-adjusted predictor’ [17].
GAP’s complexity is not much but a bit higher than MED
and its output is not limited in such a range like MEDs’.
3.7 GBSW
The GBSW [4] is a non-linear adaptive predictor that uses
ten neighboring pixels to estimate unknown pixel. By
estimating the average gradients in four directions, it tries
to select the best predictor for predicting unknown pixels.
GBSW algorithm first computes four parameters to earn
the gradient orientation. Parameters are computed using ten
closest pixels as follows:
d1 ¼ 2 WW� NWj j þ 2 N� NNEj j þ W� Nj jþ NW� NNj j
d2 ¼ 2 N� NNj j þ 2 W� NWj j þ 2 NW� NNWj jþ 2 NE� NNEj j þ WW�WWNj jþ WWN � NNWWj j
d3 ¼ 2 W�WWNj j þ 2 N� NNWj j þ NW� NNWWj jþ NE� NNj j
d4 ¼ 2 W�WWj j þ 2 N� NWj j þ 2 NW�WWNj jþ 2 N� NEj j þ jNN � NNW þj jNN � NNEj
Then average gradients are estimated by the above
parameters in four directions: 45�, 90�, 135�, and 180�.
dNE ¼d1
6þ 0:5
� �
dN ¼d2
10þ 0:5
� �
dNW ¼d3
6þ 0:5
� �
dNE ¼d4
10þ 0:5
� �
After gradient estimation, GBSW produces the prediction
in a way that the neighboring pixel in the direction with the
minimal estimated gradient has the biggest contribution to
the formation of final prediction [4]. GBSW uses just two of
four neighboring pixels (N, W, NW, and NE) for final
predictor.
For example, if dW and dN (dW \ dN) are two minimum
estimated gradients around the current pixel X, then the
prediction for that pixel is computed as:
X ¼ dw � Nð Þ þ dN �Wð Þdw þ dN
GBSW’s complexity is not much but a bit higher than
MED. Please note that, as pointed before, all predictors
mentioned in related works section classify as low-
complexity predictors.
Table 1 provides summarizes information of all pre-
dictors of this section.
In Table 1 some information is provided as a single view
to compare predictors. In this table NANP means number of
all pixels needed for making decision and estimation by a
specific predictor. NPFP is the number of neighboring
pixels in final the predictor. NAV and NC are number of
auxiliary variables and clauses, respectively. In the last row,
the level of adaptivity for various predictors are given.
MED, PRV [14], and Graham classify as low level of
adaptivity because they use some specific configuration in
some conditions, for example three constant configuration
in MED. Note that the mentioned predictors switch between
linear predictors and try to simulate non-linear performance.
If the predictor is able to weigh the coefficients of final
predictors dynamically, it is considered as moderate
adaptivity level in this work, like DARC. A predictor
considered as high adaptivity level when it is able to make
decisions on which and how neighboring pixels contribute
in final predictor dynamically and regarding local infor-
mation, like NEW.
4 Proposed predictive data compression
The human visual system is more sensitive to important
features in an image. Edges are one of the most important
features that play a critical role in the presentation of an
image. Edges are revealing with jump in intensity, for
instance, Fig. 7 depicts the occurrences of edges for image
pixels. In this case, maximum intensity changes level
occurred in 45� direction. As can be seen, the image edge
exists in 135� angle.
A predictive algorithm for multimedia data compression 107
123
Some predictors such as MED, DARC, and Graham
track edges in vertical and horizontal directions while
GBSW tracks and analyzes edges in four directions. GAP
also tracks edges in vertical and horizontal directions but
additionally classify edges to three classes namely, weak,
normal, and sharp. This paper proposes a new gradient-
based tracking and adapting method (GBTA) that tracks
edges in more directions precisely. Our goal is to design an
efficient and highly adaptive predictor that can be incor-
porated in the modeling step of image compression system.
By examining surrounding pixels of an unknown pixel
we try to find the maximum intensity change level to
determine edges. The new proposed algorithm uses 11
directions to predict the pixel value, as depicted in Fig. 8.
For the determination of more exact maximum-change
direction three simple steps are considered here. In the first
step, the main direction around each pixel among four main
directions (45�, 90�, 135�, and 180�) is selected as R. In the
second step, the sub-direction among R�-45� or R� or
R� ? 45� is selected, sub-directions are produced to be
more exact in determining the edges. In the third step, the
exact maximum-change direction calculated by the fol-
lowing equation is depicted in Fig. 8:
Direction ¼ 2�main directionð Þ þ sub-directionð Þ½ �=3
e:g: 2� 45�ð Þ þ 0�ð Þ½ �=3 ¼ 30�
To clarify the proposed algorithm, we give an example
here. Suppose that the main direction is 45� and the sub-
direction is 0�, then final direction (exact maximum-change
direction) is 30� as depicted in Fig. 9.
As shown in Fig. 9, two directions in terms of maximum
change level, main direction and sub-direction are con-
sidered. In other words, final direction not only relies on
the main direction but also relies on sub-direction. Sub-
Table 1 Summarized information about predictors
Ljpeg MED GAP PRV [14] DARC Graham GBSW NEW
NANP – 3 7 3 3 3 10 19
NPFP – 3 4 3 2 2 2 2
NAV – 0 2 0 2 2 4 0
NC 1 3 6 2 0 2 4 11
L-NL L NL NL NL NL NL NL NL
Switching No Yes Yes Yes No Yes No No
FW-BW BW FW FW FW FW FW FW FW
Adaptivity None Low Moderate–high Low Moderate Low Moderate–high High
NANP number of all needed pixels, NPFP number of pixels in final predictor, NAV number of auxiliary variables, NC number of clauses, L–NLlinear or non-linear, FW–BW forward or backward
Fig. 7 Details of edge occurrence
Fig. 8 Classification of edge directions
Fig. 9 Main direction = 45� and sub-direction = 0� so
direction = 30�
Table 2 Predictors which used when both main and sub-direction are
same
Main direction = sub-direction Direction Predictor
45 45 NW
90 90 W
135 135 NE
180 180 N
108 R. M. Rad et al.
123
direction also affects final direction with less power than
main-direction.
Now it is time to introduce predictors regarding the
obtained final direction. For each pixel prediction just one
or two neighbor pixels participate in final predictor.
Regarding the final local gradient estimation, the predictor
performs dynamically. When the main direction and sub-
direction are the same, the predictor just uses one neighbor
pixel for prediction. When they are different, it uses two
neighbor pixels.
When the main direction and sub-direction are same,
then the predictor estimates the unknown pixel value to be
same as the pixel which keeps the intensity change level.
The whole predictors are used in a situation that both main
and sub-direction are the same as shown in Table 2.
Now, suppose that the main and sub-direction are dif-
ferent. In these circumstances predictor formation is a little
more complex than previous. In this situation, two pixels
participate to form the predictor. According to our algo-
rithm premises, the pixel which participates in order to
show the effect of main direction in keeping maximum
change level weighted two and the other one which par-
ticipates for effect of sub-direction weighted one and
divided by three to form a final predictor.
All of the predictors with details about direction are
shown in Table 3.
To clarify the mentioned explanations, an example is
presented here: the maximum change level occurred in 45�and it is the main direction. The predictor looks around it,
the maximum change level is selected among 45�, 90�, and
135� sub-direction. Sub-direction 90� is selected, while the
main direction is 45�. The NW value participates in
Table 3 Predictors which used when both main and sub-direction are
not same
Main direction = sub-direction Direction Predictor
45 0 30 (2NW ? N)/3
45 90 60 (2NW ? W)/3
90 45 75 (2W ? NW)/3
90 135 105 (2W ? NE)/3
135 90 120 (2NE ? W)/3
135 180 150 (2NE ? N)/3
180 135 165 (2N ? NE)/3
3/))*2((ˆ WNWX +=
Fig. 10 Formation of predictor for final gradient 60�
NW N NE
W X
75°60°
45°
30°
90°105°
135°
120°
150°
165°
180°
Angle selection
(According to local gradients)
Predictor Formation
(According to angle)
Computing of predicted pixel value
(According to predictors)
e=difference
Fig. 11 Snapshot of proposed
predictor
A predictive algorithm for multimedia data compression 109
123
prediction that its weighted value is two. In addition, the
predictor uses the W value with weighted value of one. So
the predictor uses the following equation to estimate the
unknown pixel value (Fig. 10).
Complete steps in the proposed algorithm are shown in
Fig. 11.
5 Benchmarks
Now it is time to test the proposed method upon credible
datasets and analyze its performance in comparison with
related works. We believed that poor datasets cannot
reflect the real world of images. Proper datasets should
be able to show some important aspects of image world,
not just one ad hoc aspect of images. We select six
Fig. 12 Examples of image set:
face, sea, medical, texture,
sport, text
Table 4 Characteristics of images
Image properties Ranges
Width of images (pixel) 168–752
Height of image (pixel) 72–800
Resolution of image (dpi) 72–350
110 R. M. Rad et al.
123
different groups of images which have a significant
contribution in file storage and transmission. Face, sea,
medical, texture, sport, and text constitute our six unique
datasets. Figure 12 shows some examples of each set.
These six groups of images inherently are different, and
each group has their own characteristics and features.
Table 5 Mean absolute error (MAE) upon face image set, including ten different face images
Image Dimension MED Graham Previous [13] DARC GAP GBSW GBTA
Face 0 344 9 400 6.79 7.46 7.68 6.65 6.99 7.01 5.20
Face 1 288 9 176 6.65 6.97 9.33 6.77 8.83 6.75 4.65
Face 2 368 9 360 5.13 5.86 5.53 4.99 5.46 5.40 4.28
Face 3 552 9 480 8.76 9.69 8.86 8.49 8.56 8.72 6.36
Face 4 248 9 264 4.41 5.12 6.53 4.36 4.79 5.04 3.27
Face 5 320 9 320 6.78 7.58 10.27 6.83 4.64 6.86 5.84
Face 6 680 9 512 4.57 5.30 5.15 4.48 5.11 5.03 3.79
Face 7 376 9 280 5.18 5.92 6.59 5.09 5.81 5.45 4.23
Face 8 256 9 256 10.24 10.84 12.93 10.06 10.67 10.42 7.38
Face 9 376 9 472 5.74 6.56 6.56 5.62 5.89 6.02 4.77
6.42 7.13 7.94 6.33 6.67 6.67 4.97
Bold values are average values
Table 6 Mean absolute error (MAE) upon medical image set, including ten different medical images
Image Dimension MED Graham Previous [13] DARC GAP GBSW GBTA
Medical 0 336 9 296 8.82 9.52 10.56 8.75 9.40 8.71 7.01
Medical 1 344 9 272 10.24 11.31 11.89 10.10 10.44 10.40 8.32
Medical 2 336 9 336 7.6 8.50 12.15 7.37 11.10 8.53 5.79
Medical 3 344 9 312 8.06 8.69 9.17 7.86 9.59 8.03 6.50
Medical 4 504 9 504 3.77 4.27 6.19 3.75 4.43 3.99 3.00
Medical 5 240 9 232 13.69 14.61 15.19 13.51 15.10 14.00 10.86
Medical 6 272 9 336 6.50 7.05 7.33 6.38 7.87 6.51 5.07
Medical 7 320 9 336 14.48 15.20 15.82 14.24 15.07 14.12 10.75
Medical 8 304 9 272 15.19 16.20 17.17 14.92 15.72 15.62 11.95
Medical 9 288 9 288 3.60 4.67 3.95 4.11 3.81 3.77 3.03
9.19 10.00 10.94 9.10 10.25 9.36 7.22
Bold values are average values
Table 7 Mean absolute error (MAE) upon sport image set, including ten different sport images
Image Dimension MED Graham Previous [13] DARC GAP GBSW GBTA
Sport 0 480 9 800 4.16 4.39 4.87 4.03 4.84 5.09 3.54
Sport 1 600 9 528 9.87 10.91 12.58 9.80 12.37 12.22 7.57
Sport 2 384 9 512 9.86 11.12 10.33 9.56 10.46 10.90 6.43
Sport 3 312 9 544 17.17 18.14 18.28 16.86 18.76 19.09 13.76
Sport 4 464 9 320 7.95 8.40 10.82 7.86 9.81 10.63 7.16
Sport 5 728 9 480 12.89 13.75 15.79 12.76 15.34 15.66 10.42
Sport 6 440 9 680 8.40 9.06 10.67 8.33 11.07 10.32 7.30
Sport 7 560 9 656 6.72 7.58 9.08 6.67 8.47 8.48 5.05
Sport 8 800 9 416 9.14 10.21 10.03 8.95 9.80 10.64 7.22
Sport 9 400 9 400 20.40 21.77 15.24 19.33 18.09 17.35 11.90
10.65 11.53 11.76 10.42 11.90 12.03 8.03
Bold values are average values
A predictive algorithm for multimedia data compression 111
123
Each image has special histogram, and its size and
content completely differ from others. Table 4 indicates
the ranges of height, width, and resolution for all these
images.
6 Experimental results
In order to measure the accuracy of the proposed technique
we have implemented all predictors which have been
Table 8 Mean absolute error (MAE) upon texture image set, including ten different texture images
Image Dimension MED Graham Previous [13] DARC GAP GBSW GBTA
Texture 0 336 9 512 10.92 10 96 16.69 11.06 11.24 16.74 10.79
Texture 1 336 9 512 21.22 22.21 21.04 20.45 21.11 20.79 17.35
Texture 2 168 9 256 33.62 35.90 34.78 32.40 35.64 33.90 27.47
Texture 3 336 9 512 18.06 19.55 20.00 17.89 21.73 17.52 15.47
Texture 4 256 9 384 24.79 26.66 23.97 23.87 25.02 25.10 20.45
Texture 5 336 9 512 12.24 13.12 14.66 12.10 15.49 13.38 10.50
Texture 6 256 9 384 24.41 25.26 22.62 24.00 21.12 23.80 15.90
Texture 7 336 9 512 6.11 6.52 6.72 5.98 6.41 6.62 4.94
Texture 8 256 9 384 16.74 18.09 17.75 16.47 19.16 16.15 10.98
Texture 9 200 9 512 11.67 12.35 13.41 11.43 14.43 13.05 10.79
17.97 19.06 19.16 17.57 19.13 18.70 14.46
Bold values are average values
Table 9 Mean absolute error (MAE) upon sea image set, including ten different sea images
Image Dimension MED Graham Previous [13] DARC GAP GBSW GBTA
Sea 0 384 9 512 7.15 7.67 8.14 6.99 8.65 8.77 6.16
Sea 1 384 9 512 2.95 3.12 4.22 2.88 4.71 4.40 2.83
Sea 2 296 9 400 3.14 3.37 5.28 3.01 5.79 5.35 3.45
Sea 3 448 9 600 2.24 2.36 3.25 2.16 3.44 3.35 1.92
Sea 4 320 9 512 5.15 5.44 7.13 5.18 7.29 7.47 5.18
Sea 5 256 9 400 7.67 8.21 8.23 7.50 8.33 8.14 6.60
Sea 6 296 9 400 5.60 5.93 5.92 5.33 6.32 7.16 4.61
Sea 7 296 9 400 7.01 7.37 8.20 6.88 8.02 8.81 5.66
Sea 8 368 9 512 5.14 5.55 5.87 5.02 6.07 6.31 4.64
Sea 9 336 9 512 2.28 2.27 5.24 2.42 5.61 4.91 2.79
4.83 513 6.14 4.74 6.42 6.46 4.38
Bold values are average values
Table 10 Mean absolute error (MAE) upon text image set, including ten different text images
Image Dimension MED Graham Previous [13] DARC GAP GBSW GBTA
Text 0 416 9 312 13.06 13.31 21.75 13.18 18.39 15.15 11.35
Text l 624 9 600 8.95 9.03 10.70 8.84 12.11 9.38 6.76
Text 2 744 9 584 16.83 16.90 19.40 17.06 17.46 21.24 13.70
Text 3 752 9 72 15.54 15.05 23.86 15.50 24.93 20.95 12.33
Text 4 600 9 624 7.49 7.5 9.28 7.42 8.69 22.38 6.44
Text 5 424 9 336 12.20 12.23 15.67 12.05 14.47 16.68 8.75
Text 6 456 9 232 16.38 16.35 20.68 16.78 18.41 27.28 14.09
Text 7 472 9 88 31.54 32.49 26.51 31.81 26.83 33.66 21.46
Text 8 296 9 576 24.51 24.50 28.57 24.38 24.28 28.75 16.83
Text 9 384 9 648 18.41 18.89 18.65 18.47 17.37 20.01 14.84
16.49 16.62 19.50 16.54 18.29 21.54 12.65
Bold values are average values
112 R. M. Rad et al.
123
discussed in related work section and the proposed algo-
rithm using Matlab tool programming. We have tested the
predictors upon our specific corpus explained in the dataset
section. Our criterion for comparison different algorithms
is the measurement of the similarity between predicted
image and the original image.
Fig. 13 a Original, b MED, c previous, d GAP, e DARC, f Graham, g GBSW, and h GBTA
Fig. 14 a MED, b previous, c GAP, d DARC, e Graham, f GBSW, g GBTA
A predictive algorithm for multimedia data compression 113
123
Some papers exploit math-based statistical tables for
comparison [1–8, 10, 11, 14–17, 22], but this work does not
confine such statistical tables. Hence, we separate the
comparison into two parts, mathematical comparison and
visual comparison.
6.1 Mathematical comparison
Since mean absolute error (MAE) is widely used by
researchers in image compression field, MAE is picked up
for mathematical comparison in this work. MAE is the
average of the absolute errors ei;j ¼ Xi;j � Xi;j, where X is
the true pixel value and X is the predicted pixel value.
MAE equation is shown for an image of size N 9 M in the
following formula.
MAE ¼PN
i¼1
PMj¼1 ei;j
N �M
Tables 5, 6, 7, 8, 9 and 10 present the MAE for all
predictors discussed before upon the six-image set.
6.2 Visual comparison
For further illustration of the performance of the proposed
method over other predictors discussed before, we present
those predictive error values as an image, similar to [23].
As image Lena is the most famous image in image pro-
cessing field, it is selected by the authors for this exami-
nation. These images obtained by subtracting the original
Lena from predicted Lena. The brighter pixels show the
errors produced by the predictors, so that the distribution of
the errors can be observed all over the predicted image.
As shown by Fig. 13a–h the bright pixels in an image
predicted by NEW predictor is less than the others. In
addition, for showing the dispersion of produced errors by
predictors, histograms of each predictor for Lena are pre-
sented. X-axis shows the possible value of errors (on range
0–255) and Y-axis shows the number of pixels which have
error corresponding to x. So it is expected that the better
predictor has the most aggregation near the zero because
the smaller produced error is desirable for a better
predictor.
Histograms in Fig. 14 show that the number of produced
errors near the zero for GBTA predictor is more than the
others.
7 Conclusions
Predictive coding has many applications in digital image
processing such as image compression. Predictive algo-
rithms estimate the unknown pixel value using the past and
present pixel values. In this paper, a new gradient-based
tracking and adapting predictor algorithm were proposed. It
evaluates and uses the values of the known pixels in dif-
ferent directions to estimate the value of the unknown
pixel. The proposed algorithm and other predictive algo-
rithms such as MED, GAP, GBSW, Graham, DARC, and
the proposed algorithm in [13] were implemented using the
Matlab programming tool. The implemented algorithms
were tested on different images with different contents and
sizes. The obtained experimental results show that the
prediction error of the proposed algorithm is much less
than the other algorithms. This means that the quality of the
obtained predicted image using the proposed algorithm is
better than the quality of the obtained predicted images
using other algorithms.
References
1. Baligar, V.P., Patnaikb, L.M., Nagabhushana, G.R.: High com-
pression and low order linear predictor for lossless coding of
grayscale images. Image Vis Comput J 21(6), 543–550 (2003)
2. Knezovic, J., Kovac, M., Mlinaric, H.: Classification and
Blending Prediction for Lossless Image Compression. IEEE
Melecon, Benalmadena, (2006)
3. Estrakh, D.D., Mitchell, H.B., Schaefera, P.A., Mannb, Y.,
Peretzb, Y.: Soft median adaptive predictor for lossless picture
compression. J. Signal. Process. 81(9), 1985–1989 (2001)
4. Knezovic, J, Kovac, M.: Gradient based selective weighting of
neighboring pixels for predictive lossless image coding. In: 25th
International Conference on Information Technology Interfaces
(2003)
5. Seemann, T., Tischer P., Meyer, B.: History-based blending of
image sub-predictors. In: Proceedings of the International Picture
Coding Symposium (PCS’97), pp. 147–151. VDE-Verlag, Ger-
many (1997)
6. Memon, N., Wu, X.: Recent development in context-based pre-
dictive techniques for lossless image compression. Comput J
40(2/3), 127–136 (1997)
7. Martucci, S. A. Reversible compression of HDTV images using
median adaptive prediction and arithmetic coding. In: IEEE
International Symposium on Circuits and Systems, USA,
pp. 1310–1313 (1990)
8. Memon, N., Sippy, V., Wu, X.: A comparison of prediction
schemes proposed for a new lossless image compression stan-
dard. Appl Comput Harmon Anal 5(3), 332–369 (1998)
9. Yua, U.H., Changa, C.C., Hu, Y.C.: Hiding secret data in images
via predictive coding. Pattern. Recogn. 38(5), 691–705 (2005)
10. Deng, G., Ye, H.: Lossless image compression using adaptive
predictor combination, symbol mapping and context filtering. In:
International Conference on Image Processing, vol. IV (1999).
ISBN: 0-7803-5467-2
11. Wu, X.: An algorithm study on lossless image compression. In:
IEEE Conference on Data Compression, pp. 150–159 (1996)
12. Shahbahrami, A., Moradi Rad, R., Attar, A.: A study of predictive
method and presentation of an improvement. In: Local Workshop
in Department of Computer Engineering, Faculty of Engineering,
University of Guilan, Rasht, Iran (2010)
13. Seyed Danesh, A., Moradi Rad, R., Attar, A.: A novel predictor
function for lossless image compression. In: 2nd IEEE Interna-
tional Conference on advanced computer control, China (2010)
114 R. M. Rad et al.
123
14. Shukla, J., Alwani, M., Kumar Tiwari, A.: A survey on lossless
image compression methods. In: 2nd International Conference on
Computer Engineering and Technology, China (2010)
15. Seemann, T., Tischer, P.: Generalized locally adaptive DPCM’’.
In: Proceedings of the Conference on Data Compression, USA
(1997)
16. Shamardan1, H. M., El-Azim, S. A., Fikri, M.: New prediction
technique for lossless compression of multispectral satellite
images. In: International Conference on Graphics, Vision and
Image Processing, GVIP 05 Conference, Egypt (2005)
17. Chang, C., Chen, G.: Enhancement algorithm for nonlinear
context-based predictors. In: IEEE Proceedings Vision, Image
and Signal Processing (2003)
18. Penrose, A. J.: Extending lossless image compression. Technical
report no. 526, University of Cambridge, computer laboratory,
UK (2001)
19. Graham, R.E.: Predictive quantizing of television signals. IRE
WESCON Conv. Rec. 22(Pt. 4), 147–157 (1958)
20. Gandhi, B., Honsinger, C., Rabbani, M., Smith, C.: A proposal
submitted in response to call for contributions for JTC 1.29.12
[JTC1/SC29/WG1 N41] ISO working document ISO/IEC JTC1/
SC29/WG1 N204 (1995)
21. Wallace, G. K.: The JPEG still picture compression standard. In:
IEEE Transactions on Consumer Electronics, vol. 38, no. 1,
Arlington, VA (1992)
22. Wang, S., Cheung, C., Cheung, K., Po, L.: Lossless wavelet coder
with adaptive orientational prediction. In: Proceedings of the
IEEE Region 10 Conference TENCON 99, Cheju Island (1999)
23. Jiang, J., Guo, B., Yang, S.: Revisiting the JPEG-LS prediction
scheme. In: IEEE Proceedings Vision, Image and Signal Pro-
cessing (2000)
24. Ponomarenko, N., Krivenko, S., Lukin, V., Egiazarian, K. Astola,
J. T.: Lossy compression of noisy images based on visual quality:
a comprehensive study. J. Adv. Signal Process (EURASIP), vol.
2010, article ID 976436 (2010)
25. Sayood, K.: Lossless compression handbook. Academic Press,
Elsevier Science, USA (2003)
26. Solomon, P D.: Data compression the complete reference, 4th
edn. Springer, New York (2006)
27. Memon, N., Sayood, K.: Lossless image compression: a com-
parative study. In: Proc. SPIE Still-Image Compression (1995)
28. Attar, A., Rad, R. M., Shahbahrami, A.: An accurate gradient-
based predictive algorithm for image compression. In: The 8th
International Conference on advances in mobile computing and
multimedia (MoMM2010), Paris, France (2010)
29. Jiang, J., Armstrong, A., Feng, G.C.: Web-based image indexing
and retrieval in JPEG compressed domain. Multime. Syst. 9,
424–432 (2004)
30. Zadeh, M.H., Wang, D., Kubica, E.: Perception-based lossy
haptic compression considerations for velocity-based interac-
tions. Multime. Syst. 13, 275–282 (2008)
31. Winkler, T., Rinner, B.: User-centric privacy awareness in video
surveillance. Multimedia Syst. 18(2), 99–121 (2012)
A predictive algorithm for multimedia data compression 115
123