Dali: Geometric Operations on ByteImages -- C API

[ Header Files | Types | Constants | Scaling | Rotation | Affine Transformations | Homogeneous Transformations | See Also ]

Header Files

#include <dvmbytegeom.h>

Type Definitions

RectRegion

The RectRegion type defines a rectangular region. It is used as the return value of two functions, ByteAffineRectRegion() and ByteHomoRectRegion(). These functions compute the bounding box of the region in an image that will be affected by the corresponding operation (affine or homogenous transformations).

     typedef struct RectRegion {
         int x;
         int y;
         int w;
         int h;
     } RectRegion;
  
x
x-coordinate of the upper-left corner
y
y-coordinate of the upper-left corner
w
the width of the rectangle
h
the height of the rectangle

Constants

Return Codes

There return codes indicates if the operation was successful, or what error occured (if any).

    #define DVM_BYTE_OK 0
    #define DVM_BYTE_TOO_SMALL -1
    #define DVM_BYTE_BAD_MATRIX -2
  

Operators

Scaling

int ByteShrink1x2 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)
int ByteShrink2x1 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)
int ByteShrink2x2 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)
int ByteShrink4x4 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)

int ByteExpand4x4 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)
int ByteExpand2x2 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)
int ByteExpand1x2 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)
int ByteExpand2x1 (ByteImage *src, ByteImage *dest, int *newWidth, int *newHeight)

int ByteScaleBilinear (ByteImage *src, ByteImage *dest, int newWidth, int newHeight)


Rotation

void ByteRotate90a (ByteImage *src, ByteImage *dest)
void ByteRotate90c (ByteImage *srcBuf, ByteImage *destBuf)

void ByteRotateOrig (ByteImage *src, ByteImage *dest, double theta)

void ByteRotate (ByteImage *src, ByteImage *dest, double theta, int x, int y)


Affine Transformations

void ByteAffine (ByteImage *src, ByteImage *dest, double a, double b, double c, double d, double e, double f)

RectRegion ByteAffineRectRegion (ByteImage *src, double a, double b, double c, double d, double e, double f)


Homogeneous Transformations

void ByteHomo (ByteImage *src, ByteImage *dest, double a, double b, double c, double d, double e, double f, double m, double n, double p)

RectRegion ByteHomoRectRegion (ByteImage *src, double a, double b, double c, double d, double e, double f, double m, double n, double p)

int ByteHomoComputeMatrix (double w, double h, double x1, double y1, double x2, double y2, double x3, double y3, double *a, double *b, double *d, double *e, double *m, double *n)

int ByteHomoInvertMatrix (double a, double b, double d, double e, double m, double n, double *aNew, double *bNew, double *dNew, double *eNew, double *mNew, double *nNew)


See Also

ByteImage , BitImageScan API


Last updated : Saturday, November 14, 1998, 07:50 PM