Main Page   Compound List   File List   Compound 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 #include "hash.h"
00025 
00030 /* 
00031  * character frame
00032  */
00040 struct gocrchar {
00041         wchar_t         c;                      
00042         float           prob;                   
00043 };
00047 typedef struct gocrchar gocrChar;
00048 
00052 struct gocrbox {
00053         /* 
00054          * to be used by charFinder module 
00055          */
00056         int             x0, y0, x1, y1;         
00057         wchar_t         *attributes;            
00059         /*
00060          * to be used by charRecognizer module
00061          */
00062         gocrChar        *ch;                    
00063         List            possible;               
00064         wchar_t         modifier;               
00066         /* provided for compatibility only, deprecated. */
00067         wchar_t         c, ac;                  
00068         int             num;                    
00069         int             x, y, dots;             
00070 };
00074 typedef struct gocrbox gocrBox;
00075 
00076 enum gocrcharattributetype {
00077         SETTABLE, UNTIL_OVERRIDEN
00078 };
00082 typedef enum gocrcharattributetype gocrCharAttributeType;
00085 /*
00086  * charFinder functions 
00087  */
00091 extern int gocr_charBegin ( void );
00092 extern int gocr_charEnd ( void );
00093 extern int gocr_charSetAllNearPixels ( int action, int x, int y );
00094 extern int gocr_charSetAttribute ( int action, char *name, ... );
00095 extern int gocr_charSetPixel ( int action, int x, int y );
00096 extern int gocr_charSetRect ( int action, int x0, int y0, int x1, int y1 );
00099 /*
00100  * charRecog functions
00101  */
00105 extern int gocr_charAttributeRegister ( char *name, gocrCharAttributeType t,
00106         char *format );
00107 extern int gocr_charAttributeInsert ( char *name, ... );
00110 #endif

Generated at Thu Mar 1 10:05:32 2001 for GOCR API by doxygen1.2.2 written by Dimitri van Heesch, © 1997-2000