Databases Reference
In-Depth Information
s
σ
SNR
(
dB
) =
10 log 10
(14)
σ
q
10 log 10 (
2
2 X max )
12
=
·
(15)
12
2
2
(
2 X max )
12
=
10 log 10
(16)
2 X max
M
12
2
(
)
M 2
=
10 log 10 (
)
2 n
=
20 log 10 (
)
=
.
(17)
6
02 n dB
This equation says that for every additional bit in the quantizer, we get an increase in the signal-
to-noise ratio of 6.02 dB. This is a well-known result and is often used to get an indication of
the maximum gain available if we increase the rate. However, remember that we obtained this
result under some assumptions about the input. If the assumptions are not true, this result will
not hold true either.
Examp l e 9 . 4 . 1 : Image Compression
A probability model for the variations of pixels in an image is almost impossible to obtain
because of the great variety of images available. A common approach is to declare the pixel
values to be uniformly distributed between 0 and 2 b
1, where b is the number of bits per
pixel. For most of the images we deal with, the number of bits per pixel is 8; therefore, the
pixel values would be assumed to vary uniformly between 0 and 255. Let us quantize our test
image Sena using a uniform quantizer.
If we wanted to use only 1 bit per pixel, we would divide the range [0, 255] into two
intervals, [0, 127] and [128, 255]. The first interval would be represented by the value 64,
the midpoint of the first interval; the pixels in the second interval would be represented by the
pixel value 196, the midpoint of the second interval. In other words, the boundary values are
{0, 128, 255}, while the reconstruction values are {64, 196}. The quantized image is shown
in Figure 9.7 . As expected, almost all the details in the image have disappeared. If we were to
use a 2-bit quantizer, with boundary values {0, 64, 128, 196, 255} and reconstruction levels
{32, 96, 160, 224}, we would get considerably more detail. The level of detail increases as the
use of bits increases until at 6 bits per pixel, the reconstructed image is indistinguishable from
the original, at least to a casual observer. The 1-, 2-, and 3-bit images are shown in Figure 9.7 .
Looking at the lower-rate images, we notice a couple of things. First, the lower-rate images
are darker than the original, and the lowest-rate reconstructions are the darkest. The reason
for this is that the quantization process usually results in scaling down of the dynamic range
of the input. For example, in the 1-bit-per-pixel reproduction, the highest pixel value is 196,
as opposed to 255 for the original image. As higher gray values represent lighter shades, there
is a corresponding darkening of the reconstruction. The other thing to notice in the low-rate
reconstruction is that wherever there were smooth changes in gray values there are now abrupt
Search WWH ::




Custom Search