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

gocr_char.h

Go to the documentation of this file.
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 #ifndef _GOCR_CHAR_H
00022 #define _GOCR_CHAR_H
00023 
00024 #ifndef _GOCR_MODULE_H
00025 # error "Do not call gocr_gui.h directly; call gocr_module.h instead."
00026 #endif.
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00037 /* 
00038  * character frame
00039  */
00047 struct gocr_char {
00048         wchar_t         c;                      
00049         float           prob;                   
00050 };
00054 typedef struct gocr_char gocr_Char;
00055 
00059 struct gocr_box {
00060         int             x0, y0, x1, y1;         
00061         wchar_t         *attributes;            
00062         gocr_Image      *image;                 
00064         List            possible;               
00065         gocr_Char       *ch;                    
00066         wchar_t         modifier;               
00068         /* provided for compatibility only, deprecated. */
00069         wchar_t         c, ac;                  
00070         int             num;                    
00071         int             x, y, dots;             
00072 };
00076 typedef struct gocr_box gocr_Box;
00077 
00078 enum gocr_charattributetype {
00079         SETTABLE, UNTIL_OVERRIDEN
00080 };
00084 typedef enum gocr_charattributetype gocr_CharAttributeType;
00087 /*
00088  * charFinder functions 
00089  */
00093 
00094 #define GOCR_SET        1
00095 #define GOCR_UNSET      0
00096 
00097 extern int gocr_charBegin ( void );
00098 extern int gocr_charEnd ( void );
00099 extern int gocr_charSetAllNearPixels ( int action, int x, int y , int connect );
00100 extern int gocr_charSetAttribute ( int action, char *name, ... );
00101 extern int gocr_charSetPixel ( int action, int x, int y );
00102 extern int gocr_charSetRect ( int action, int x0, int y0, int x1, int y1 );
00105 /*
00106  * charRecog functions
00107  */
00111 extern int gocr_charAttributeRegister ( char *name, gocr_CharAttributeType t,
00112         char *format );
00113 extern int gocr_charAttributeInsert ( char *name, ... );
00114 extern int gocr_boxCharSet( gocr_Box *b, wchar_t w, float prob );
00117 #ifdef __cplusplus
00118 }
00119 #endif
00120 
00121 #endif

Generated on Sun Apr 4 11:10:41 2004 for GOCR API by doxygen 1.3.5