scispace - formally typeset
Open AccessJournal ArticleDOI

QR-RLS algorithm for error diffusion of color images

TLDR
A new error diffusion method is presented in which the adaptive recursive least- squares (RLS) algorithm is used, which provides local optimization of the error diffusion filter along with smoothing of the filter coefficients in a neighborhood.
Abstract
Printing color images on color printers and displaying them on computer monitors requires a significant reduction of physically distinct colors, which causes degradation in image quality. An efficient method to improve the display quality of a quantized image is error diffusion, which works by distributing the previous quantization errors to neighboring pixels, exploiting the eye's averaging of colors in the neighborhood of the point of interest. This creates the illusion of more colors. A new error diffusion method is presented in which the adaptive recursive least- squares (RLS) algorithm is used. This algorithm provides local optimization of the error diffusion filter along with smoothing of the filter coefficients in a neighborhood. To improve the performance, a diagonal scan is used in processing the image.

read more

Content maybe subject to copyright    Report

QR-RLS algorithm for error diffusion
of color images
Gozde Bozkurt Unal
North Carolina State University
Electrical and Computer Engineering
Department
Raleigh, North Carolina 27695
Yasemin Yardimci
Middle East Technical University
Informatics Institute
Ankara 06531, Turkey
Orhan Arikan
A. Enis C¸ etin
Bilkent University
Electrical Engineering Department
Ankara 06533, Turkey
Abstract. Printing color images on color printers and displaying them on
computer monitors requires a significant reduction of physically distinct
colors, which causes degradation in image quality. An efficient method to
improve the display quality of a quantized image is error diffusion, which
works by distributing the previous quantization errors to neighboring pix-
els, exploiting the eye’s averaging of colors in the neighborhood of the
point of interest. This creates the illusion of more colors. A new error
diffusion method is presented in which the adaptive recursive least-
squares (RLS) algorithm is used. This algorithm provides local optimiza-
tion of the error diffusion filter along with smoothing of the filter coeffi-
cients in a neighborhood. To improve the performance, a diagonal scan
is used in processing the image.
©
2000 Society of Photo-Optical Instrumentation
Engineers.
[S0091-3286(00)00611-5]
Subject terms: halftones; color dithering; displays; printing; quantization; QR-RLS
algorithm.
Paper 990163 received Apr. 14, 1999; revised manuscript received June 2, 2000;
accepted for publication June 7, 2000.
1 Introduction
Color output devices such as halftone color printers and
palette-based displays are capable of producing only a lim-
ited number of colors, whereas the human eye can distin-
guish around 10 million colors under optimal viewing
conditions.
1
The eye perceives only a local spatial average
of the color spots produced by a printing device and is
relatively insensitive to errors made in high frequencies in
an image.
1
Halftoning algorithms therefore aim to preserve
these local averages while forcing the errors between the
continuous tone image and the halftone image to high-
frequency regions. Existing halftoning techniques can be
broadly classified as ordered dither, error diffusion, and
optimization-based halftoning techniques. A comparative
study of earlier image reproduction techniques can be
found in Stoffel and Moreland.
2
Ordered dither techniques are mainly based on thresh-
olding each pixel value after adding a pseudonoise se-
quence. These techniques are attractive in the sense that
they are simple to implement and computationally inexpen-
sive because they require pixelwise operations. However,
ordered dithering results in regular and periodic error pat-
terns, which lowers the quality of the output image.
Another group of halftoning methods are error diffusion
techniques first introduced by Floyd and Steinberg.
3
They
proposed an algorithm that is predicated on distributing the
quantization error of the current pixel to neighboring pix-
els. Typically, at each pixel, the weighted sum of previous
quantization errors is added to the current pixel value, and
then the pixel is quantized to produce the output pixel
value. These weights form an error diffusion filter. Error
diffusion aims to preserve the local average value of the
image, therefore a unity gain low-pass finite impulse re-
sponse FIR filter is used for distributing the error.
Error diffusion was first developed for gray-scale im-
ages. For color images, error diffusion can be applied to
each color component independently or a color pixel can be
error diffused in a vectorized manner.
Some directional artifacts seen in error diffusion are due
largely to the traditional raster of processing.
4
Previous ap-
proaches for improving error diffusion employed various
choices of space filling curves to define the order of pro-
cessing, such as serpentine curves,
4
Peano curves,
5
and ran-
dom space-filling curves.
6
In contrast to deterministic error filter kernels, some re-
cent research employed dynamically adjusting the error fil-
ter kernel using adaptive signal processing techniques.
Akarun et al.
7
used a vectorized error diffusion approach,
and updated the error diffusion filter coefficients adap-
tively. Wong
8
minimizes a local frequency-weighted error
criterion to adjust the error diffusion kernel dynamically
using the well-known least mean-squares LMS
algorithm.
9
Kollias and Anastassiou
10
used neural networks
to minimize a frequency-weighted mean-squared-error cri-
terion.
In optimization-based halftoning techniques, the prob-
lem of halftoning is formulated as an optimization problem
that minimizes an error metric between the continuous tone
original image and its halftone version. Disadvantages of
optimization-based methods for halftoning are that there
are multiple optima, the methods are iterative, and they
require substantially high computational power. For color
images, processing requirements further increase.
Some hybrid schemes that combine different aspects of
halftoning methods are proposed in the literature such as
the blue-noise halftoning,
11
green-noise halftoning,
12
ran-
domized error propagation,
13
and using a nonlinear Laplac-
ian operator.
14
2860 Opt. Eng. 39(11) 28602866 (November 2000) 0091-3286/2000/$15.00 © 2000 Society of Photo-Optical Instrumentation Engineers
Downloaded From: https://www.spiedigitallibrary.org/journals/Optical-Engineering on 9/28/2017 Terms of Use: https://spiedigitallibrary.spie.org/ss/TermsOfUse.aspx

