new function open_file_or_stdin
[swftools.git] / lib / gocr / otsu.h
blobacb16378c74e5034cb3a80a1d94d7a55cb3bd6dc
1 /*
3 see README for EMAIL-address
5 */
8 /*======================================================================*/
9 /* OTSU global thresholding routine */
10 /* takes a 2D unsigned char array pointer, number of rows, and */
11 /* number of cols in the array. returns the value of the threshold */
12 /*======================================================================*/
13 int
14 otsu (unsigned char *image, int rows, int cols, int x0, int y0, int dx, int dy, int vvv);
17 /*======================================================================*/
18 /* thresholding the image (set threshold to 128+32=160=0xA0) */
19 /* now we have a fixed thresholdValue good to recognize on gray image */
20 /* - so lower bits can used for other things (bad design?) */
21 /*======================================================================*/
22 int
23 thresholding (unsigned char *image, int rows, int cols, int x0, int y0, int dx, int dy, int thresholdValue);