polygon intersector: added horizontal line reconstruction
[swftools.git] / lib / gocr / otsu.h
1 /*
2
3     see README for EMAIL-address
4
5  */
6
7
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);
15
16
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);