#ifndef SEGMENT_H #define SEGMENT_H #define FW 160 #define FH 120 #define DW 110 #define DH 90 #define MAX_B 100 #define BB 16 /* threshold to segment a human */ #define DEPTH_HIGH 36 #define DEPTH_LOW 15 typedef struct noname1 { int left, top; int nrows, ncols; unsigned char *buf; } Block; void segment (unsigned char *p,unsigned char *s, Block * b[MAX_B], int * bn); void histogram (unsigned char *p, unsigned char histo[64]); void save2file (unsigned char *p, int nrows, int ncols, char fn[50]); void readfile (unsigned char *p, int nrows, int ncols, char fn[50]); void block_seg (unsigned char *buf, int nrows, int ncols,unsigned char *left, Block * block[MAX_B], int * bn); void block_seg1 (unsigned char *buf, int nrows, int ncols,unsigned char *left, Block * block[MAX_B], int * bn); void topo_filter (unsigned char *p, int nrows, int ncols); void binarize (unsigned char *in, int nrows, int ncols, int t_low, int t_high); void fill_block (unsigned char *left_buf, Block * block); #endif