4. Software architecture
It is worth to highlight that the augmented reality
application described previously will be distributed as
a package of the Lliurex 10.09 operating system.
Lliurex is a Linux distribution which is based on
Ubuntu Lucid Lynx (10.04). The AR contents, that are
catalogued using the SCORM standard, will be
distributed through an educational porta
The whole system has been developed using OGRE
as its graphics engine and a set of public libraries like
OIS to manage input devices, Audiere to manage
sound streams, tinyXML to manage XML
configuration files, v4l2 to capture video from a
webcam under Linux, MyGUI to develop the graphical
user interface and OpenCV to develop our own AR
engine under Linux.
In order to support the development of AR
applications our research group has developed a
software library called HUMANAR, which is
described with all detail in [15]. Although there are
several public libraries with AR capabilities, we
decided to develop our own library to overcome some
drawbacks present in some public libraries (jitter, bad
performance with variable illumination, support of
infrared markers, etc.).
HUMANAR is a C and C++ language software
library that uses computer vision techniques to
calculate the real camera viewpoint relative to a real
world marker. This method can be divided in three
parts: camera calibration, marker detection and
calculation of marker position and orientation (pose
estimation).
Camera calibration consists in determining the
intrinsic camera parameters and the distortion
parameters. We use different captures of planar
checkerboard patterns and the Zhang´s method [23] for
this purpose. Marker detection consists in binarizing
the grab camera frame using an adaptive threshold [17]
in order to find the marker contour where the
connected components must be extracted.
Next the perimeter of each contiguous region of
black pixels is traced to produce a chain representing
an object border. A set of line segments are then fitted
to these points, in such a way that all border pixels are
within some minimum distance of a line segment. If
the resulting polygon is sufficiently large and has