Specifications

Image Architecture
2-9
2
This section gives a short overview of image tiling in the Image Processing
Library. In Chapter 4 you will find more information about tiling, namely,
the descriptions of the
TileInfo structure, the imageID parameter, and the
functions CreateTileInfo, SetTileInfo,andDeleteTileInfo.
Tile Size
In the Image Processing Library, all tiles must be of the same size,
including those on the edge of an image. The tiles on the edge of an image
must contain valid data up to the border of the image; beyond that, the
pixels are ignored, and the border mode is used instead.
The size of the image tiles is contained within the
IplTileInfo structure.
It is restricted to being an even multiple of 8 in each dimension. Typical
tile sizes are 32x32 and 64x64.
For functions that take more than one source image, either all source
images must be tiled with equally-sized tiles or they must all be non-tiled.
The source and destination images tiling and tile sizes need not be the
same.
Call-backs
For tiled images, the IplImage structure does not contain a pointer to
image data; therefore, functions operating on tiled images must acquire
data tile-by-tile. To do this, the library uses a system of call-backs, in
which the functions request pointers to individual tiles based on need.
The call-back system is implemented (by the library user) as a single
function, the prototype and behavior of which are specified below. When
called by the library, this function must provide or release one tile’s worth
of data. The function is specified to the library in the
callBack field of the
IplTileInfo structure. The prototype is as follows:
void (*IplCallBack) (const IplImage* img, int xIndex,
int yIndex, int mode);
where img is the header of the parent image;
xIndex and yIndex are the indices of the requested tile; they refer to the