2 Diagonal Error Diffusion
A block diagram of the standard error diffusion technique
is given in Fig. 1. Usually, the image is processed in a
raster scan fashion, and each input color pixel x(s)isa3
1 vector, where the index s s
1
M s
2
and M is the num-
ber of horizontal pixels in the image. The current pixel x(s)
together with the diffused error is quantized. The resultant
image y(s) is the dithered image.
Here, Q is the quantizer, and H is the error diffusion
matrix. Some well-known error diffusion filter masks
3,15
are shown in Fig. 2, where the solid dots denote the pixel
located at s. These masks determine the support of the error
diffusion filter. A common characteristic of these filters is
that they are casual, i.e., their region of support is wedge to
ensure that these filters can be applied in a sequential
manner.
16
The filter coefficients are deterministic, low pass
in nature, and add up to 1 so that errors are neither ampli-
fied nor reduced.
The pixel at location s has the value
u
s
x
s
H
s
e
p
s
, 1
before quantization. Here, the error diffusion filter H has
size KL, where K is the number of channels, N is the size
of support of the error diffusion filter on each channel, and
LKN. For an RGB image that uses an error diffusion
filter support of size 4 as the Floyd-Steinberg filter, K3
and N 4. The composite error vector e
p
(s) consists of the
past quantization errors that must be diffused on the pixel at
location s
e
p
s
e
1p
T
s
e
2p
T
s
...e
Kp
T
s
T
, 2
where the subscript p indicates that the quantization errors
are made in the past. The past quantization error vector for
the k’th channel e
kp
(s) has the open form:
e
kp
s
e
1k
s
e
2k
s
...e
Nk
s
T
, 3
where e
nk
(s) is the quantization error in the k’th channel
for the n’th neighbor of the pixel s. There are two cases of
interest:
1. Matrix H is a full matrix so that errors in different
channels may be diffused on each other. We refer to
this case as composite-multichannel error diffusion
and its block diagram is depicted in Fig. 3. It may be
also called vectorized error diffusion.
7
2. Matrix H has the following block diagonal structure:
H
h
11
T
0 0 ... 0
0 h
22
T
0 ... 0
⯗⯗ 0
0 0 0 ... h
KK
T
, 4
with each h
kk
T
designating the error diffusion filter for
the k’th channel as follows:
h
kk
T
h
k1
h
k2
...h
kN
.
In this structure, the errors in one channel are only diffused
in the same channel. We call this strategy channel-by-
channel error diffusion and its block diagram is given in
Fig. 4. It is also called scalar error diffusion.
After error is diffused on the pixel s,(K1) quantiza-
tion error vector e(s) for this pixel is formed as
e
s
u
s
y
s
, 5
y
s
Q
u
s
. 6
Fig. 1 Block diagram of the error diffusion method.
Fig. 2 Error diffusion filter masks.
Fig. 3 One channel of the composite-multichannel error diffusion;
where
N
is the error diffusion filter size and
k
is the channel index,
which takes a value from the set
R
1,
G
2, and
B
3.
Unal et al.: QR-RLS algorithm for error diffusion...
2861Optical Engineering, Vol. 39 No. 11, November 2000
Downloaded From: https://www.spiedigitallibrary.org/journals/Optical-Engineering on 9/28/2017 Terms of Use: https://spiedigitallibrary.spie.org/ss/TermsOfUse.aspx

