The VEC format has been defined for the second international
graphics recognition contest by Atul Chhabra and Ihsin Phillips1.
Its objective is to propose a simple format, suitable for evaluation purposes.
The first line looks as follows:
%VEC-1.0 xsize ysize [dpi]
Where xsize
and ysize
are
in units of pixels if dpi
is present. If dpi
is absent,
xsize
and ysize
could be in any units. The x
axis points rightwards and the y
axis points downwards. The coordinates
of the ground truth VEC files are in pixels.
Four primitives are defined in the VEC format : lines, arcs, circles and text regions. Each primitive is contained in a single row in the VEC file, and all dimensions are interpreted as floating point values. The primitives are identified by the first letter of each row. The syntax associated to each primitive is described below.
L C|D x1 y1 x2 y2 width
L
indicates a line, continuous (C
) or dashed (D
).
(x1,y1)
and (x2,y2)
are the two endpoints of the
line, and width
is the thickness of the line. A C|D xcenter ycenter radius
start_angle end_angle width
A
indicates an arc, continuous (C
) or dashed (D
).
The move from start_angle
to end_angle
is always
clockwise. Angles are measured as positive in the clockwise direction. Angle
zero points in the positive x
direction. C C|D xcenter ycenter radius
width
C
indicates a circle, continuous (C
) or dashed (D
).
T x1 y1 x2 y2 orientation
fontHeight fontWidthFactor fontStrokeWidth %TEXT
T
indicates text. (x1,y1)
and (x2,y2)
are two diagonally opposite corners of the bounding box of the text string.
The ground truth file always uses (x1,y1)
to refer to the insertion
point of left justified text. orientation
is the angle of the
baseline of the text. fontHeight
, fontWidthFactor
and fontStrokeWidth
are used for rendering text. The value -1
for all these variables indicate that these values are just place holders.
The TEXT
field may be left blank, but the %
sign
must be included. Please note that the full format is presented for compatibility reasons, but that the text information and the dashed primitives are useless for the contest.
%VEC-1.0 512 512 600 L C 9 146 503 146 9 L C 503 146 503 366 9 L C 503 366 9 366 9 L C 9 366 9 146 9 L C 408 332 49 332 9 L C 49 332 49 183 9 L C 49 183 415 183 9 A C 383 256 80 -68.444000 72.556000 9
1 A. K. Chhabra and I. T. Phillips. The Second International Graphics Recognition Contest -- Raster to Vector Conversion: A Report. In: K. Tombre and A. K. Chhabra, editors, Graphics Recognition, Algorithms and Systems (selected papers of the second international workshop GREC'97), volume 1389 of Lecture Notes in Computer Science, pages 390-410,1998.