Graphics Reference
In-Depth Information
case I: x 1 =0,
x 2
x =
4
x m
x 2
=
4 ,
since x m = x 2 / 2;
case II: x 1 = x 2
x 2
+ x 4
x =
x m
x 4 ;
=
case III: x 1 = x m
x m
2
+ x 4
x =
x m
=0 .
Thus, we see that
has its maximum equal to x 2 / 4 while its minimum
equals zero. For odd x 2 , we take
|
x
|
x 2
x 2
, depending on whether x 1 is
greater or less than x m so that their difference remains small. The same is
the case for y 2 . Therefore, the number of bits required to encode
2
or
2
y
can be dynamically decided based on x 2 and y 2 , respectively (end pixel of the
arc). For a 64
x and
×
64 image, the maximum number of pixels on an arc, we have
assumed, is 30. Hence, its base is always less than 30. So the end pixel can
always be encoded by 5 bits. Therefore,
x< 30 / 4, which is 7.5. Similarly,
y< 7 . 5. In the discrete case, we consider
x
8and
y
8. Thus, we
get the following bit requirements for an arc as follows:
64
×
64 image
256
×
256 image
identity (line or arc): 1 bit.
identity (line or arc): 1 bit.
x d : 5 bits;
x d : 6 bits;
y d : 5 bits;
y d : 6 bits;
quadrant information: 2 bits;
quadrant information: 2 bits;
x : log 2
x 2 / 4
bits;
x : log 2
x 2 / 4
bits;
y : log 2
y 2 / 4
bits;
y : log 2
y 2 / 4
; bits
sign for
x : 1 bit;
sign for
x : 1 bit;
sign for
y :1bit;
Note that the number of bits used to encode of
y : 1 bit;
sign for
x and
y varies with
the number of pixels on arcs. Thus, for a 256
256 image, we need 25 bits
for an arc of length 33 to 40 pixels and 23 bits for an arc of length less than
or equal to 32. Number of types of arcs of 33 to 40 pixels is 40-33+1=8 and
of 20 to 32 pixels is 32-20+1=13. The total number of bits for these types of
arcs is 8
×
25 + 13
23 = 499 and the total number of pixels on these types of
arcs is 4
26 = 630. Assuming arcs of all possible lengths are equally
probable, the average bit per contour pixel on arc in a 256
73 + 13
×
256 image is
499 / 630 = 0 . 79 bits/pixel.
Fora64
64 image, an arc of length 17 to 30 pixels needs 21 bits while
19 bits are needed for an arc of length less than or equal to 16. This gives
an average of 0.97 bits/contour pixel on arc. The number of types of arcs less
than or equal to 16 is 16-12+1=5 and that greater than 16 is 30-17+1=14.
For a line segment, we set the minimum and maximum number of pixels to
4 and 8 respectively for both 64
×
×
×
64 and 256
256 images. Chosen length for
 
Search WWH ::




Custom Search