Graphics Reference
In-Depth Information
smaller length where the key pixels are dense. Thus, key pixels (dense and
non-dense) captures the structure of the contour and helps to maintain cur-
vature of the entire contour at the time of reconstruction. Now, to encode an
arc we first consider the end pixel of the arc. Next, we encode the difference of
coordinates (
y ) of the pixel on the arc at the parameter value, t=1/2
and the mid pixel of the base of the arc. Since an arc between two key pix-
els may or may not be approximated by a single quadratic Bezier-Bernstein
polynomial, to ensure good approximation and encoding, we restrict the min-
imum and the maximum number of pixels on an arc. For a 64
x,
×
64 image,
these numbers are taken 12 and 30, respectively, while for a 256
256 image,
these numbers are assumed to be 20 and 40, respectively. In other words, for
a64
×
64 image, the length of every arc is restricted to lie between 12 and 30,
while for a 256
×
256 image, the length of every arc is assumed to lie between
20 and 40. To find out the number of bits required to encode
×
y ,we
consider a few steps from 1-dimensional quadratic B-B polynomial. Position
coordinates of the point on the arc at t=1/2 are
x and
t ) 2 x o +2 t (1
t ) x 1 + t 2 x 2
x a =(1
x o
4
+ x 2
+ x 4
=
(4.14)
y a =(1
t ) 2 y o +2 t (1
t ) y 1 + t 2 y 2
y o
4
+ y 2
+ y 4
=
.
Here, ( x o ,y o ) and ( x 2 ,y 2 ) are respectively the start and end pixels of an arc,
and at these two points, tangents to the reconstructed arc have their point
of intersection at ( x 1 ,y 1 ). Since we are using relative coordinates, ( x o ,y o )is
always the origin of the running frame of axes and hence, we take x o =0and
y o = 0. Therefore, equation (4.14) reduces to
x a = x 2
+ x 4
(4.15)
y a = y 2
+ y 4
.
The midpoint of the base of the arc is given by ( x m = x 2 / 2, y m = y 2 / 2). The
difference thus becomes
x = x a
x m
x 2
+ x 4
=
x m
y = y a
y m
y 1
2
+ y 4
=
y m .
Since an arc between any two key pixels remains always confined within a
right triangle with its base as the line joining the two key pixels, the point of
intersection of tangents at two ends of the arc also remains within this right
triangle. Therefore, x 1 can take on its position anywhere between 0 and x 2 ,
and y 1 between 0 and y 2 with respect to the running axes of coordinates.
Thus, we get three different cases as given below.
 
Search WWH ::




Custom Search