Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Defines | Functions
utils.h File Reference

Miscellaneous utility functions. More...


Detailed Description

Miscellaneous utility functions.

Copyright (C) 2006 Rob Hess <hess@eecs.oregonstate.edu>

Version:
1.1.1-20070119

Definition in file utils.h.

Go to the source code of this file.

Defines

#define ABS(x)   ( ( x < 0 )? -x : x )

Functions

static int pixval8 (IplImage *img, int r, int c)
 A function to get a pixel value from an 8-bit unsigned image.
static void setpix8 (IplImage *img, int r, int c, uchar val)
 A function to set a pixel value in an 8-bit unsigned image.
static float pixval32f (IplImage *img, int r, int c)
 A function to get a pixel value from a 32-bit floating-point image.
static void setpix32f (IplImage *img, int r, int c, float val)
 A function to set a pixel value in a 32-bit floating-point image.
static double pixval64f (IplImage *img, int r, int c)
 A function to get a pixel value from a 64-bit floating-point image.
static void setpix64f (IplImage *img, int r, int c, double val)
 A function to set a pixel value in a 64-bit floating-point image.
void fatal_error (char *format,...)
 Prints an error message and aborts the program.
int array_double (void **array, int n, int size)
 Doubles the size of an array with error checking.

Function Documentation

int array_double ( void **  array,
int  n,
int  size 
)

Doubles the size of an array with error checking.

Parameters:
arraypointer to an array whose size is to be doubled
nnumber of elements allocated for array
sizesize in bytes of elements in array
Returns:
Returns the new number of elements allocated for array. If no memory is available, returns 0 and frees array.
void fatal_error ( char *  format,
  ... 
)

Prints an error message and aborts the program.

The error message is of the form "Error: ...", where the ... is specified by the format argument

Parameters:
formatan error message format string (as with printf(3)).
static float pixval32f ( IplImage *  img,
int  r,
int  c 
) [inline, static]

A function to get a pixel value from a 32-bit floating-point image.

Parameters:
imgan image
rrow
ccolumn
Returns:
Returns the value of the pixel at (r, c) in img

Definition at line 62 of file utils.h.

static double pixval64f ( IplImage *  img,
int  r,
int  c 
) [inline, static]

A function to get a pixel value from a 64-bit floating-point image.

Parameters:
imgan image
rrow
ccolumn
Returns:
Returns the value of the pixel at (r, c) in img

Definition at line 90 of file utils.h.

static int pixval8 ( IplImage *  img,
int  r,
int  c 
) [inline, static]

A function to get a pixel value from an 8-bit unsigned image.

Parameters:
imgan image
rrow
ccolumn
Returns:
Returns the value of the pixel at (r, c) in img

Definition at line 34 of file utils.h.

static void setpix32f ( IplImage *  img,
int  r,
int  c,
float  val 
) [inline, static]

A function to set a pixel value in a 32-bit floating-point image.

Parameters:
imgan image
rrow
ccolumn
valpixel value

Definition at line 76 of file utils.h.

static void setpix64f ( IplImage *  img,
int  r,
int  c,
double  val 
) [inline, static]

A function to set a pixel value in a 64-bit floating-point image.

Parameters:
imgan image
rrow
ccolumn
valpixel value

Definition at line 104 of file utils.h.

static void setpix8 ( IplImage *  img,
int  r,
int  c,
uchar  val 
) [inline, static]

A function to set a pixel value in an 8-bit unsigned image.

Parameters:
imgan image
rrow
ccolumn
valpixel value

Definition at line 48 of file utils.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:30 for Jafar by doxygen 1.7.6.1
LAAS-CNRS