#define VISION_MAX_LOCATIONS   20

#define Xsize 320
#define Ysize 240

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


typedef long Box_t[4];          // top/left/bottom/right
typedef long Point_t[3];        // x y z (or just x y)


void null_bg(unsigned char *bg, unsigned char *img, int fsize);

void isolate_skin(unsigned char *img, int fsize);

int locateRegions(unsigned char *xim, const long rows, const long cols, 
		  const long sizeThresh, Point_t location[], Box_t bbox[], 
		  long size[], short *regmap);

void ConvertToBinary(unsigned char *img, int fsize, unsigned char *bin);
void show_box(unsigned char *img, Box_t *bbox, int x, int y, int nRegions);
int check_bg(unsigned char *pre, unsigned char *curr, int fsize);
int get_heads(Box_t *bbox, Box_t *hbox, long *size, int nRegions);



