ByteGeom Overview


Package Name

DvmByteGeom

Description

This package supports geometric operations such as scaling, rotation, and homogenous and affine transformations on ByteImages. 

Scaling

The Dali scaling functions are designed for efficiency. Four functions are provided that scale images by powers of two -- for example, ByteShrink2x2 scales an image down by a factor of two in each dimension. Scaling by powers of two can be done with minimal aliasing using only adds and shifts. ByteScaleBilinear scales images by an arbitrary factor between one half and two. The function uses bilinear interpolation to minimise aliasing, and is significantly slower than scaling by a power of two.

Rotation

Dali rotation functions provide provide multiple options for rotations.  Two functions exist to rotate a ByteImage by 45 degrees and 90 degrees, respectively.   These are the most efficient rotational functions which Dali provides.  Dali also provides a function to rotate a ByteImage around an arbitrary point as well as a function to rotate a ByteImage around the origin.

Transformations

Dali supports both homogenous and affine transformations.  Homgenous transformations allow perspective transformations of ByteImages, while affine transformations allow ByteImages to be skewed across a parallelogram, ie, parallel lines are kept paralle in moving from a source image to an image which has been skewed using an affine transformation.  Homogenous transformations involve a greater degree of complexity than affine transforms, but allow for a greater degree of freedom in terms of how the image can be warped.  Both are computed using matrices of coefficients, and Dali provides support for computing these coefficients.

Detailed Specification

Tcl specification
C API specification

Dependencies

Needs DvmBasic

Example

Homogeneous transformation of an image [ tcl | C ]

Notes

When using the ByteGeom package as a run time library, you need to link with the math library.


Last Updated :

Copyright © 1997-1998 by Cornell University. See the file license.txt for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.