|
Image
|
| Centre for Vision, Speech & Signal Processing |
| BASIC | LIBRARIES | AMMA SEARCH | AMMA HOME |
The basic image class is the template class ImageC, templated on one of the pixel classes. The derived template class NumImageC is ImageC enhanced with some numerical operations.
There are also many non-templated derived classes, with a variety of pixel types. Their functionality is gradually being replaced by ImageC, NumImageC and the Image Processing classes, and the Image I/O system.
In terms of its structure and functionality, ImageC and its derivatives can be considered as 2-D arrays. If there is a difference in philosophy between ImageC and Array2dC, it is that in ImageC there is a sense of neighbourhood, and spatial extent. In particular an ImageC object contains one or more "image rectangles" (ImageRectangleC). When an image is constructed, it has one associated rectangle corresponding to the border of the image. However other rectangles can also be attached, corresponding to subimages; they can also be moved around the image. These can be useful for spatial filtering and other neighbourhood operations.
Contrary to what you might expect, ImageC is not currently derived from Array2dC, although this might change. The consequence is that member functions of the two classes with the same functionality often have different names (e.g. ImageC::Rnum versus Array2dC::Range1).
Simple image constructors [e.g. ImageC::ImageC(SizeT rows, SizeT columns) ] will use a coordinate system whose origin is the top left-hand pixel. However other coordinate systems are possible. For instance, a spatial filtering operation using a 3x3 mask will typically produce an image that is smaller than the original - the whole image border has shrunk by one pixel. The coordinate system of the new image will be such that corresponding pixels in the two images have the same coordinates. Hence the coordinates of the top left-hand pixel of the old and new images will be respectively (0,0) and (1,1). The programmer does not need to keep track of these changes though - use the image rectangle or the border member functions [ImageC::TRow(), BRow(), LCol() and RCol() ] to determine the image boundaries. It is recommended to use IndexC, Index2dC or PixelC for indexing images, as these have division and modulo operators that behave sensibly for negative coordinates (unlike int).
AMMA | |
Image | |
Colour | |
Converters | |
Fonts | |
Image IO | Image Input and Output |
Image Processing | Image processing |
Image Representations | |
Indexing | |
Motion | |
Pixel Representations | |
Video | Video input and output stream classes. |
| Author: Bill Christmas, Generated by DocEntry: March 20, 2001 |