The error between the original input pixel and the output
pixel is defined as the output error,
z
s
x
s
y
s
, 7
which can be expressed in terms of the past and the present
quantization errors as
z
s
e
s
H
s
e
p
s
, 8
by substituting Eqs. 1 and 5 in Eq. 7.
The normal raster used in error diffusion causes vertical
or horizontal artifacts, and regular patterns that arise espe-
cially in uniform intensity regions. It is well known that the
human visual system is less sensitive to diagonal errors
compared to the vertical or horizontal errors. To take ad-
vantage of this fact we scanned the image diagonally, hence
the error is diagonally diffused. Causal prediction windows
shown in Fig. 5 are used in the error diffusion algorithm.
Here, we aim to break up the horizontal and vertical direc-
tionality of the possible error patterns, and force the accu-
mulation of the error to be in diagonal orientation to which
the human eye is less sensitive.
3 New Adaptive Error Diffusion
The error diffusion filter plays an important role in shaping
the output error spectrum. In contrast to deterministic error
diffusion filters, recent algorithms use the optimum filter
coefficients for a given image, or update the coefficients
adaptively using LMS type adaptive algorithms.
7,8
We would like to minimize the energy of the output
error z(s)
E
z
s
2
E
x
s
y
s
2
E
e
s
H
s
e
p
s
2
,
9
with respect to the filter coefficients H(s). Since typical
image characteristics are locally nonstationary, an adaptive
algorithm is used for the minimization of the output error
sequence energy. However, to reduce the effects of noise
and provide further averaging of the filter coefficients
around s we included the past quantization errors around s
in our cost function. We propose to use a recursive least-
squares RLS type adaptation algorithm minimizing a cost
function of the form
J
s
H
j 1
s
s j
z
j
2
, 10
where
0,1
is the forgetting factor. The main advan-
tages of this algorithm are the following:
1. fast adaptation to local features with an appropriately
selected forgetting factor
2. numerical stability due to its lack of sensitivity to the
condition matrix of the quantization error autocorre-
lation matrix
3. one-step convergence to the optimum H(s) matrix
RLS algorithms that employ QR decomposition of the
quantization error autocorrelation matrix, also called QR-
RLS algorithms, have the added benefit of having the abil-
ity to work in low-bit arithmetic, therefore making them
feasible to be implemented using very large scale integra-
tion VLSI.
3.1
Composite Multichannel Error Diffusion
Substituting the expression for the output error in Eq. 10
we obtain
J
s
H
j 1
s
s j
e
j
H
j
e
p
j
2
k 1
K
j 1
s
s j
e
k
j
h
k
T
j
e
p
j
2
k 1
K
J
k,s
h
k
, 11
where the rows of H(s) are denoted by h
k
T
. The minimiza-
tion of the cost function J
s
(H) with respect to the error
diffusion filter coefficients matrix H(s) can be carried out
by determining the rows h
k
T
of the optimum matrix H(s)by
minimizing the individual cost functions J
k,s
(h
k
) with re-
spect to h
k
, for k1,2,...,K. The optimum solution has the
form
Fig. 4 One channel of the channel-by-channel error diffusion:
N
is
the error diffusion filter size and
k
is the channel index which takes a
value from the set
R
1,
G
2, and
B
3.
Fig. 5 Diagonal scanning: dots correspond to the current pixel, and
the L-shaped window contains the previous pixels.
Unal et al.: QR-RLS algorithm for error diffusion...
2862 Optical Engineering, Vol. 39 No. 11, November 2000
Downloaded From: https://www.spiedigitallibrary.org/journals/Optical-Engineering on 9/28/2017 Terms of Use: https://spiedigitallibrary.spie.org/ss/TermsOfUse.aspx

