1: #ifndef RESEARCH_H 2: #define RESEARCH_H 3: 4: #include "bool.h" 5: 6: #include "pgm.h" 7: 8: #define LOW_VALUE 0 9: #define HIGH_VALUE 255 10: 11: #ifndef TRUE 12: #define TRUE 1 13: #endif 14: #ifndef FALSE 15: #define FALSE 0 16: #endif 17: 18: /*number of chain codes stored, */ 19: #define MAX_NUMBER_OF_CHAINS 5 20: #define MAX_CHAINS MAX_NUMBER_OF_CHAINS 21: 22: 23: /*cartesian coordinate type*/ 24: typedef struct 25: { 26: int x; 27: int y; 28: }coord; 29: 30: 31: void setCPixel(int ix, int iy, RGB_INT color); 32: 33: void setCLines(int ix1, int iy1, int ix2, int iy2, RGB_INT color); 34: 35: void setCRect(int ix1, int iy1, int ix2, int iy2, RGB_INT color); 36: 37: void pxlcpy(PGMImage *dest, int dest_row, int dest_col, 38: PGMImage *src, int src_row, int src_col); 39: 40: int rgb_avg(RGB_INT cur_pxl); 41: 42: int img_pxl_avg(PGMImage* img); 43: 44: int pxlcmp (RGB_INT pxl1, RGB_INT pxl2, int range); 45: 46: void drawString(int ix, int iy, void *theFont, char theString[256]); 47: 48: int background(int treash_value, PGMImage* img); 49: 50: coord find_dividers(coord point1, coord point2, float t); 51: 52: #endif