|
IRIS Foundation
What is IRIS Foundation ?
IRIS Foundation contains all the data structures required by the other, higher-level
modules. It also contains many algorithms (trivial or otherwise) which are frequently used
by the vision modules. Many of its structures are templatised, so that they can be used in a
variety of situations.
I shall not try to document the entire component here (I'll use Doxygen for that probably).
You will find an overview of the structure of the Foundation, with minimal code details or
the like. Once you're done with that, you'll be better prepared to understand the source (or
reuse it).
A rough structural description
IRIS Foundation resides in the namespace Comrade::IrisFoundation,
so to use it, you'll either have to refer to its data types and functions in a fully qualified
fashion, or bring in the whole thing with the using directive.
The classes currently implemented in the IRIS Foundation are as follows:
BitmapStreamer: This class is a filter for reading and writing to 24-bit bitmap
files. Filters for reading other formats were not designed intentionally because in the final
version, IRIS-XT and IRIS-3D
will read in the images from the memory itself (placed there by the framegrabber driver
libfg for Linux).
RGB and RGBstruct: These two data structures are for storing RGB values for use
by other modules. RGBstruct is the normalised version while the
values of components in an RGB structure can be between 0 and 255.
The RGB model is one of several color spaces
.
HSLstruct: This data structure is another way of representing color, and is used
by the image processing algorithms more often than the RGB and
RGBstruct types. HSLstruct
represents the HSL color space.
ColorSpaceConvertor: This class encapsulates the conversion functions between
the RGB and HSL color spaces. Note that this operates only on individual pixels.
Buffer: This is the single most important class used by the higher modules.
It is mostly used to store images in a way similar to bitmaps. Being templatised, it can
represent RGB-style or HSL-style images (or any other image format that may be used).
It is also used for other purposes like camera flag arrays in 3D reconstruction. It is
resizeable and supports deep copy semantics.
RGB_BufferManager: This class operates exclusively on RGB
Buffer objects and decouples the Buffer
class from the actual source of a RGB image. In addition, it supports copying and pasting
of rectangular blocks between RGB blocks.
BufferConvertor: This class has a number of static functions which are
used for converting between Buffer structures of different
color spaces. Most image processing routines using the HSL color space for operation
make use of the functions in this class.
Tree: This class is used for pyramidal image representations. Pyramidal
representations allow representation of scenes at different scales, thus permitting
variable scale-space analysis. Currently, only the quadtree segmentation code uses
this class, but more applications of this class are expected soon.
QuadtreeSegmenter: This class performs quadtree segmentation upon images
using the Tree structure. Parameters can be varied to give
segmentation at different scales.
In addition, there are other classes like ByteStreamer
and functions like min() and
max(), but these are not meant to be used directly by the application
programmer.
Known issues
For images of particular sizes, the copying to the image file does not work properly.
The result is a 'skewed' version of the intended image, and periodic red/green/blue dots
suggesting that there is an 'off-by-one' error somewhere. At this point, this problem is
not too important, since everything works fine for standard resolutions like 640x480 or
800x600 or 1024x768. But it needs to be resolved.
The internal reader/writer components of BitmapStreamer
are both of type fstream, not ifstream
and ofstream respectively, as they should be.
Copyright (c) 2004 Avishek Sen Gupta
|