Main Page | Class List | Directories | File List | Class Members | File Members

_gocr.h

00001 /*
00002 GOCR Copyright (C) 2000  Joerg Schulenburg Joerg.Schulenburg@physik.uni-magdeburg.de 
00003 GOCR API Copyright (C) 2001 Bruno Barberi Gnecco <brunobg@sourceforge.net>
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 
00019 */
00020  
00021 
00022 #ifndef _GOCR_INTERNAL_H 
00023 #define _GOCR_INTERNAL_H 
00024 
00025 /* hidden general header. */
00026 
00027 #include <stdio.h>
00028 #include <stdlib.h>
00029 #include "config.h"
00030 #include "gocr_module.h"
00031 
00032 /*
00033  * debug
00034  */
00035 #define _gocr_debug(level, command)     if ( level <= _data.verbose ) { command }
00036 extern void _gocr_printf ( int level, char *function, char *format, ... );
00037 
00038 /*
00039  * internal data
00040  */
00041 struct _gocr_data {
00042         int             verbose; /* 0 = none, 3 = MAX */
00043         int             block_overlap;
00044         int             no_block;
00045         int             char_overlap;
00046         int             char_rectangles;
00047         int             find_all;
00048         FILE            *error;
00049         int             print;
00050         int             print_image;
00051 
00052         /* internal access only */
00053         int             lock;
00054 };
00055 typedef struct _gocr_data _gocr_Data;
00056 
00057 extern _gocr_Data _data;
00058 extern gocr_Block *currentblock;
00059 extern gocr_Box *currentbox;
00060 
00061 
00062 /*
00063  * init/end functions
00064  */
00065 extern int _gocr_initModule ( void );
00066 extern void _gocr_endModule ( void );
00067 
00068 extern int _gocr_initBlock ( void );
00069 extern void _gocr_endBlock ( void );
00070 
00071 extern int _gocr_initImage ( void );
00072 extern void _gocr_endImage ( void );
00073 
00074 extern int _gocr_initUnicode ( void );
00075 extern void _gocr_endUnicode ( void );
00076 
00077 /*
00078  * utilities
00079  */
00080 extern int _gocr_imageSharedCopy ( gocr_Image *orig, int x0, int y0, int x1, int y1,
00081                             gocr_Image *new );
00082 extern int _gocr_imageCopy ( gocr_Image *orig, int x0, int y0, int x1, int y1,
00083                             gocr_Image *new );
00084 extern void _gocr_fixParameters ( int *x0, int *x1, int *y0, int *y1 );
00085 
00086 extern int _gocr_blockTextFill ( gocr_Block *b );
00087 extern void _gocr_blockInfoFill ( gocr_Block *b );
00088 
00089 extern int otsu ( gocr_Image *image, void *v );
00090 #endif /* _GOCR_INTERNAL_H */

Generated on Tue Oct 25 04:13:04 2005 for GOCR API by  doxygen 1.4.4