h
k
C
1
s
k
s
, 12
where C(s) and
k
(s) are the correlation estimates defined
as
C
s
j 1
s
s j
e
p
j
e
p
T
j
, 13
k
s
j 1
s
s j
e
p
j
e
k
j
, 14
and the latter correlation has to be computed for each chan-
nel k 1,2,...,K.
In QR-RLS the optimal solution of Eq. 12 is computed
by employing a recursive procedure operating on the
square-rooted covariance matrices providing numerical ro-
bustness even when very few bits are used for arithmetic
implementations. Introducing the unique upper triangular
Cholesky factor with positive diagonal entries R(s), and
vectors
k
(s):
C
s
R
T
s
R
s
, 15
k
s
R
T
s
k
s
, 16
the optimal error diffusion filter coefficients can be ob-
tained as a function of the square-rooted covariance
h
k
s
R
1
s
k
s
, k1,2,...K. 17
The QR-RLS algorithm is effective because it can be
implemented in a recursive manner. Assuming the matrices
R(s 1) and R
T
(s 1) and the vectors
k
(s 1) are al-
ready computed for the previous pixel (s1), they can be
updated so that
Q
s
R
s1
k
s1
R
T
s1
e
p
T
s
e
k
s
0
T
R
s
k
s
R
T
s
0
T
s
f
˜
k
s
g
˜
T
s
,
with the vector g
˜
(s) and the variable f
˜
k
(s) updating the
present optimum error diffusion filter as
h
k
s
h
k
s1
g
˜
s
f
˜
k
s
k1,2,...K. 18
The orthonormal matrix Q(s) is of size (L1) (L 1)
and consists of L Givens rotations
Q
s
Q
L
s
Q
L 1
s
...Q
1
s
,
each with the form
Q
i
s
I
i 1
]]
¯ cos
i
s
¯ sin
i
s
] I
L i
]
¯ sin
i
s
¯ cos
i
s
. 19
The Givens rotation matrices Q
i
(s) differ from an identity
matrix of size (L 1)(L1) only at its four entries, as
shown in Eq. 19. The rotation angle
i
(s) is selected so
that the (L1,i) element of the matrix to which Q
i
(s)is
applied is annihilated while R(s) remains upper triangular.
The Q
i
(s) matrix constructed in this manner simulta-
neously updates the matrix R
T
(s 1) and the vector
k
(s)
as indicated by the last two columns of Eq. 18. The itera-
tions can be started with a diagonal matrix R(0)
I
m
.
Yang and Bo
¨
hme have described this and other rotation-
based RLS algorithms in a unified framework.
17
3.2
Channel-by-Channel Error Diffusion
In the previous subsection, error diffusion by using previ-
ously made errors in all of the channels is discussed. By
constraining the form of the error diffusion coefficient ma-
trix H(s), as in Eq. 4, further savings in computational
load can be achieved with tolerable degradation in the over-
all performance of the diffusion process. In this case, the
cost function of Eq. 11 simplifies to
J
s
H
j 1
s
s j
e
j
H
j
e
p
j
2
20
k 1
K
j 1
s
s j
e
k
j
h
kk
T
j
e
pk
j
2
21
k 1
K
J
k,s
h
kk
, 22
where the previous quantization errors for the kth channel
are given by
e
pk
j
e
1k
n
e
2k
n
...e
Nk
n
T
k1,2,...,K. 23
We deliberately skipped the subscript p on the right-hand
side to simplify the notation.
3.3
Computational Complexity
The computational complexity of one iteration step of the
standard LMS algorithm is known to be the length of the
input vector for every channel. Therefore, the computa-
tional load of composite multichannel error diffusion is
K
2
N and the load reduces to L KN for the channel-by-
channel error diffusion. Computational complexity of the
QR-RLS algorithm is O(K
2
N
2
) for the composite multi-
channel error diffusion and it is O(KN
2
) for the channel-
by-channel implementation. With typical selections of K
3 and N 4, the load QR-RLS algorithm is not very high
compared to the LMS algorithm. Furthermore, systolic ar-
Unal et al.: QR-RLS algorithm for error diffusion...
2863Optical Engineering, Vol. 39 No. 11, November 2000
Downloaded From: https://www.spiedigitallibrary.org/journals/Optical-Engineering on 9/28/2017 Terms of Use: https://spiedigitallibrary.spie.org/ss/TermsOfUse.aspx

