Intensity Level Resolution Refers To The Number of
Intensity Level Resolution Refers To The Number of
=
+ 1 1
Max L
L t L t = =
+1 min 1
;
| |
max min
; L L ue
min max
L L
Is the dynamic range of the image
The optimal (MSE) quantizer (the Lloyd-Max quantizer)
( )
L k du u p r u
r
t p r t r t
t
k
k
t
t
u k
k
k u k k k k
k
s s = =
= =
}
+
1 0 ) ( ) ( 2
0 ) ( ) ( ) (
1
2 2
1
c
cc
c
cc
( ) ( ) ( )
}
=
+
= =
L
k
t
t
u k
M
m
N
n
k
k
du u p r u n m u n m u
MN
1
2
1
0
1
0
2
1
) ( ) ( , ' ,
1
c
Leibnitz rule : differentiation under an integral
t
r r
k
k k
=
+
1
2
| |
k
t
t
u
t
t
u
k
u | u E
(u)du p
(u)du up
r
1 k
k
1 k
k
0 e = =
}
}
+
+
Iterative solution !
The uniform quantizer = the optimal quantizer for the uniform
grey level distribution:
s s
=
+
+
otherwise
t u t
t t u p
L
L u
0
,
1
) (
1 1
1 1
r
t t
t t
t t
k
k k
k k
k k
=
=
+
+
+
+
( )
( )
1
2 2
1
1
2 2
t
t t
k
k k
=
+
+ 1 1
2
2
q
t r
k k
+ =
c = =
}
1
12
2
2
2
2
q
u du
q
q
q
/
/
dB B 6
2 10log SNR
2
2B
10
2B
2
u
=
=
=
o
c
12
1
2
2 /
2 /
2 2
A
du u
A
A
A
u
= =
}
o
Signal variance
Noise variance
SNR
(Laplacian)
variance , - mean
|
|
.
|
\
|
=
2
2
2
2
) (
exp
2
1
) (
o
to
u
u p
u
( ) o
o
= u u p
u
exp
2
) (
o
o
2
2
=
(Gaussian)
Other possible distributions
Illustration of uniform quantization
B=1 => L=2
t1=0 t2=128 t3=256
r1=64
r2=192
Uniform quantizer transfer function
Decision levels
R
e
c
o
n
s
t
r
u
c
t
i
o
n
l
e
v
e
l
s
0 50 100 150 200 250
0
100
200
300
400
500
600
700
800
900
1000
The histogram of the image
Illustration of uniform quantization
B=2 => L=4
Quantized image The histogram of the image
0 50 100 150 200 250
0
100
200
300
400
500
600
700
800
900
1000
B=3 => L=8; false contours present
Quantized image
Image histogram
0 50 100 150 200 250
0
100
200
300
400
500
600
700
800
900
1000
Illustration of uniform quantization
0 50 100 150 200 250
0
100
200
300
400
500
600
700
800
900
1000
Illustration of optimal quantization
Input image histogram
Quantized image (Lloyd max algo)
B=1 => L=2
0 50 100 150 200 250
0
100
200
300
400
500
600
700
800
900
1000
Illustration of optimal quantization
B=3 => L=8
Input image histogram
Quantized image (Lloyd max algo)
False Contours
In general if B<6 (uniform quantization) or B<5 (optimal
quantization) => the "contouring" effect (i.e. false contours)
appears in the quantized image.
The false contours (contouring) = groups of neighbor
pixels quantized to the same value <=> regions of constant
gray levels; the boundaries of these regions are the false
contours.
The false contours do not contribute significantly to the
MSE, but are very disturbing for the human eye
Pseudo random noise addition to input image, prior to
quantization can break the contours.
Uniform quantization, B=4
Uniform quantization, B=6
False Contouring
16 grey levels (4 bpp)
8 grey levels (3 bpp)
4 grey levels (2 bpp)
2 grey levels (1 bpp)
False Contouring
Resolution: How Much Is Enough?
The big question with resolution is always how
much is enough?
This all depends on what is in the image and
what you would like to do with it
Key questions include
Does the image look aesthetically pleasing?
Can you see what you need to see within the
image?
Resolution: How Much Is Enough?
The picture on the right is fine for counting the
number of cars, but not for reading the number
plate
Intensity Level Resolution
(cont)
I
m
a
g
e
s
t
a
k
e
n
f
r
o
m
G
o
n
z
a
l
e
z
&
W
o
o
d
s
,
D
i
g
i
t
a
l
I
m
a
g
e
P
r
o
c
e
s
s
i
n
g
(
2
0
0
2
)
Low Detail Medium Detail High Detail
Properties of optimum mean squared quantizers
Quantizer output unbiased estimator of the
input
Quantization error uncorrelated with the
output (principle of orthogonality)
Average power (variance) of quantizer output
is less than that of input.
) ' ( ) ( u E u E =
0 ) ' ) ' (( = u u u E
) (
) (
) ( (
) (
) ) ( (
) ) ( ( ) ' (
) ' (
1
1
1
1
1
1
1
1
1
u E
du u up
du u up
du u p
du u up
du u p u E
r p u E
L
k
k
k
k
k
k
k
k
t
t
u
L
k
t
t
u
t
t
u
t
t
u
L
k
t
t
u
k
L
k
k
=
=
=
=
=
}
}
}
}
+
+
+
+
+
=
=
=
Quantizer output unbiased
estimator of the input
) ) ' ((
) | ( ) | ' ( ) ' (
2
2
1
1
u E
r p
u u E u u E p uu E
k
L
k
k
k k
L
k
k
=
=
e e =
=
=
0 0
Quantization error uncorrelated
with the output (principle of
orthogonality)
) ( ) (
) ) (( ) (
) ) (( ) ( ) ) ' ((
2
2 ' 2 2
2 ' 2 2
'
q q
o
q
q
E u E
u E u E
u E u E u u E
u u
=
=
=
+ =
Average power (variance) of
quantizer output is less than
that of input