rays can be utilized in the QR-RLS implementation and the
proposed approaches can be realized efficiently by VLSI
technology.
The diagonal and the traditional raster have the same
computational load but the memory requirements may vary
depending on the application. If the image is ‘‘scanned’’
diagonally the memory requirements only increase by a
factor of
(2), butwhen the image is already scanned hori-
zontally almost the whole image has to be buffered.
4 Simulation Results
To demonstrate the performance of our error diffusion al-
gorithm, we carried out simulations with several images
among which a representative one is presented here.
18
First
the images were quantized to 16 levels using the median
cut algorithm.
19
We compared the new method with Floyd-
Steinberg’s method, and the adaptive error diffusion with
LMS algorithm both with raster scan and diagonal scan of
the image. Various values for the forgetting factor for the
QR-RLS algorithm were tried in the interval 0.9, 0.99 and
the algorithm showed robust performance with these selec-
tions. We kept the forgetting factor as 0.95 in our simula-
tions for both types of scanning methods. The parameter
used in the initialization of the QR-RLS algorithm,
,
was chosen as 0.1. The coefficients of the adaptive error
diffusion filter in both algorithms were scaled by 0.9, i.e.,
we allowed diffusion of not all but a fraction of the error
made in quantization to neighboring pixels, and this re-
sulted in a slight improvement in terms of color impulses.
7
The results for the ‘‘Peppers’’ image is shown
*
in Fig.
6. The image error diffused by Floyd-Steinberg’s method in
Fig. 6b contains color impulses, and the edges are
smeared to each other. These artifacts, color impulses and
false edges, are reduced in Figs. 6c and 6d, which were
obtained by the LMS-based error diffusion method. The
image in Fig. 6d was obtained by diagonal processing
which shows some improvement when compared to Fig.
*
The color image outputs can be viewed in Ref. 20.
Fig. 6 (a) Original image, (b) standard error diffusion, (c) error diffusion with LMS (raster scan), (d)
error diffusion with LMS (diagonal scan), (e) error diffusion with QR-RLS (raster scan), and (f) error
diffusion with QR-RLS (diagonal scan).
Unal et al.: QR-RLS algorithm for error diffusion...
2864 Optical Engineering, Vol. 39 No. 11, November 2000
Downloaded From: https://www.spiedigitallibrary.org/journals/Optical-Engineering on 9/28/2017 Terms of Use: https://spiedigitallibrary.spie.org/ss/TermsOfUse.aspx

Citations
More filters
Journal ArticleDOI

Colorant-based direct binary search halftoning

TL;DR: A luminance human visual sys-tem model is employed to enforce exclusion of visually nonhomogeneous pat-terns for the total dot distribution, as well as for each individual colo-rant texture.
References
More filters
Journal ArticleDOI

The effects of a visual fidelity criterion of the encoding of images

TL;DR: This investigation has considered a class of distortion measures for which it is possible to simulate the optimum (in a rate-distortion sense) encoding and found one distortion measure was fairly consistently rated as yielding the most satisfactory appearing encoded images.
Proceedings ArticleDOI

Color image quantization for frame buffer display

TL;DR: It is demonstrated that many color images which would normally require a frame buffer having 15 bits per pixel can be quantized to 8 or fewerbits per pixel with little subjective degradation.
Journal ArticleDOI

A survey of techniques for the display of continuous tone pictures on bilevel displays

TL;DR: This work presents a survey of processing techniques for presenting continuous tone still images on such displays by dividing an image into picture elements and comparing the intensity of each element with a threshold value.
Journal ArticleDOI

Digital color imaging

TL;DR: Fundamental concepts of color perception and measurement are first presented using vector-space notation and terminology in order to establish the background and lay down terminology.
Journal ArticleDOI

Color image quantization for frame buffer display

HeckbertPaul
- 01 Jul 1982 - 
TL;DR: Algorithms for adaptive, tapered quantization of color images are described and the research is motivated by the desire to display high-quality reproductions ofcolor images with small frame buffers.
Related Papers (5)
Frequently Asked Questions (11)
Q1. What are the contributions mentioned in the paper "Qr-rls algorithm for error diffusion of color images" ?

A new error diffusion method is presented in which the adaptive recursive leastsquares ( RLS ) algorithm is used. This algorithm provides local optimization of the error diffusion filter along with smoothing of the filter coefficients in a neighborhood. 

Existing halftoning techniques can be broadly classified as ordered dither, error diffusion, and optimization-based halftoning techniques. 

The minimization of the cost function Js(H) with respect to the error diffusion filter coefficients matrix H(s) can be carried out by determining the rows hkT of the optimum matrix H(s) by minimizing the individual cost functions Jk ,s(hk) with respect to hk , for k51,2,...,K . 

After receiving his BSc degree, he received his MSE and PhD degrees in systems engineering from the Moore School of Electrical Engineering at the University of Pennsylvania, Philadelphia. 

By constraining the form of the error diffusion coefficient matrix H(s), as in Eq. ~4!, further savings in computational load can be achieved with tolerable degradation in the overall performance of the diffusion process. 

Disadvantages of optimization-based methods for halftoning are that there are multiple optima, the methods are iterative, and they require substantially high computational power. 

Computational complexity of the QR-RLS algorithm is O(K2N2) for the composite multichannel error diffusion and it is O(KN2) for the channelby-channel implementation. 

The coefficients of the adaptive error diffusion filter in both algorithms were scaled by 0.9, i.e., the authors allowed diffusion of not all but a fraction of the error made in quantization to neighboring pixels, and this resulted in a slight improvement in terms of color impulses. 

Gozde Bozkurt Unal received her BSc degree in electrical engineering from the Middle East Technical University, Ankara, Turkey, in 1996 and her MSc degree in electrical engineering from the Bilkent University, Ankara, Turkey, in 1998. 

G ,with the vector g̃(s) and the variable f̃ k(s) updating the present optimum error diffusion filter ashk !~s !5hk !~s21 !2 g̃~s ! 

As the authors can observe from these plots, the power spectrum of the quantization error diffused by the QR-RLS type adaptive method has not only the lowest energy but also the flattest response, whereas the error diffusion with Floyd-Steinberg has the highest energy.